Browse Source

实体更新

pengjing 1 year ago
parent
commit
b5bbb276ab
22 changed files with 3312 additions and 1182 deletions
  1. 835 561
      doc/就业驿站管理系统.pdb
  2. 800 546
      doc/就业驿站管理系统.pdm
  3. 55 1
      doc/待更新脚本
  4. 3 1
      src/main/java/com/hz/employmentsite/controller/WxController.java
  5. 2 2
      src/main/java/com/hz/employmentsite/mapper/WxMessagestatusMapper.java
  6. 31 0
      src/main/java/com/hz/employmentsite/mapper/WxMessagetempsettingFieldMapper.java
  7. 30 0
      src/main/java/com/hz/employmentsite/mapper/WxMessagetempsettingMapper.java
  8. 6 0
      src/main/java/com/hz/employmentsite/mapper/cquery/RecommendMgtCQuery.java
  9. 5 5
      src/main/java/com/hz/employmentsite/model/WxMessagestatus.java
  10. 28 28
      src/main/java/com/hz/employmentsite/model/WxMessagestatusExample.java
  11. 43 0
      src/main/java/com/hz/employmentsite/model/WxMessagetempsetting.java
  12. 479 0
      src/main/java/com/hz/employmentsite/model/WxMessagetempsettingExample.java
  13. 13 0
      src/main/java/com/hz/employmentsite/model/WxMessagetempsettingField.java
  14. 409 0
      src/main/java/com/hz/employmentsite/model/WxMessagetempsettingFieldExample.java
  15. 23 0
      src/main/java/com/hz/employmentsite/model/WxMessagetempsettingFieldKey.java
  16. 82 18
      src/main/java/com/hz/employmentsite/services/impl/WechatServiceImpl.java
  17. 47 1
      src/main/java/com/hz/employmentsite/services/impl/jobUserManager/RecommendMgtServiceImpl.java
  18. 6 2
      src/main/java/com/hz/employmentsite/services/service/WechatService.java
  19. 17 17
      src/main/resources/mapping/WxMessagestatusMapper.xml
  20. 181 0
      src/main/resources/mapping/WxMessagetempsettingFieldMapper.xml
  21. 196 0
      src/main/resources/mapping/WxMessagetempsettingMapper.xml
  22. 21 0
      src/main/resources/mapping/cquery/RecommendMgtCQuery.xml

File diff suppressed because it is too large
+ 835 - 561
doc/就业驿站管理系统.pdb


File diff suppressed because it is too large
+ 800 - 546
doc/就业驿站管理系统.pdm


+ 55 - 1
doc/待更新脚本

@@ -118,4 +118,58 @@ VALUES
 (UUID(), '', 'CompanyType', 4, '股份有限公司', 4, 1, 0),
 (UUID(), '', 'CompanyType', 4, '股份有限公司', 4, 1, 0),
 (UUID(), '', 'CompanyType', 5, '私营企业', 5, 1, 0),
 (UUID(), '', 'CompanyType', 5, '私营企业', 5, 1, 0),
 (UUID(), '', 'CompanyType', 6, '中外合资企业', 6, 1, 0),
 (UUID(), '', 'CompanyType', 6, '中外合资企业', 6, 1, 0),
-(UUID(), '', 'CompanyType', 7, '外资企业', 7, 1, 0)
+(UUID(), '', 'CompanyType', 7, '外资企业', 7, 1, 0);
+
+
+-- 2024.4.18
+alter table pc_company add openId varchar(300) comment '微信openid';
+alter table pc_jobuser add openId varchar(300) comment '微信openid';
+alter table pc_recommend_mgt add isSendCompany bit comment '是否推送给公司';
+alter table pc_recommend_mgt add isSendUser bit comment '是否推送给求职人员';
+
+create table wx_messageStatus
+(
+    messageStatus        varchar(50) not null comment '唯一ID',
+    openId               varchar(300) comment '微信openId',
+    sourceId             varchar(50) comment '业务ID',
+    content              text comment '推送内容',
+    sendTime             datetime comment '推送时间',
+    recordStatus         int comment '状态,0未推送,1已推送',
+    createUserID         varchar(50) comment '创建人',
+    createTime           datetime comment '创建时间',
+    modifyUserID         varchar(50) comment '修改人',
+    modifyTime           datetime comment '修改时间',
+    primary key (messageStatus)
+);
+
+
+create table wx_messageTempSetting
+(
+    templateNo           varchar(10) not null comment '自编唯一',
+    templateName         varchar(50) comment '自编名称',
+    templateId           varchar(300) comment '微信公众号生成',
+    url                  varchar(300) comment '手机端路由地址,如/login?userId=234',
+    primary key (templateNo)
+);
+
+create table wx_messageTempSetting_field
+(
+    templateNo           varchar(10) not null comment '自编唯一',
+    wxFieldName          varchar(30) not null comment '微信字段名称',
+    sysFieldName         varchar(30) comment '系统字段名称',
+    primary key (templateNo, wxFieldName)
+);
+
+alter table wx_messageTempSetting_field add constraint FK_Reference_26 foreign key (templateNo)
+    references wx_messageTempSetting (templateNo) on delete restrict on update restrict;
+
+
+insert into wx_messageTempSetting
+values('toCompany','-R2xeAeey7rOKN5VAuUr8cFMsJFlFp7ksN7m6H5_5VU','应聘人员信息通知','/wxMessage/jobUserInfo');
+insert into wx_messageTempSetting
+values('toUser','hSE-nWMrspk2uHlJ9BahP4FJo9nCOUpnQiMAOQC2a6k','岗位信息通知','/wxMessage/companyInfo');
+
+insert into wx_messageTempSetting_field
+values('toCompany','thing28','userName'),('toCompany','phone_number34','usermobile'),('toCompany','thing10','userHuntPostName');
+insert into wx_messageTempSetting_field
+values('toUser','thing5','companyname'),('toUser','thing4','postName'),('toUser','character_string2','companymobile');

+ 3 - 1
src/main/java/com/hz/employmentsite/controller/WxController.java

@@ -15,6 +15,7 @@ import java.io.UnsupportedEncodingException;
 import java.net.URLDecoder;
 import java.net.URLDecoder;
 import java.util.HashMap;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Map;
+import java.util.UUID;
 
 
 @RestController
 @RestController
 @RequestMapping("/api/wx")
 @RequestMapping("/api/wx")
@@ -56,7 +57,8 @@ public class WxController {
         data.put("thing10","开发");
         data.put("thing10","开发");
 
 
 
 
-        return RespGenerstor.success(wechatService.sentMsg("admin",data,"http://www.bowintek.com/hzyz/mobile/index.html/#/jobUserInfo/index?userId=60ea0d5b-a75c-11ed-a6c5-7085c2a9999e"));
+        return RespGenerstor.success(wechatService.sendMsg("ow5Mm61JAlqqNhZzcV9lLqTDnBCs", UUID.randomUUID().toString(),"http://www.bowintek.com/hzyz/mobile/index.html/#/jobUserInfo/index?userId=60ea0d5b-a75c-11ed-a6c5-7085c2a9999e",
+                "-R2xeAeey7rOKN5VAuUr8cFMsJFlFp7ksN7m6H5_5VU",data));
     }
     }
 
 
 }
 }

+ 2 - 2
src/main/java/com/hz/employmentsite/mapper/WxMessagestatusMapper.java

