Browse Source

Merge branch 'master' of http://192.168.20.122:3000/root/qiyewechatApp

whc 4 years ago
parent
commit
0d2e250ade

+ 0 - 1
UI/src/pages/sellmanage/pushMessage/index.js

@@ -210,7 +210,6 @@ class PushMessage extends React.Component {
         items[key].timesList = listData[key];
         initData.items = items;
       }
-      // console.log(listData,'initData');
       this.props.dispatch({ type: 'pushMessage/updateState', payload: { times: listData, initData: initData } });
     } else {
       message.info('最少保留一个时间段');

+ 0 - 1
UI/src/pages/sellmanage/pushMessage/pushMessageService.js

@@ -2,7 +2,6 @@ import { request, config } from 'utils'
 import qs from 'qs';
 
 export function submit(param) {
-  console.log(param,'p---m');
     return request({
       url:config.WXMpAPI+"/wx/keyword/saveTimesMessage/"+param.appId,
       method: 'post',

+ 8 - 8
mpwechatApp/src/main/java/com/liangjian11/wx/mp/mapper/ChannelPortMapper.java

@@ -38,16 +38,16 @@ public interface ChannelPortMapper extends BaseMapper<ChannelPort> {
         "<if test='principalName!=null and principalName.length() > 0'> principalname=#{principalName},</if> " +
         "<if test='alias!=null and alias.length() > 0'> alias=#{alias},</if> " +
         "<if test='businessInfo!=null and businessInfo.length() > 0'> businessinfo=#{businessInfo},</if> " +
-        "<if test='qrcodeUrl!=null and qrcodeUrl.length() > 0'> qrcodeUrl=#{qrcodeurl},</if> " +
-        "<if test='mpMessageUrl!=null and mpMessageUrl.length() > 0'> mpMessageUrl=#{mpmessageurl},</if> " +
-        "<if test='mpOpenidUrl!=null and mpOpenidUrl.length() > 0'> mpOpenidUrl=#{mpopenidurl},</if> " +
-        "<if test='appId!=null and appId.length() > 0'> appId=#{appid},</if> " +
+        "<if test='qrcodeUrl!=null and qrcodeUrl.length() > 0'> qrcodeUrl=#{qrcodeUrl},</if> " +
+        "<if test='mpMessageUrl!=null and mpMessageUrl.length() > 0'> mpMessageUrl=#{mpMessageUrl},</if> " +
+        "<if test='mpOpenidUrl!=null and mpOpenidUrl.length() > 0'> mpOpenidUrl=#{mpOpenidUrl},</if> " +
+        "<if test='appId!=null and appId.length() > 0'> appid=#{appId},</if> " +
         "<if test='secret!=null and secret.length() > 0'> secret=#{secret},</if> " +
         "<if test='token!=null and token.length() > 0'> token=#{token},</if> " +
-        "<if test='aesKey!=null and aesKey.length() > 0'> aesKey=#{aeskey},</if> " +
-        "<if test='createTime!=null and createTime.length() > 0'> createTime=#{createtime},</if> " +
-        "<if test='updateTime!=null and updateTime.length() > 0'> updateTime=#{updatetime},</if> " +
-        "<if test='appHostId!=null and appHostId.length() > 0'> appHostId=#{apphostid},</if> " +
+        "<if test='aesKey!=null and aesKey.length() > 0'> aeskey=#{aesKey},</if> " +
+        "<if test='createTime!=null and createTime.length() > 0'> createTime=#{createTime},</if> " +
+        "<if test='updateTime!=null and updateTime.length() > 0'> updateTime=#{updateTime},</if> " +
+        "<if test='appHostId!=null and appHostId.length() > 0'> appHostId=#{appHostId},</if> " +
         "<if test='enterpriseWechatId!=null and enterpriseWechatId.length() > 0'> enterprisewechatid=#{enterpriseWechatId},</if> " +
         "</trim>"+
         " where id = #{id} " +

+ 0 - 6
mpwechatApp/src/main/java/com/liangjian11/wx/mp/service/impl/KeywordServiceImpl.java

@@ -108,12 +108,6 @@ public class KeywordServiceImpl extends ServiceImpl<KeywordMapper, Keyword> impl
     @Override
     public List<Keyword> getKeyWordOfPage(String appId,String ruleName, String keyword, Integer index, Integer size) {
         List<Keyword> list = keywordMapper.getKeyWordOfPage(appId,ruleName, keyword, index, size);
-        if (list != null && list.size() > 0) {
-            for (Keyword item : list) {
-                if (!StringUtils.isEmpty(item.getKeyword()))
-                    item.setKeyword(item.getKeyword().substring(0, item.getKeyword().length() - 1));
-            }
-        }
         return list;
     }
 

+ 33 - 3
mpwechatApp/src/main/resources/application-pgprod.properties

@@ -37,7 +37,7 @@ spring.druid.filters= stat,wall,slf4j
 spring.druid.connectionProperties= druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
 
 spring.datasource.driver-class-name= org.postgresql.Driver
-spring.datasource.url= jdbc:postgresql://192.168.138.200:5432/qywechat
+spring.datasource.url= jdbc:postgresql://192.168.138.200:5433/qiyewechat
 spring.datasource.username= dbuserpg
 spring.datasource.password= postgres#360lj.com@2019@#
 
@@ -66,10 +66,40 @@ spring.ue.druid.filters= stat,wall,slf4j
 spring.ue.druid.connectionProperties= druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
 
 spring.ue.datasource.driver-class-name= org.postgresql.Driver
-spring.ue.datasource.url= jdbc:postgresql://192.168.138.200:5432/qywechat
+spring.ue.datasource.url= jdbc:postgresql://192.168.138.200:5433/qiyewechat
 spring.ue.datasource.username= dbuserpg
 spring.ue.datasource.password= postgres#360lj.com@2019@#
-
+    
+# quartz
+spring.quartz.properties.org.quartz.scheduler.instanceName = clusteredScheduler
+spring.quartz.properties.org.quartz.scheduler.instanceId = AUTO
+spring.quartz.properties.org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
+spring.quartz.properties.org.quartz.threadPool.threadCount = 10
+spring.quartz.properties.org.quartz.threadPool.threadPriority = 5
+spring.quartz.properties.org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true
+spring.quartz.properties.org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
+spring.quartz.properties.org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+spring.quartz.properties.org.quartz.jobStore.tablePrefix = QRTZ_
+spring.quartz.properties.org.quartz.jobStore.useProperties = true
+spring.quartz.properties.org.quartz.jobStore.isClustered = true
+spring.quartz.properties.org.quartz.jobStore.clusterCheckinInterval = 15000
+spring.quartz.properties.org.quartz.jobStore.dataSource = mySource
+spring.quartz.properties.org.quartz.dataSource.mySource.driver = com.mysql.jdbc.Driver
+spring.quartz.properties.org.quartz.dataSource.mySource.URL = jdbc:mysql://139.159.192.185:3306/qywechat?useUnicode=true&characterEncoding=utf-8
+spring.quartz.properties.org.quartz.dataSource.mySource.user = cdh
+spring.quartz.properties.org.quartz.dataSource.mySource.password = CDH360lj#com2019
+spring.quartz.properties.org.quartz.dataSource.mySource.initialPoolSize = 3
+spring.quartz.properties.org.quartz.dataSource.mySource.maxPoolSize = 50
+spring.quartz.properties.org.quartz.dataSource.mySource.minPoolSize = 1
+spring.quartz.properties.org.quartz.dataSource.mySource.maxIdleTime = 3600
+spring.quartz.properties.org.quartz.dataSource.mySource.testConnectionOnCheckin = true
+spring.quartz.properties.org.quartz.dataSource.mySource.idleConnectionTestPeriod = 60
+spring.quartz.properties.org.quartz.dataSource.mySource.preferredTestQuery = select 1
+spring.quartz.job-store-type = jdbc
+#\u662F\u5426\u7B49\u5F85\u4EFB\u52A1\u6267\u884C\u5B8C\u6BD5\u540E\uFF0C\u5BB9\u5668\u624D\u4F1A\u5173\u95ED
+spring.quartz.wait-for-jobs-to-complete-on-shutdown = true
+#\u914D\u7F6Ejob\u662F\u5426\u8986\u76D6\u6570\u636E\u5E93\u5DF2\u7ECF\u5B58\u5728\u7684JOB\u4FE1\u606F
+spring.quartz.overwrite-existing-jobs = true
 
 clientMember.port= 8005
 clientMember.service.id= memb

+ 0 - 3
mpwechatApp/src/main/resources/application-prod.properties

@@ -73,12 +73,10 @@ spring.ue.datasource.password= 360lj.comAppauth#2020
 # quartz
 spring.quartz.properties.org.quartz.scheduler.instanceName = clusteredScheduler
 spring.quartz.properties.org.quartz.scheduler.instanceId = AUTO
-
 spring.quartz.properties.org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
 spring.quartz.properties.org.quartz.threadPool.threadCount = 10
 spring.quartz.properties.org.quartz.threadPool.threadPriority = 5
 spring.quartz.properties.org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true
-
 spring.quartz.properties.org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
 spring.quartz.properties.org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
 spring.quartz.properties.org.quartz.jobStore.tablePrefix = QRTZ_
@@ -86,7 +84,6 @@ spring.quartz.properties.org.quartz.jobStore.useProperties = true
 spring.quartz.properties.org.quartz.jobStore.isClustered = true
 spring.quartz.properties.org.quartz.jobStore.clusterCheckinInterval = 15000
 spring.quartz.properties.org.quartz.jobStore.dataSource = mySource
-
 spring.quartz.properties.org.quartz.dataSource.mySource.driver = com.mysql.jdbc.Driver
 spring.quartz.properties.org.quartz.dataSource.mySource.URL = jdbc:mysql://139.159.192.185:3306/qywechat?useUnicode=true&characterEncoding=utf-8
 spring.quartz.properties.org.quartz.dataSource.mySource.user = cdh

+ 1 - 1
mpwechatApp/src/main/resources/mapper/KeyWordMapper.xml

@@ -65,7 +65,7 @@
     </select>
 
     <delete id="deleteMsgByRuleId">
-        delete m from message m join keyWordMessageRef kmr on m.msg_id = kmr.messageId where kmr.keyWordId=#{ruleId}
+        DELETE  from message m USING keyWordMessageRef kmr WHERE m.msg_id = kmr.messageId AND kmr.keyWordId=#{ruleId}
     </delete>
 
 </mapper>

+ 1 - 1
mpwechatApp/src/main/resources/mapper/MessageMapper.xml

@@ -155,7 +155,7 @@
         from timesMessage
         join message on timesMessage.messageId = message.msg_id
         WHERE timesMessage.disable =0 AND timesMessage.appid=#{appId} AND (timesMessage.week=#{week} OR timesMessage.week=0)
-        AND timesMessage.beginTime &lt;= #{nowTime} AND timesMessage.endTime &gt;= #{nowTime}
+        AND timesMessage.beginTime &lt;= #{nowTime}::time AND timesMessage.endTime &gt;= #{nowTime}::time
         order by timesMessage.week desc
     </select>