浏览代码

Merge branch 'dev' of chenyongxing/jw2.0 into dev

chenweida 8 年之前
父节点
当前提交
b015bf2c58

+ 27 - 1
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/wx/MWxWechat.java

@ -11,6 +11,9 @@ public class MWxWechat {
    private String code;//业务code
    private String saasId;//'saas配置id'
    private String name;//名称
    private String token;//token
    private String encodingAesKey;//加密密钥
    private Integer encType;//加密方式  0:明文模式   1:兼容模式   2:安全模式
    private String status;//'类型 -1 已删除 0待审核 1审核通过 2 审核不通过'
    private String type;//'1:服务号 2 订阅号
    private String appId;//'微信app_id'
@ -56,6 +59,30 @@ public class MWxWechat {
        this.name = name;
    }
    public String getToken() {
        return token;
    }
    public void setToken(String token) {
        this.token = token;
    }
    public String getEncodingAesKey() {
        return encodingAesKey;
    }
    public void setEncodingAesKey(String encodingAesKey) {
        this.encodingAesKey = encodingAesKey;
    }
    public Integer getEncType() {
        return encType;
    }
    public void setEncType(Integer encType) {
        this.encType = encType;
    }
    public String getStatus() {
        return status;
    }
@ -151,5 +178,4 @@ public class MWxWechat {
    public void setRemark(String remark) {
        this.remark = remark;
    }
}

+ 8 - 8
svr/svr-base/src/main/java/com/yihu/jw/wx/controller/WxGraphicMessageController.java

@ -127,14 +127,14 @@ public class WxGraphicMessageController extends EnvelopRestController {
        return Envelop.getSuccessList(WxContants.WxGraphicMessage.message_success_find_functions,mWxGraphicMessages);
    }
    @GetMapping(value = WxContants.WxGraphicMessage.api_sendGraphicMessages)
    @ApiOperation(value = "发送图文消息")
    public Envelop sendGraphicMessages(
            @ApiParam(name = "codes", value = "根据code发送微信图文消息,多个code用,分割")
            @RequestParam(value = "codes", required = true) String codes,HttpServletRequest request) throws Exception {
        String messages = wxGraphicMessageService.sendGraphicMessages(codes, request);
        return Envelop.getSuccess("成功",messages);
    }
    //@GetMapping(value = WxContants.WxGraphicMessage.api_sendGraphicMessages)
    //@ApiOperation(value = "发送图文消息")
    //public Envelop sendGraphicMessages(
    //        @ApiParam(name = "codes", value = "根据code发送微信图文消息,多个code用,分割")
    //        @RequestParam(value = "codes", required = true) String codes,HttpServletRequest request) throws Exception {
    //    String messages = wxGraphicMessageService.sendGraphicMessages(codes, request);
    //    return Envelop.getSuccess("成功",messages);
    //}
    @GetMapping(value = WxContants.WxGraphicMessage.api_sendGraphicMessages)
    @ApiOperation(value = "发送图文消息")

+ 1 - 1
svr/svr-base/src/main/java/com/yihu/jw/wx/dao/WxTemplateDao.java

@ -10,6 +10,6 @@ import org.springframework.data.repository.PagingAndSortingRepository;
 */
public interface WxTemplateDao extends PagingAndSortingRepository<WxTemplate, Long>, JpaSpecificationExecutor<WxTemplate> {
    @Query("from WxTemplate w where w.code = ?1 and w.status =0")
    @Query("from WxTemplate w where w.code = ?1 and w.status =1")
    WxTemplate findByCode(String code);
}

+ 32 - 3
svr/svr-base/src/main/java/com/yihu/jw/wx/model/WxWechat.java

@ -16,6 +16,9 @@ public class WxWechat extends IdEntity implements java.io.Serializable {
    private String code;//业务code
    private String saasId;//'saas配置id'
    private String name;//名称
    private String token;//token
    private String encodingAesKey;//加密密钥
    private Integer encType;//加密方式  0:明文模式   1:兼容模式   2:安全模式
    private String status;//'类型 -1 已删除 0待审核 1审核通过 2 审核不通过'
    private String type;//'1:服务号 2 订阅号
    private String appId;//'微信app_id'
@ -28,11 +31,13 @@ public class WxWechat extends IdEntity implements java.io.Serializable {
    private String updateUserName;//'修改人名'
    private Date updateTime;//'修改时间'
    private String remark;//'备注'
    public WxWechat(String code, String saasId, String name, String status, String type, String appId, String appSecret, String baseUrl, String createUser, String createUserName, Date createTime, String updateUser, String updateUserName, Date updateTime, String remark) {
    public WxWechat(String code, String saasId, String name, String token, String encodingAesKey, Integer encType, String status, String type, String appId, String appSecret, String baseUrl, String createUser, String createUserName, Date createTime, String updateUser, String updateUserName, Date updateTime, String remark) {
        this.code = code;
        this.saasId = saasId;
        this.name = name;
        this.token = token;
        this.encodingAesKey = encodingAesKey;
        this.encType = encType;
        this.status = status;
        this.type = type;
        this.appId = appId;
@ -46,13 +51,37 @@ public class WxWechat extends IdEntity implements java.io.Serializable {
        this.updateTime = updateTime;
        this.remark = remark;
    }
    /**
     * default constructor
     */
    public WxWechat() {
    }
    @Column(name = "enc_type")
    public Integer getEncType() {
        return encType;
    }
    public void setEncType(Integer encType) {
        this.encType = encType;
    }
    @Column(name = "token", length = 64)
    public String getToken() {
        return token;
    }
    public void setToken(String token) {
        this.token = token;
    }
    @Column(name="encoding_aes_key")
    public String getEncodingAesKey() {
        return encodingAesKey;
    }
    public void setEncodingAesKey(String encodingAesKey) {
        this.encodingAesKey = encodingAesKey;
    }
    @Column(name = "code", length = 64)
    public String getCode() {