@@ -10,7 +10,7 @@ public interface WxMessagestatusMapper {
 
 
     int deleteByExample(WxMessagestatusExample example);
     int deleteByExample(WxMessagestatusExample example);
 
 
-    int deleteByPrimaryKey(String messageStatus);
+    int deleteByPrimaryKey(String messageStatusId);
 
 
     int insert(WxMessagestatus row);
     int insert(WxMessagestatus row);
 
 
@@ -20,7 +20,7 @@ public interface WxMessagestatusMapper {
 
 
     List<WxMessagestatus> selectByExample(WxMessagestatusExample example);
     List<WxMessagestatus> selectByExample(WxMessagestatusExample example);
 
 
-    WxMessagestatus selectByPrimaryKey(String messageStatus);
+    WxMessagestatus selectByPrimaryKey(String messageStatusId);
 
 
     int updateByExampleSelective(@Param("row") WxMessagestatus row, @Param("example") WxMessagestatusExample example);
     int updateByExampleSelective(@Param("row") WxMessagestatus row, @Param("example") WxMessagestatusExample example);
 
 

+ 31 - 0
src/main/java/com/hz/employmentsite/mapper/WxMessagetempsettingFieldMapper.java

@@ -0,0 +1,31 @@
+package com.hz.employmentsite.mapper;
+
+import com.hz.employmentsite.model.WxMessagetempsettingField;
+import com.hz.employmentsite.model.WxMessagetempsettingFieldExample;
+import com.hz.employmentsite.model.WxMessagetempsettingFieldKey;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface WxMessagetempsettingFieldMapper {
+    long countByExample(WxMessagetempsettingFieldExample example);
+
+    int deleteByExample(WxMessagetempsettingFieldExample example);
+
+    int deleteByPrimaryKey(WxMessagetempsettingFieldKey key);
+
+    int insert(WxMessagetempsettingField row);
+
+    int insertSelective(WxMessagetempsettingField row);
+
+    List<WxMessagetempsettingField> selectByExample(WxMessagetempsettingFieldExample example);
+
+    WxMessagetempsettingField selectByPrimaryKey(WxMessagetempsettingFieldKey key);
+
+    int updateByExampleSelective(@Param("row") WxMessagetempsettingField row, @Param("example") WxMessagetempsettingFieldExample example);
+
+    int updateByExample(@Param("row") WxMessagetempsettingField row, @Param("example") WxMessagetempsettingFieldExample example);
+
+    int updateByPrimaryKeySelective(WxMessagetempsettingField row);
+
+    int updateByPrimaryKey(WxMessagetempsettingField row);
+}

+ 30 - 0
src/main/java/com/hz/employmentsite/mapper/WxMessagetempsettingMapper.java

@@ -0,0 +1,30 @@
+package com.hz.employmentsite.mapper;
+
+import com.hz.employmentsite.model.WxMessagetempsetting;
+import com.hz.employmentsite.model.WxMessagetempsettingExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface WxMessagetempsettingMapper {
+    long countByExample(WxMessagetempsettingExample example);
+
+    int deleteByExample(WxMessagetempsettingExample example);
+
+    int deleteByPrimaryKey(String templateNo);
+
+    int insert(WxMessagetempsetting row);
+
+    int insertSelective(WxMessagetempsetting row);
+
+    List<WxMessagetempsetting> selectByExample(WxMessagetempsettingExample example);
+
+    WxMessagetempsetting selectByPrimaryKey(String templateNo);
+
+    int updateByExampleSelective(@Param("row") WxMessagetempsetting row, @Param("example") WxMessagetempsettingExample example);
+
+    int updateByExample(@Param("row") WxMessagetempsetting row, @Param("example") WxMessagetempsettingExample example);
+
+    int updateByPrimaryKeySelective(WxMessagetempsetting row);
+
+    int updateByPrimaryKey(WxMessagetempsetting row);
+}

+ 6 - 0
src/main/java/com/hz/employmentsite/mapper/cquery/RecommendMgtCQuery.java

@@ -6,6 +6,7 @@ import com.hz.employmentsite.vo.jobUserManager.RecommendJobVo;
 import com.hz.employmentsite.vo.jobUserManager.RecommendMgtVo;
 import com.hz.employmentsite.vo.jobUserManager.RecommendMgtVo;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Param;
 
 
+import java.util.HashMap;
 import java.util.List;
 import java.util.List;
 
 
 public interface RecommendMgtCQuery {
 public interface RecommendMgtCQuery {
@@ -40,4 +41,9 @@ public interface RecommendMgtCQuery {
                                              @Param("cultureLeve") Integer cultureLeve, @Param("keyPersonType") Integer keyPersonType);
                                              @Param("cultureLeve") Integer cultureLeve, @Param("keyPersonType") Integer keyPersonType);
 
 
    List<ProfessionLevel> getProfessionLevelList();
    List<ProfessionLevel> getProfessionLevelList();
+
+
+    List<HashMap<String, Object>> getCompanypostToUsermessageList();
+    List<HashMap<String, Object>> getUserhuntpostToCompanymessageList();
+
 }
 }

+ 5 - 5
src/main/java/com/hz/employmentsite/model/WxMessagestatus.java

@@ -3,7 +3,7 @@ package com.hz.employmentsite.model;
 import java.util.Date;
 import java.util.Date;
 
 
 public class WxMessagestatus {
 public class WxMessagestatus {
-    private String messageStatus;
+    private String messageStatusId;
 
 
     private String openId;
     private String openId;
 
 
@@ -23,12 +23,12 @@ public class WxMessagestatus {
 
 
     private String content;
     private String content;
 
 
-    public String getMessageStatus() {
+    public String getMessageStatusId() {
-        return messageStatus;
+        return messageStatusId;
     }
     }
 
 
-    public void setMessageStatus(String messageStatus) {
+    public void setMessageStatusId(String messageStatusId) {
-        this.messageStatus = messageStatus == null ? null : messageStatus.trim();
+        this.messageStatusId = messageStatusId == null ? null : messageStatusId.trim();
     }
     }
 
 
     public String getOpenId() {
     public String getOpenId() {

+ 28 - 28
src/main/java/com/hz/employmentsite/model/WxMessagestatusExample.java

@@ -105,73 +105,73 @@ public class WxMessagestatusExample {
             criteria.add(new Criterion(condition, value1, value2));
             criteria.add(new Criterion(condition, value1, value2));
         }
         }
 
 
-        public Criteria andMessageStatusIsNull() {
+        public Criteria andMessageStatusIdIsNull() {
-            addCriterion("messageStatus is null");
+            addCriterion("messageStatusId is null");
             return (Criteria) this;
             return (Criteria) this;
         }
         }
 
 
-        public Criteria andMessageStatusIsNotNull() {
+        public Criteria andMessageStatusIdIsNotNull() {
-            addCriterion("messageStatus is not null");
+            addCriterion("messageStatusId is not null");
             return (Criteria) this;
             return (Criteria) this;
         }
         }
 
 
-        public Criteria andMessageStatusEqualTo(String value) {
+        public Criteria andMessageStatusIdEqualTo(String value) {
-            addCriterion("messageStatus =", value, "messageStatus");
+            addCriterion("messageStatusId =", value, "messageStatusId");
             return (Criteria) this;
             return (Criteria) this;
         }
         }
 
 
-        public Criteria andMessageStatusNotEqualTo(String value) {
+        public Criteria andMessageStatusIdNotEqualTo(String value) {
-            addCriterion("messageStatus <>", value, "messageStatus");
+            addCriterion("messageStatusId <>", value, "messageStatusId");
             return (Criteria) this;
             return (Criteria) this;
         }
         }
 
 
-        public Criteria andMessageStatusGreaterThan(String value) {
+        public Criteria andMessageStatusIdGreaterThan(String value) {
-            addCriterion("messageStatus >", value, "messageStatus");
+            addCriterion("messageStatusId >", value, "messageStatusId");
             return (Criteria) this;
             return (Criteria) this;
         }
         }
 
 
-        public Criteria andMessageStatusGreaterThanOrEqualTo(String value) {
+        public Criteria andMessageStatusIdGreaterThanOrEqualTo(String value) {
-            addCriterion("messageStatus >=", value, "messageStatus");
+            addCriterion("messageStatusId >=", value, "messageStatusId");
             return (Criteria) this;
             return (Criteria) this;
         }
         }
 
 
-        public Criteria andMessageStatusLessThan(String value) {
+        public Criteria andMessageStatusIdLessThan(String value) {
-            addCriterion("messageStatus <", value, "messageStatus");
+            addCriterion("messageStatusId <", value, "messageStatusId");
             return (Criteria) this;
             return (Criteria) this;
         }
         }
 
 
-        public Criteria andMessageStatusLessThanOrEqualTo(String value) {
+        public Criteria andMessageStatusIdLessThanOrEqualTo(String value) {
-            addCriterion("messageStatus <=", value, "messageStatus");
+            addCriterion("messageStatusId <=", value, "messageStatusId");
             return (Criteria) this;
             return (Criteria) this;
         }
         }
 
 
-        public Criteria andMessageStatusLike(String value) {
+        public Criteria andMessageStatusIdLike(String value) {
-            addCriterion("messageStatus like", value, "messageStatus");
+            addCriterion("messageStatusId like", value, "messageStatusId");
             return (Criteria) this;
             return (Criteria) this;
         }
         }
 
 
-        public Criteria andMessageStatusNotLike(String value) {
+        public Criteria andMessageStatusIdNotLike(String value) {
-            addCriterion("messageStatus not like", value, "messageStatus");
+            addCriterion("messageStatusId not like", value, "messageStatusId");
             return (Criteria) this;
             return (Criteria) this;
         }
         }
 
 
-        public Criteria andMessageStatusIn(List<String> values) {
+        public Criteria andMessageStatusIdIn(List<String> values) {
-            addCriterion("messageStatus in", values, "messageStatus");
+            addCriterion("messageStatusId in", values, "messageStatusId");
             return (Criteria) this;
             return (Criteria) this;
         }
         }
 
 
-        public Criteria andMessageStatusNotIn(List<String> values) {
+        public Criteria andMessageStatusIdNotIn(List<String> values) {
-            addCriterion("messageStatus not in", values, "messageStatus");
+            addCriterion("messageStatusId not in", values, "messageStatusId");
             return (Criteria) this;
             return (Criteria) this;
         }
         }
 
 
-        public Criteria andMessageStatusBetween(String value1, String value2) {
+        public Criteria andMessageStatusIdBetween(String value1, String value2) {
-            addCriterion("messageStatus between", value1, value2, "messageStatus");
+            addCriterion("messageStatusId between", value1, value2, "messageStatusId");
             return (Criteria) this;
             return (Criteria) this;
         }
         }
 
 
-        public Criteria andMessageStatusNotBetween(String value1, String value2) {
+        public Criteria andMessageStatusIdNotBetween(String value1, String value2) {
-            addCriterion("messageStatus not between", value1, value2, "messageStatus");
+            addCriterion("messageStatusId not between", value1, value2, "messageStatusId");
             return (Criteria) this;
             return (Criteria) this;
         }
         }
 
 

+ 43 - 0
src/main/java/com/hz/employmentsite/model/WxMessagetempsetting.java

@@ -0,0 +1,43 @@
+package com.hz.employmentsite.model;
+
+public class WxMessagetempsetting {
+    private String templateNo;
+
+    private String templateName;
+
+    private String templateId;
+
+    private String url;
+
+    public String getTemplateNo() {
+        return templateNo;
+    }
+
+    public void setTemplateNo(String templateNo) {
+        this.templateNo = templateNo == null ? null : templateNo.trim();
+    }
+
+    public String getTemplateName() {
+        return templateName;
+    }
+
+    public void setTemplateName(String templateName) {
+        this.templateName = templateName == null ? null : templateName.trim();
+    }
+
+    public String getTemplateId() {
+        return templateId;
+    }
+
+    public void setTemplateId(String templateId) {
+        this.templateId = templateId == null ? null : templateId.trim();
+    }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url == null ? null : url.trim();
+    }
+}

+ 479 - 0
src/main/java/com/hz/employmentsite/model/WxMessagetempsettingExample.java

@@ -0,0 +1,479 @@
+package com.hz.employmentsite.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class WxMessagetempsettingExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public WxMessagetempsettingExample() {
+        oredCriteria = new ArrayList<>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andTemplateNoIsNull() {
+            addCriterion("templateNo is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNoIsNotNull() {
+            addCriterion("templateNo is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNoEqualTo(String value) {
+            addCriterion("templateNo =", value, "templateNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNoNotEqualTo(String value) {
+            addCriterion("templateNo <>", value, "templateNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNoGreaterThan(String value) {
+            addCriterion("templateNo >", value, "templateNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNoGreaterThanOrEqualTo(String value) {
+            addCriterion("templateNo >=", value, "templateNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNoLessThan(String value) {
+            addCriterion("templateNo <", value, "templateNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNoLessThanOrEqualTo(String value) {
+            addCriterion("templateNo <=", value, "templateNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNoLike(String value) {
+            addCriterion("templateNo like", value, "templateNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNoNotLike(String value) {
+            addCriterion("templateNo not like", value, "templateNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNoIn(List<String> values) {
+            addCriterion("templateNo in", values, "templateNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNoNotIn(List<String> values) {
+            addCriterion("templateNo not in", values, "templateNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNoBetween(String value1, String value2) {
+            addCriterion("templateNo between", value1, value2, "templateNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNoNotBetween(String value1, String value2) {
+            addCriterion("templateNo not between", value1, value2, "templateNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNameIsNull() {
+            addCriterion("templateName is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNameIsNotNull() {
+            addCriterion("templateName is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNameEqualTo(String value) {
+            addCriterion("templateName =", value, "templateName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNameNotEqualTo(String value) {
+            addCriterion("templateName <>", value, "templateName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNameGreaterThan(String value) {
+            addCriterion("templateName >", value, "templateName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNameGreaterThanOrEqualTo(String value) {
+            addCriterion("templateName >=", value, "templateName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNameLessThan(String value) {
+            addCriterion("templateName <", value, "templateName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNameLessThanOrEqualTo(String value) {
+            addCriterion("templateName <=", value, "templateName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNameLike(String value) {
+            addCriterion("templateName like", value, "templateName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNameNotLike(String value) {
+            addCriterion("templateName not like", value, "templateName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNameIn(List<String> values) {
+            addCriterion("templateName in", values, "templateName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNameNotIn(List<String> values) {
+            addCriterion("templateName not in", values, "templateName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNameBetween(String value1, String value2) {
+            addCriterion("templateName between", value1, value2, "templateName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNameNotBetween(String value1, String value2) {
+            addCriterion("templateName not between", value1, value2, "templateName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateIdIsNull() {
+            addCriterion("templateId is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateIdIsNotNull() {
+            addCriterion("templateId is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateIdEqualTo(String value) {
+            addCriterion("templateId =", value, "templateId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateIdNotEqualTo(String value) {
+            addCriterion("templateId <>", value, "templateId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateIdGreaterThan(String value) {
+            addCriterion("templateId >", value, "templateId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateIdGreaterThanOrEqualTo(String value) {
+            addCriterion("templateId >=", value, "templateId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateIdLessThan(String value) {
+            addCriterion("templateId <", value, "templateId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateIdLessThanOrEqualTo(String value) {
+            addCriterion("templateId <=", value, "templateId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateIdLike(String value) {
+            addCriterion("templateId like", value, "templateId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateIdNotLike(String value) {
+            addCriterion("templateId not like", value, "templateId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateIdIn(List<String> values) {
+            addCriterion("templateId in", values, "templateId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateIdNotIn(List<String> values) {
+            addCriterion("templateId not in", values, "templateId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateIdBetween(String value1, String value2) {
+            addCriterion("templateId between", value1, value2, "templateId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateIdNotBetween(String value1, String value2) {
+            addCriterion("templateId not between", value1, value2, "templateId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUrlIsNull() {
+            addCriterion("url is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUrlIsNotNull() {
+            addCriterion("url is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUrlEqualTo(String value) {
+            addCriterion("url =", value, "url");
+            return (Criteria) this;
+        }
+
+        public Criteria andUrlNotEqualTo(String value) {
+            addCriterion("url <>", value, "url");
+            return (Criteria) this;
+        }
+
+        public Criteria andUrlGreaterThan(String value) {
+            addCriterion("url >", value, "url");
+            return (Criteria) this;
+        }
+
+        public Criteria andUrlGreaterThanOrEqualTo(String value) {
+            addCriterion("url >=", value, "url");
+            return (Criteria) this;
+        }
+
+        public Criteria andUrlLessThan(String value) {
+            addCriterion("url <", value, "url");
+            return (Criteria) this;
+        }
+
+        public Criteria andUrlLessThanOrEqualTo(String value) {
+            addCriterion("url <=", value, "url");
+            return (Criteria) this;
+        }
+
+        public Criteria andUrlLike(String value) {
+            addCriterion("url like", value, "url");
+            return (Criteria) this;
+        }
+
+        public Criteria andUrlNotLike(String value) {
+            addCriterion("url not like", value, "url");
+            return (Criteria) this;
+        }
+
+        public Criteria andUrlIn(List<String> values) {
+            addCriterion("url in", values, "url");
+            return (Criteria) this;
+        }
+
+        public Criteria andUrlNotIn(List<String> values) {
+            addCriterion("url not in", values, "url");
+            return (Criteria) this;
+        }
+
+        public Criteria andUrlBetween(String value1, String value2) {
+            addCriterion("url between", value1, value2, "url");
+            return (Criteria) this;
+        }
+
+        public Criteria andUrlNotBetween(String value1, String value2) {
+            addCriterion("url not between", value1, value2, "url");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 13 - 0
src/main/java/com/hz/employmentsite/model/WxMessagetempsettingField.java

@@ -0,0 +1,13 @@
+package com.hz.employmentsite.model;
+
+public class WxMessagetempsettingField extends WxMessagetempsettingFieldKey {
+    private String sysFieldName;
+
+    public String getSysFieldName() {
+        return sysFieldName;
+    }
+
+    public void setSysFieldName(String sysFieldName) {
+        this.sysFieldName = sysFieldName == null ? null : sysFieldName.trim();
+    }
+}

+ 409 - 0
src/main/java/com/hz/employmentsite/model/WxMessagetempsettingFieldExample.java

@@ -0,0 +1,409 @@
+package com.hz.employmentsite.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class WxMessagetempsettingFieldExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public WxMessagetempsettingFieldExample() {
+        oredCriteria = new ArrayList<>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andTemplateNoIsNull() {
+            addCriterion("templateNo is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNoIsNotNull() {
+            addCriterion("templateNo is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNoEqualTo(String value) {
+            addCriterion("templateNo =", value, "templateNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNoNotEqualTo(String value) {
+            addCriterion("templateNo <>", value, "templateNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNoGreaterThan(String value) {
+            addCriterion("templateNo >", value, "templateNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNoGreaterThanOrEqualTo(String value) {
+            addCriterion("templateNo >=", value, "templateNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNoLessThan(String value) {
+            addCriterion("templateNo <", value, "templateNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNoLessThanOrEqualTo(String value) {
+            addCriterion("templateNo <=", value, "templateNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNoLike(String value) {
+            addCriterion("templateNo like", value, "templateNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNoNotLike(String value) {
+            addCriterion("templateNo not like", value, "templateNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNoIn(List<String> values) {
+            addCriterion("templateNo in", values, "templateNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNoNotIn(List<String> values) {
+            addCriterion("templateNo not in", values, "templateNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNoBetween(String value1, String value2) {
+            addCriterion("templateNo between", value1, value2, "templateNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemplateNoNotBetween(String value1, String value2) {
+            addCriterion("templateNo not between", value1, value2, "templateNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andWxFieldNameIsNull() {
+            addCriterion("wxFieldName is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andWxFieldNameIsNotNull() {
+            addCriterion("wxFieldName is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andWxFieldNameEqualTo(String value) {
+            addCriterion("wxFieldName =", value, "wxFieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andWxFieldNameNotEqualTo(String value) {
+            addCriterion("wxFieldName <>", value, "wxFieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andWxFieldNameGreaterThan(String value) {
+            addCriterion("wxFieldName >", value, "wxFieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andWxFieldNameGreaterThanOrEqualTo(String value) {
+            addCriterion("wxFieldName >=", value, "wxFieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andWxFieldNameLessThan(String value) {
+            addCriterion("wxFieldName <", value, "wxFieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andWxFieldNameLessThanOrEqualTo(String value) {
+            addCriterion("wxFieldName <=", value, "wxFieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andWxFieldNameLike(String value) {
+            addCriterion("wxFieldName like", value, "wxFieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andWxFieldNameNotLike(String value) {
+            addCriterion("wxFieldName not like", value, "wxFieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andWxFieldNameIn(List<String> values) {
+            addCriterion("wxFieldName in", values, "wxFieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andWxFieldNameNotIn(List<String> values) {
+            addCriterion("wxFieldName not in", values, "wxFieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andWxFieldNameBetween(String value1, String value2) {
+            addCriterion("wxFieldName between", value1, value2, "wxFieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andWxFieldNameNotBetween(String value1, String value2) {
+            addCriterion("wxFieldName not between", value1, value2, "wxFieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andSysFieldNameIsNull() {
+            addCriterion("sysFieldName is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSysFieldNameIsNotNull() {
+            addCriterion("sysFieldName is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSysFieldNameEqualTo(String value) {
+            addCriterion("sysFieldName =", value, "sysFieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andSysFieldNameNotEqualTo(String value) {
+            addCriterion("sysFieldName <>", value, "sysFieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andSysFieldNameGreaterThan(String value) {
+            addCriterion("sysFieldName >", value, "sysFieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andSysFieldNameGreaterThanOrEqualTo(String value) {
+            addCriterion("sysFieldName >=", value, "sysFieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andSysFieldNameLessThan(String value) {
+            addCriterion("sysFieldName <", value, "sysFieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andSysFieldNameLessThanOrEqualTo(String value) {
+            addCriterion("sysFieldName <=", value, "sysFieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andSysFieldNameLike(String value) {
+            addCriterion("sysFieldName like", value, "sysFieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andSysFieldNameNotLike(String value) {
+            addCriterion("sysFieldName not like", value, "sysFieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andSysFieldNameIn(List<String> values) {
+            addCriterion("sysFieldName in", values, "sysFieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andSysFieldNameNotIn(List<String> values) {
+            addCriterion("sysFieldName not in", values, "sysFieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andSysFieldNameBetween(String value1, String value2) {
+            addCriterion("sysFieldName between", value1, value2, "sysFieldName");
+            return (Criteria) this;
+        }
+
+        public Criteria andSysFieldNameNotBetween(String value1, String value2) {
+            addCriterion("sysFieldName not between", value1, value2, "sysFieldName");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 23 - 0
src/main/java/com/hz/employmentsite/model/WxMessagetempsettingFieldKey.java

@@ -0,0 +1,23 @@
+package com.hz.employmentsite.model;
+
+public class WxMessagetempsettingFieldKey {
+    private String templateNo;
+
+    private String wxFieldName;
+
+    public String getTemplateNo() {
+        return templateNo;
+    }
+
+    public void setTemplateNo(String templateNo) {
+        this.templateNo = templateNo == null ? null : templateNo.trim();
+    }
+
+    public String getWxFieldName() {
+        return wxFieldName;
+    }
+
+    public void setWxFieldName(String wxFieldName) {
+        this.wxFieldName = wxFieldName == null ? null : wxFieldName.trim();
+    }
+}

+ 82 - 18
src/main/java/com/hz/employmentsite/services/impl/WechatServiceImpl.java

@@ -1,7 +1,13 @@
 package com.hz.employmentsite.services.impl;
 package com.hz.employmentsite.services.impl;
 
 
 import com.hz.employmentsite.AppConfig;
 import com.hz.employmentsite.AppConfig;
+import com.hz.employmentsite.mapper.WxMessagestatusMapper;
+import com.hz.employmentsite.mapper.WxMessagetempsettingMapper;
+import com.hz.employmentsite.model.WxMessagestatus;
+import com.hz.employmentsite.model.WxMessagestatusExample;
+import com.hz.employmentsite.model.WxMessagetempsetting;
 import com.hz.employmentsite.services.service.WechatService;
 import com.hz.employmentsite.services.service.WechatService;
+import com.hz.employmentsite.util.StringUtils;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 import me.chanjar.weixin.common.error.WxErrorException;
 import me.chanjar.weixin.common.error.WxErrorException;
 import me.chanjar.weixin.mp.api.WxMpService;
 import me.chanjar.weixin.mp.api.WxMpService;
@@ -12,10 +18,7 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
-import java.util.ArrayList;
+import java.util.*;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
 
 
 @Service("WechatService")
 @Service("WechatService")
 @Slf4j
 @Slf4j
@@ -27,6 +30,15 @@ public class WechatServiceImpl implements WechatService {
     @Autowired
     @Autowired
     private WxMpService wxMpService;
     private WxMpService wxMpService;
 
 
+    @Autowired
+    private WxMessagestatusMapper wxMessagestatusMapper;
+
+    @Autowired
+    private WxMessagetempsettingMapper wxMessagetempsettingMapper;
+
+    @Autowired
+    private StringUtils stringUtils;
+
     private final Logger logger;
     private final Logger logger;
 
 
     public WechatServiceImpl() {
     public WechatServiceImpl() {
@@ -41,41 +53,93 @@ public class WechatServiceImpl implements WechatService {
     public String getOpenId(String code) throws WxErrorException {
     public String getOpenId(String code) throws WxErrorException {
         String openId = wxMpService.oauth2getAccessToken(code).getOpenId();
         String openId = wxMpService.oauth2getAccessToken(code).getOpenId();
 
 
-        log.info("openId:"+ openId);
+        log.info("openId:" + openId);
 
 
         return openId;
         return openId;
     }
     }
 
 
-    @Override
+    private boolean sendMsg(String openId, String templateId, String url, Map<String, String> sentData) throws Exception {
-    public Integer sentMsg(String toUserId, Map<String,String> sentData,String url) throws Exception {
-        String openId = appConfig.testOpenId;
 
 
         //数据
         //数据
-        List<WxMpTemplateData> data=new ArrayList<>();
+        List<WxMpTemplateData> data = new ArrayList<>();
 
 
-        sentData.forEach((key,value)->{
+        sentData.forEach((key, value) -> {
-            data.add(new WxMpTemplateData(key,value));
+            data.add(new WxMpTemplateData(key, value));
         });
         });
 
 
         //2,推送消息
         //2,推送消息
         WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder()
         WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder()
                 .toUser(openId)//要推送的用户openid
                 .toUser(openId)//要推送的用户openid
                 .data(data) //数据
                 .data(data) //数据
-                .templateId(appConfig.wxMessageTemplateId)//模版id
+                .templateId(templateId)//模版id
                 .url(url) // 点击详情跳转地址
                 .url(url) // 点击详情跳转地址
                 .build();
                 .build();
         //发起推送
         //发起推送
         try {
         try {
-            String msg = wxMpService.getTemplateMsgService().sendTemplateMsg(templateMessage);
+            wxMpService.getTemplateMsgService().sendTemplateMsg(templateMessage);
-        } catch (Exception e) {
+            return true;
-            log.info("sentMsg:微信消息推送失败"+ e.getMessage());
+        } catch (Exception ex) {
-            e.printStackTrace();
+            log.info("sendMsg2:微信消息推送失败" + ex.getMessage());
-            throw new Exception("sentMsg:微信消息推送失败"+ e.getMessage());
+            ex.printStackTrace();
+            throw new Exception("sendMsg2:微信消息推送失败" + ex.getMessage());
+        }
+    }
+
+    @Override
+    public boolean sendMsg(String openId, String sourceId, String url, String templateId, Map<String, String> sendData) throws Exception {
+        if (stringUtils.IsNullOrEmpty(openId))
+            throw new Exception("openId为空!");
+        if (stringUtils.IsNullOrEmpty(sourceId))
+            throw new Exception("sourceId为空!");
+        if (stringUtils.IsNullOrEmpty(sourceId))
+            throw new Exception("templateId为空!");
+        if (sendData == null || sendData.values().size() == 0)
+            throw new Exception("sendData为空!");
+
+        WxMessagestatusExample exp = new WxMessagestatusExample();
+        WxMessagestatusExample.Criteria cri = exp.or();
+        cri.andOpenIdEqualTo(openId);
+        cri.andSourceIdEqualTo(sourceId);
+
+        WxMessagestatus wxMessagestatus = wxMessagestatusMapper.selectByExample(exp).stream().findFirst().orElse(null);
+
+        if (wxMessagestatus != null && wxMessagestatus.getRecordStatus().equals(1))
+            throw new Exception("该消息已有成功推送记录,请勿重复推送!");
+
+        if (wxMessagestatus == null) {
+            wxMessagestatus = new WxMessagestatus();
+            wxMessagestatus.setMessageStatusId(UUID.randomUUID().toString());
+            wxMessagestatus.setOpenId(openId);
+            wxMessagestatus.setSourceId(sourceId);
+            wxMessagestatus.setContent(sendData.toString());
+            wxMessagestatus.setRecordStatus(0);
+            wxMessagestatus.setCreateTime(new Date());
+
+            wxMessagestatusMapper.insert(wxMessagestatus);
+        }
+
+        try {
+            sendMsg(openId, templateId, url, sendData);
+
+            wxMessagestatus.setRecordStatus(1);
+            wxMessagestatus.setSendTime(new Date());
+            wxMessagestatusMapper.updateByPrimaryKey(wxMessagestatus);
+
+            return true;
+        } catch (Exception ex) {
+            log.info("sendMsg1:微信消息推送失败" + ex.getMessage());
+            ex.printStackTrace();
+            return false;
         }
         }
 
 
-        return 1;
     }
     }
 
 
+    @Override
+    public List<WxMessagetempsetting> getWxMessagetempsettingList(){
+        List<WxMessagetempsetting> dataList = wxMessagetempsettingMapper.selectByExample(null);
+
+        return dataList;
+    }
 
 
 
 
 }
 }

+ 47 - 1
src/main/java/com/hz/employmentsite/services/impl/jobUserManager/RecommendMgtServiceImpl.java

@@ -5,6 +5,8 @@ import com.github.pagehelper.PageInfo;
 import com.hz.employmentsite.mapper.PcRecommendMgtMapper;
 import com.hz.employmentsite.mapper.PcRecommendMgtMapper;
 import com.hz.employmentsite.mapper.cquery.RecommendMgtCQuery;
 import com.hz.employmentsite.mapper.cquery.RecommendMgtCQuery;
 import com.hz.employmentsite.model.PcRecommendMgt;
 import com.hz.employmentsite.model.PcRecommendMgt;
+import com.hz.employmentsite.model.WxMessagetempsetting;
+import com.hz.employmentsite.services.service.WechatService;
 import com.hz.employmentsite.services.service.jobUserManager.RecommendMgtService;
 import com.hz.employmentsite.services.service.jobUserManager.RecommendMgtService;
 import com.hz.employmentsite.util.StringUtils;
 import com.hz.employmentsite.util.StringUtils;
 import com.hz.employmentsite.vo.jobUserManager.ProfessionLevel;
 import com.hz.employmentsite.vo.jobUserManager.ProfessionLevel;
@@ -26,6 +28,9 @@ public class RecommendMgtServiceImpl implements RecommendMgtService {
     @Autowired
     @Autowired
     private StringUtils stringUtils;
     private StringUtils stringUtils;
 
 
+    @Autowired
+    private WechatService wechatService;
+
     @Override
     @Override
     public PageInfo<RecommendMgtVo> getList(Integer page, Integer rows, String name, String companyName, Integer recommendType, Integer entryState, String pushName, String professionName) {
     public PageInfo<RecommendMgtVo> getList(Integer page, Integer rows, String name, String companyName, Integer recommendType, Integer entryState, String pushName, String professionName) {
         PageHelper.startPage(page, rows);
         PageHelper.startPage(page, rows);
@@ -103,7 +108,48 @@ public class RecommendMgtServiceImpl implements RecommendMgtService {
         return result;
         return result;
     }
     }
 
 
-    public List<ProfessionLevel> getProfessionLevelList(){
+    public List<ProfessionLevel> getProfessionLevelList() {
         return recommendMgtCQuery.getProfessionLevelList();
         return recommendMgtCQuery.getProfessionLevelList();
     }
     }
+
+
+    public void SendWxMessage() {
+        List<HashMap<String, Object>> toUserList = recommendMgtCQuery.getCompanypostToUsermessageList();
+        List<HashMap<String, Object>> toCompanyList = recommendMgtCQuery.getUserhuntpostToCompanymessageList();
+
+        WxMessagetempsetting toUserTemp = wechatService.getWxMessagetempsettingList().stream().filter(it -> it.getTemplateNo().equals("toUser")).findFirst().orElse(null);
+        WxMessagetempsetting toCompanyTemp = wechatService.getWxMessagetempsettingList().stream().filter(it -> it.getTemplateNo().equals("toUser")).findFirst().orElse(null);
+
+        if (toUserTemp != null) {
+            toUserList.forEach(item -> {
+                try {
+                    String recommendmgtid = item.get("recommendmgtid").toString();
+
+                    PcRecommendMgt pcRecommendMgt = pcRecommendMgtMapper.selectByPrimaryKey(recommendmgtid);
+
+                    /*List<String> fields = Arrays.stream(toUserTemp.getFields().split("\\,")).toList();*/
+
+                   /* Map<String, String> data = new HashMap<>();
+                    fields.forEach(field->{
+                        data.put(field, item.get("field").toString());
+                    });*/
+
+
+                    /*boolean result = wechatService.sendMsg(item.get("userOpenId").toString(), recommendmgtid, toUserTemp.getUrl(), toUserTemp.getTemplateId(), data);
+
+                    if (result) {
+                        pcRecommendMgt.setIsSendUser(true);
+                        pcRecommendMgtMapper.updateByPrimaryKey(pcRecommendMgt);
+                    }*/
+                } catch (Exception e) {
+
+                }
+            });
+        }
+
+        if (toCompanyTemp != null) {
+
+        }
+
+    }
 }
 }

+ 6 - 2
src/main/java/com/hz/employmentsite/services/service/WechatService.java

@@ -1,15 +1,19 @@
 package com.hz.employmentsite.services.service;
 package com.hz.employmentsite.services.service;
 
 
+import com.hz.employmentsite.model.WxMessagetempsetting;
 import me.chanjar.weixin.common.error.WxErrorException;
 import me.chanjar.weixin.common.error.WxErrorException;
 
 
+import java.util.List;
 import java.util.Map;
 import java.util.Map;
 
 
 public interface WechatService {
 public interface WechatService {
 
 
     String getOAuthUrl(String redirectUrl);
     String getOAuthUrl(String redirectUrl);
 
 
-    Integer sentMsg(String toUserId, Map<String,String> sentData,String url) throws Exception;
-
     String getOpenId(String code) throws WxErrorException;
     String getOpenId(String code) throws WxErrorException;
 
 
+    boolean sendMsg(String openId, String sourceId, String url, String templateId, Map<String, String> sendData) throws Exception;
+
+    List<WxMessagetempsetting> getWxMessagetempsettingList();
+
 }
 }

+ 17 - 17
src/main/resources/mapping/WxMessagestatusMapper.xml

@@ -2,7 +2,7 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.hz.employmentsite.mapper.WxMessagestatusMapper">
 <mapper namespace="com.hz.employmentsite.mapper.WxMessagestatusMapper">
   <resultMap id="BaseResultMap" type="com.hz.employmentsite.model.WxMessagestatus">
   <resultMap id="BaseResultMap" type="com.hz.employmentsite.model.WxMessagestatus">
-    <id column="messageStatus" jdbcType="VARCHAR" property="messageStatus" />
+    <id column="messageStatusId" jdbcType="VARCHAR" property="messageStatusId" />
     <result column="openId" jdbcType="VARCHAR" property="openId" />
     <result column="openId" jdbcType="VARCHAR" property="openId" />
     <result column="sourceId" jdbcType="VARCHAR" property="sourceId" />
     <result column="sourceId" jdbcType="VARCHAR" property="sourceId" />
     <result column="sendTime" jdbcType="TIMESTAMP" property="sendTime" />
     <result column="sendTime" jdbcType="TIMESTAMP" property="sendTime" />
@@ -74,7 +74,7 @@
     </where>
     </where>
   </sql>
   </sql>
   <sql id="Base_Column_List">
   <sql id="Base_Column_List">
-    messageStatus, openId, sourceId, sendTime, recordStatus, createUserID, createTime, 
+    messageStatusId, openId, sourceId, sendTime, recordStatus, createUserID, createTime, 
     modifyUserID, modifyTime
     modifyUserID, modifyTime
   </sql>
   </sql>
   <sql id="Blob_Column_List">
   <sql id="Blob_Column_List">
@@ -116,11 +116,11 @@
     ,
     ,
     <include refid="Blob_Column_List" />
     <include refid="Blob_Column_List" />
     from wx_messagestatus
     from wx_messagestatus
-    where messageStatus = #{messageStatus,jdbcType=VARCHAR}
+    where messageStatusId = #{messageStatusId,jdbcType=VARCHAR}
   </select>
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
   <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
     delete from wx_messagestatus
     delete from wx_messagestatus
-    where messageStatus = #{messageStatus,jdbcType=VARCHAR}
+    where messageStatusId = #{messageStatusId,jdbcType=VARCHAR}
   </delete>
   </delete>
   <delete id="deleteByExample" parameterType="com.hz.employmentsite.model.WxMessagestatusExample">
   <delete id="deleteByExample" parameterType="com.hz.employmentsite.model.WxMessagestatusExample">
     delete from wx_messagestatus
     delete from wx_messagestatus
@@ -129,11 +129,11 @@
     </if>
     </if>
   </delete>
   </delete>
   <insert id="insert" parameterType="com.hz.employmentsite.model.WxMessagestatus">
   <insert id="insert" parameterType="com.hz.employmentsite.model.WxMessagestatus">
-    insert into wx_messagestatus (messageStatus, openId, sourceId, 
+    insert into wx_messagestatus (messageStatusId, openId, sourceId, 
       sendTime, recordStatus, createUserID, 
       sendTime, recordStatus, createUserID, 
       createTime, modifyUserID, modifyTime, 
       createTime, modifyUserID, modifyTime, 
       content)
       content)
-    values (#{messageStatus,jdbcType=VARCHAR}, #{openId,jdbcType=VARCHAR}, #{sourceId,jdbcType=VARCHAR}, 
+    values (#{messageStatusId,jdbcType=VARCHAR}, #{openId,jdbcType=VARCHAR}, #{sourceId,jdbcType=VARCHAR}, 
       #{sendTime,jdbcType=TIMESTAMP}, #{recordStatus,jdbcType=INTEGER}, #{createUserID,jdbcType=VARCHAR}, 
       #{sendTime,jdbcType=TIMESTAMP}, #{recordStatus,jdbcType=INTEGER}, #{createUserID,jdbcType=VARCHAR}, 
       #{createTime,jdbcType=TIMESTAMP}, #{modifyUserID,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}, 
       #{createTime,jdbcType=TIMESTAMP}, #{modifyUserID,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}, 
       #{content,jdbcType=LONGVARCHAR})
       #{content,jdbcType=LONGVARCHAR})
@@ -141,8 +141,8 @@
   <insert id="insertSelective" parameterType="com.hz.employmentsite.model.WxMessagestatus">
   <insert id="insertSelective" parameterType="com.hz.employmentsite.model.WxMessagestatus">
     insert into wx_messagestatus
     insert into wx_messagestatus
     <trim prefix="(" suffix=")" suffixOverrides=",">
     <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="messageStatus != null">
+      <if test="messageStatusId != null">
-        messageStatus,
+        messageStatusId,
       </if>
       </if>
       <if test="openId != null">
       <if test="openId != null">
         openId,
         openId,
@@ -173,8 +173,8 @@
       </if>
       </if>
     </trim>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
     <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="messageStatus != null">
+      <if test="messageStatusId != null">
-        #{messageStatus,jdbcType=VARCHAR},
+        #{messageStatusId,jdbcType=VARCHAR},
       </if>
       </if>
       <if test="openId != null">
       <if test="openId != null">
         #{openId,jdbcType=VARCHAR},
         #{openId,jdbcType=VARCHAR},
@@ -214,8 +214,8 @@
   <update id="updateByExampleSelective" parameterType="map">
   <update id="updateByExampleSelective" parameterType="map">
     update wx_messagestatus
     update wx_messagestatus
     <set>
     <set>
-      <if test="row.messageStatus != null">
+      <if test="row.messageStatusId != null">
-        messageStatus = #{row.messageStatus,jdbcType=VARCHAR},
+        messageStatusId = #{row.messageStatusId,jdbcType=VARCHAR},
       </if>
       </if>
       <if test="row.openId != null">
       <if test="row.openId != null">
         openId = #{row.openId,jdbcType=VARCHAR},
         openId = #{row.openId,jdbcType=VARCHAR},
@@ -251,7 +251,7 @@
   </update>
   </update>
   <update id="updateByExampleWithBLOBs" parameterType="map">
   <update id="updateByExampleWithBLOBs" parameterType="map">
     update wx_messagestatus
     update wx_messagestatus
-    set messageStatus = #{row.messageStatus,jdbcType=VARCHAR},
+    set messageStatusId = #{row.messageStatusId,jdbcType=VARCHAR},
       openId = #{row.openId,jdbcType=VARCHAR},
       openId = #{row.openId,jdbcType=VARCHAR},
       sourceId = #{row.sourceId,jdbcType=VARCHAR},
       sourceId = #{row.sourceId,jdbcType=VARCHAR},
       sendTime = #{row.sendTime,jdbcType=TIMESTAMP},
       sendTime = #{row.sendTime,jdbcType=TIMESTAMP},
@@ -267,7 +267,7 @@
   </update>
   </update>
   <update id="updateByExample" parameterType="map">
   <update id="updateByExample" parameterType="map">
     update wx_messagestatus
     update wx_messagestatus
-    set messageStatus = #{row.messageStatus,jdbcType=VARCHAR},
+    set messageStatusId = #{row.messageStatusId,jdbcType=VARCHAR},
       openId = #{row.openId,jdbcType=VARCHAR},
       openId = #{row.openId,jdbcType=VARCHAR},
       sourceId = #{row.sourceId,jdbcType=VARCHAR},
       sourceId = #{row.sourceId,jdbcType=VARCHAR},
       sendTime = #{row.sendTime,jdbcType=TIMESTAMP},
       sendTime = #{row.sendTime,jdbcType=TIMESTAMP},
@@ -311,7 +311,7 @@
         content = #{content,jdbcType=LONGVARCHAR},
         content = #{content,jdbcType=LONGVARCHAR},
       </if>
       </if>
     </set>
     </set>
-    where messageStatus = #{messageStatus,jdbcType=VARCHAR}
+    where messageStatusId = #{messageStatusId,jdbcType=VARCHAR}
   </update>
   </update>
   <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.hz.employmentsite.model.WxMessagestatus">
   <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.hz.employmentsite.model.WxMessagestatus">
     update wx_messagestatus
     update wx_messagestatus
@@ -324,7 +324,7 @@
       modifyUserID = #{modifyUserID,jdbcType=VARCHAR},
       modifyUserID = #{modifyUserID,jdbcType=VARCHAR},
       modifyTime = #{modifyTime,jdbcType=TIMESTAMP},
       modifyTime = #{modifyTime,jdbcType=TIMESTAMP},
       content = #{content,jdbcType=LONGVARCHAR}
       content = #{content,jdbcType=LONGVARCHAR}
-    where messageStatus = #{messageStatus,jdbcType=VARCHAR}
+    where messageStatusId = #{messageStatusId,jdbcType=VARCHAR}
   </update>
   </update>
   <update id="updateByPrimaryKey" parameterType="com.hz.employmentsite.model.WxMessagestatus">
   <update id="updateByPrimaryKey" parameterType="com.hz.employmentsite.model.WxMessagestatus">
     update wx_messagestatus
     update wx_messagestatus
@@ -336,6 +336,6 @@
       createTime = #{createTime,jdbcType=TIMESTAMP},
       createTime = #{createTime,jdbcType=TIMESTAMP},
       modifyUserID = #{modifyUserID,jdbcType=VARCHAR},
       modifyUserID = #{modifyUserID,jdbcType=VARCHAR},
       modifyTime = #{modifyTime,jdbcType=TIMESTAMP}
       modifyTime = #{modifyTime,jdbcType=TIMESTAMP}
-    where messageStatus = #{messageStatus,jdbcType=VARCHAR}
+    where messageStatusId = #{messageStatusId,jdbcType=VARCHAR}
   </update>
   </update>
 </mapper>
 </mapper>

+ 181 - 0
src/main/resources/mapping/WxMessagetempsettingFieldMapper.xml

@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hz.employmentsite.mapper.WxMessagetempsettingFieldMapper">
+  <resultMap id="BaseResultMap" type="com.hz.employmentsite.model.WxMessagetempsettingField">
+    <id column="templateNo" jdbcType="VARCHAR" property="templateNo" />
+    <id column="wxFieldName" jdbcType="VARCHAR" property="wxFieldName" />
+    <result column="sysFieldName" jdbcType="VARCHAR" property="sysFieldName" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    templateNo, wxFieldName, sysFieldName
+  </sql>
+  <select id="selectByExample" parameterType="com.hz.employmentsite.model.WxMessagetempsettingFieldExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from wx_messagetempsetting_field
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="com.hz.employmentsite.model.WxMessagetempsettingFieldKey" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from wx_messagetempsetting_field
+    where templateNo = #{templateNo,jdbcType=VARCHAR}
+      and wxFieldName = #{wxFieldName,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="com.hz.employmentsite.model.WxMessagetempsettingFieldKey">
+    delete from wx_messagetempsetting_field
+    where templateNo = #{templateNo,jdbcType=VARCHAR}
+      and wxFieldName = #{wxFieldName,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.hz.employmentsite.model.WxMessagetempsettingFieldExample">
+    delete from wx_messagetempsetting_field
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.hz.employmentsite.model.WxMessagetempsettingField">
+    insert into wx_messagetempsetting_field (templateNo, wxFieldName, sysFieldName
+      )
+    values (#{templateNo,jdbcType=VARCHAR}, #{wxFieldName,jdbcType=VARCHAR}, #{sysFieldName,jdbcType=VARCHAR}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.hz.employmentsite.model.WxMessagetempsettingField">
+    insert into wx_messagetempsetting_field
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="templateNo != null">
+        templateNo,
+      </if>
+      <if test="wxFieldName != null">
+        wxFieldName,
+      </if>
+      <if test="sysFieldName != null">
+        sysFieldName,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="templateNo != null">
+        #{templateNo,jdbcType=VARCHAR},
+      </if>
+      <if test="wxFieldName != null">
+        #{wxFieldName,jdbcType=VARCHAR},
+      </if>
+      <if test="sysFieldName != null">
+        #{sysFieldName,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.hz.employmentsite.model.WxMessagetempsettingFieldExample" resultType="java.lang.Long">
+    select count(*) from wx_messagetempsetting_field
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update wx_messagetempsetting_field
+    <set>
+      <if test="row.templateNo != null">
+        templateNo = #{row.templateNo,jdbcType=VARCHAR},
+      </if>
+      <if test="row.wxFieldName != null">
+        wxFieldName = #{row.wxFieldName,jdbcType=VARCHAR},
+      </if>
+      <if test="row.sysFieldName != null">
+        sysFieldName = #{row.sysFieldName,jdbcType=VARCHAR},
+      </if>
+    </set>
+    <if test="example != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update wx_messagetempsetting_field
+    set templateNo = #{row.templateNo,jdbcType=VARCHAR},
+      wxFieldName = #{row.wxFieldName,jdbcType=VARCHAR},
+      sysFieldName = #{row.sysFieldName,jdbcType=VARCHAR}
+    <if test="example != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.hz.employmentsite.model.WxMessagetempsettingField">
+    update wx_messagetempsetting_field
+    <set>
+      <if test="sysFieldName != null">
+        sysFieldName = #{sysFieldName,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where templateNo = #{templateNo,jdbcType=VARCHAR}
+      and wxFieldName = #{wxFieldName,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.hz.employmentsite.model.WxMessagetempsettingField">
+    update wx_messagetempsetting_field
+    set sysFieldName = #{sysFieldName,jdbcType=VARCHAR}
+    where templateNo = #{templateNo,jdbcType=VARCHAR}
+      and wxFieldName = #{wxFieldName,jdbcType=VARCHAR}
+  </update>
+</mapper>

+ 196 - 0
src/main/resources/mapping/WxMessagetempsettingMapper.xml

@@ -0,0 +1,196 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hz.employmentsite.mapper.WxMessagetempsettingMapper">
+  <resultMap id="BaseResultMap" type="com.hz.employmentsite.model.WxMessagetempsetting">
+    <id column="templateNo" jdbcType="VARCHAR" property="templateNo" />
+    <result column="templateName" jdbcType="VARCHAR" property="templateName" />
+    <result column="templateId" jdbcType="VARCHAR" property="templateId" />
+    <result column="url" jdbcType="VARCHAR" property="url" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    templateNo, templateName, templateId, url
+  </sql>
+  <select id="selectByExample" parameterType="com.hz.employmentsite.model.WxMessagetempsettingExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from wx_messagetempsetting
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from wx_messagetempsetting
+    where templateNo = #{templateNo,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from wx_messagetempsetting
+    where templateNo = #{templateNo,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.hz.employmentsite.model.WxMessagetempsettingExample">
+    delete from wx_messagetempsetting
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.hz.employmentsite.model.WxMessagetempsetting">
+    insert into wx_messagetempsetting (templateNo, templateName, templateId, 
+      url)
+    values (#{templateNo,jdbcType=VARCHAR}, #{templateName,jdbcType=VARCHAR}, #{templateId,jdbcType=VARCHAR}, 
+      #{url,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.hz.employmentsite.model.WxMessagetempsetting">
+    insert into wx_messagetempsetting
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="templateNo != null">
+        templateNo,
+      </if>
+      <if test="templateName != null">
+        templateName,
+      </if>
+      <if test="templateId != null">
+        templateId,
+      </if>
+      <if test="url != null">
+        url,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="templateNo != null">
+        #{templateNo,jdbcType=VARCHAR},
+      </if>
+      <if test="templateName != null">
+        #{templateName,jdbcType=VARCHAR},
+      </if>
+      <if test="templateId != null">
+        #{templateId,jdbcType=VARCHAR},
+      </if>
+      <if test="url != null">
+        #{url,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.hz.employmentsite.model.WxMessagetempsettingExample" resultType="java.lang.Long">
+    select count(*) from wx_messagetempsetting
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update wx_messagetempsetting
+    <set>
+      <if test="row.templateNo != null">
+        templateNo = #{row.templateNo,jdbcType=VARCHAR},
+      </if>
+      <if test="row.templateName != null">
+        templateName = #{row.templateName,jdbcType=VARCHAR},
+      </if>
+      <if test="row.templateId != null">
+        templateId = #{row.templateId,jdbcType=VARCHAR},
+      </if>
+      <if test="row.url != null">
+        url = #{row.url,jdbcType=VARCHAR},
+      </if>
+    </set>
+    <if test="example != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update wx_messagetempsetting
+    set templateNo = #{row.templateNo,jdbcType=VARCHAR},
+      templateName = #{row.templateName,jdbcType=VARCHAR},
+      templateId = #{row.templateId,jdbcType=VARCHAR},
+      url = #{row.url,jdbcType=VARCHAR}
+    <if test="example != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.hz.employmentsite.model.WxMessagetempsetting">
+    update wx_messagetempsetting
+    <set>
+      <if test="templateName != null">
+        templateName = #{templateName,jdbcType=VARCHAR},
+      </if>
+      <if test="templateId != null">
+        templateId = #{templateId,jdbcType=VARCHAR},
+      </if>
+      <if test="url != null">
+        url = #{url,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where templateNo = #{templateNo,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.hz.employmentsite.model.WxMessagetempsetting">
+    update wx_messagetempsetting
+    set templateName = #{templateName,jdbcType=VARCHAR},
+      templateId = #{templateId,jdbcType=VARCHAR},
+      url = #{url,jdbcType=VARCHAR}
+    where templateNo = #{templateNo,jdbcType=VARCHAR}
+  </update>
+</mapper>

+ 21 - 0
src/main/resources/mapping/cquery/RecommendMgtCQuery.xml

@@ -113,4 +113,25 @@
                      inner join (select ProfessionID from pc_profession where ParentProfessionID = '' ) b on a.ParentProfessionID=b.ProfessionID) bb
                      inner join (select ProfessionID from pc_profession where ParentProfessionID = '' ) b on a.ParentProfessionID=b.ProfessionID) bb
         on c.ParentProfessionID=bb.ProfessionID
         on c.ParentProfessionID=bb.ProfessionID
     </select>
     </select>
+    <select id="getCompanypostToUsermessageList" resultType="java.util.HashMap">
+        select a.recommendmgtid,e.openId as userOpenId,
+               c.companyname,c.usermobile as companymobile,b.postName
+        from pc_recommend_mgt a
+                 inner join pc_post b on a.PostID = b.PostID
+                 inner join pc_company c on b.CompanyID = c.CompanyID
+                 inner join pc_jobhunt d on a.JobHuntID = d.JobHuntID
+                 inner join pc_jobuser e on d.JobUserID = e.JobuserID
+        where (a.isSendUser = 0 || a.isSendUser is null)
+    </select>
+    <select id="getUserhuntpostToCompanymessageList" resultType="java.util.HashMap">
+        select a.recommendmgtid,c.openId as companyOpenId,
+               e.`name` as userName,e.usermobile,d.workName as userHuntPostName
+        from pc_recommend_mgt a
+                 inner join pc_post b on a.PostID = b.PostID
+                 inner join pc_company c on b.CompanyID = c.CompanyID
+                 inner join pc_jobhunt d on a.JobHuntID = d.JobHuntID
+                 inner join pc_jobuser e on d.JobUserID = e.JobuserID
+        where (a.isSendCompany = 0 || a.isSendCompany is null)
+    </select>
+
 </mapper>
 </mapper>