chenweida преди 7 години
родител
ревизия
fd25e4dd98
променени са 17 файла, в които са добавени 1440 реда и са изтрити 539 реда
  1. 0 2
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/BaseContants.java
  2. 56 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/sms/BaseSmsContants.java
  3. 100 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/sms/MSms.java
  4. 88 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/sms/MSmsGateway.java
  5. 103 0
      svr/svr-base/src/main/java/com/yihu/jw/base/controller/sms/SmsController.java
  6. 128 0
      svr/svr-base/src/main/java/com/yihu/jw/base/controller/sms/SmsGatewayController.java
  7. 22 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/sms/SmsDao.java
  8. 21 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/sms/SmsGatewayDao.java
  9. 2 0
      svr/svr-base/src/main/java/com/yihu/jw/base/model/Function.java
  10. 148 0
      svr/svr-base/src/main/java/com/yihu/jw/base/model/sms/BaseSms.java
  11. 134 0
      svr/svr-base/src/main/java/com/yihu/jw/base/model/sms/BaseSmsGateway.java
  12. 71 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/sms/SmsGatewayService.java
  13. 29 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/sms/SmsService.java
  14. 9 13
      svr/svr-base/src/main/java/com/yihu/jw/wx/model/WxAccessToken.java
  15. 155 153
      svr/svr-base/src/main/java/com/yihu/jw/wx/model/WxMenu.java
  16. 183 182
      svr/svr-base/src/main/java/com/yihu/jw/wx/model/WxTemplate.java
  17. 191 189
      svr/svr-base/src/main/java/com/yihu/jw/wx/model/WxWechat.java

+ 0 - 2
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/BaseContants.java

@ -20,7 +20,6 @@ public class BaseContants {
        public static final String message_fail_code_is_null="code is null";
        public static final String message_fail_name_is_null="function is null";
        public static final String message_fail_id_is_null="id is null";
        public static final String message_fail_wechatCode_is_null="wechatCode is null";
        public static final String message_fail_code_no_exist="code no exist";
@ -86,5 +85,4 @@ public class BaseContants {
        public static final String api_getSaassNoPage="getSaassNoPage";
    }
}

+ 56 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/sms/BaseSmsContants.java

@ -0,0 +1,56 @@
package com.yihu.jw.restmodel.base.sms;
/**
 * Created by chenweida on 2017/5/19.
 * 基础模块的静态变量
 */
public class BaseSmsContants {
    //短信常量
    public static class Sms{
        public static final String message_success_create="sms create success";
        public static final String message_success_update="sms update success";
        public static final String message_success_find="sms find success";
        public static final String message_success_find_smss="smss find success";
        public static final String message_success_delete="sms delete success";
        public static final String message_fail_name_exist="sms name exist";
        public static final String message_fail_code_is_null="code is null";
        public static final String message_fail_name_is_null="sms is null";
        public static final String message_fail_id_is_null="id is null";
        public static final String api_common="sms";
        public static final String api_create="create";
        public static final String api_update="update";
        public static final String api_getSmss="getSmss";
        public static final String api_getSmssNoPage="getSmssNoPage";
    }
    //短信接口模块常量
    public static class SmsGateway{
        public static final String message_success_create="SmsGateway create success";
        public static final String message_success_update="SmsGateway update success";
        public static final String message_success_find="SmsGateway find success";
        public static final String message_success_find_SmsGateways="SmsGateways find success";
        public static final String message_success_delete="SmsGateway delete success";
        public static final String message_fail_name_exist="SmsGateway name exist";
        public static final String message_fail_code_is_null="code is null";
        public static final String message_fail_name_is_null="SmsGateway is null";
        public static final String message_fail_id_is_null="id is null";
        public static final String message_fail_code_no_exist="code no exist";
        public static final String api_common="smsGateway";
        public static final String api_create="create";
        public static final String api_update="update";
        public static final String api_delete="delete";
        public static final String api_getByCode="getByCode";
        public static final String api_getSmsGateways="getSmsGateways";
        public static final String api_getSmsGatewaysNoPage="getSmsGatewaysNoPage";
    }
}

+ 100 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/sms/MSms.java

@ -0,0 +1,100 @@
package com.yihu.jw.restmodel.base.sms;
import java.util.Date;
/**
 * Created by chenweida on 2017/5/22.
 */
public class MSms {
    private Long id;
    private String saasId;	//saasid 关联base_saas code
    private String mobile;	//电话号码
    private String ip;	//发送短信的ip地址
    private Integer type;	//发送短信的类别
    private String captcha;	//验证码 1微信端注册,2微信端找回密码,3医生端找回密码,4患者登录,5医生登录
    private String content;	// 短信内容
    private Date deadline;	//过期时间
    private Integer status;	//短信状态 状态,0未发送,1已发送
    private Date czrq; //操作时间
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public String getMobile() {
        return mobile;
    }
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }
    public String getIp() {
        return ip;
    }
    public void setIp(String ip) {
        this.ip = ip;
    }
    public Integer getType() {
        return type;
    }
    public void setType(Integer type) {
        this.type = type;
    }
    public String getCaptcha() {
        return captcha;
    }
    public void setCaptcha(String captcha) {
        this.captcha = captcha;
    }
    public String getContent() {
        return content;
    }
    public void setContent(String content) {
        this.content = content;
    }
    public Date getDeadline() {
        return deadline;
    }
    public void setDeadline(Date deadline) {
        this.deadline = deadline;
    }
    public Integer getStatus() {
        return status;
    }
    public void setStatus(Integer status) {
        this.status = status;
    }
    public Date getCzrq() {
        return czrq;
    }
    public void setCzrq(Date czrq) {
        this.czrq = czrq;
    }
}

+ 88 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/sms/MSmsGateway.java

@ -0,0 +1,88 @@
package com.yihu.jw.restmodel.base.sms;
/**
 * Created by chenweida on 2017/5/22.
 */
public class MSmsGateway {
    private Long id;
    private String code; //业务code
    private String name;//名称
    private String saasId; //关联 base_saas code
    private String orgCode; //机构code
    private String ip; // 短信接口的ip地址
    private String username;  //短信接口的账号
    private String password;	//短信接口的密码
    private String url;	//短信接口的url
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public String getOrgCode() {
        return orgCode;
    }
    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }
    public String getIp() {
        return ip;
    }
    public void setIp(String ip) {
        this.ip = ip;
    }
    public String getUsername() {
        return username;
    }
    public void setUsername(String username) {
        this.username = username;
    }
    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }
    public String getUrl() {
        return url;
    }
    public void setUrl(String url) {
        this.url = url;
    }
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
}

+ 103 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/controller/sms/SmsController.java

@ -0,0 +1,103 @@
package com.yihu.jw.base.controller.sms;
import com.yihu.jw.base.model.sms.BaseSms;
import com.yihu.jw.base.service.sms.SmsService;
import com.yihu.jw.restmodel.base.sms.BaseSmsContants;
import com.yihu.jw.restmodel.base.sms.MSms;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.common.EnvelopRestController;
import com.yihu.jw.restmodel.exception.ApiException;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
/**
 * Created by chenweida on 2017/5/19.
 */
@RestController
@RequestMapping(BaseSmsContants.Sms.api_common)
@Api(value = "短信模块", description = "短信模块接口管理")
public class SmsController extends EnvelopRestController {
    @Autowired
    private SmsService smsService;
    @PostMapping(value = BaseSmsContants.Sms.api_create, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ApiOperation(value = "创建短信", notes = "创建单个短信")
    public Envelop createSms(
            @ApiParam(name = "json_data", value = "", defaultValue = "")
            @RequestBody String jsonData) {
        try {
            BaseSms sms = toEntity(jsonData, BaseSms.class);
            return Envelop.getSuccess(BaseSmsContants.Sms.message_success_create, smsService.createSms(sms));
        } catch (ApiException e) {
            return Envelop.getError(e.getMessage(), e.getErrorCode());
        }
    }
    @PutMapping(value = BaseSmsContants.Sms.api_update, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ApiOperation(value = "修改短信", notes = "修改短信")
    public Envelop updateSms(
            @ApiParam(name = "json_data", value = "", defaultValue = "")
            @RequestBody String jsonData) {
        try {
            BaseSms sms = toEntity(jsonData, BaseSms.class);
            return Envelop.getSuccess(BaseSmsContants.Sms.message_success_update, smsService.updateSms(sms));
        } catch (ApiException e) {
            return Envelop.getError(e.getMessage(), e.getErrorCode());
        }
    }
    @RequestMapping(value = BaseSmsContants.Sms.api_getSmss, method = RequestMethod.GET)
    @ApiOperation(value = "获取短信列表(分页)")
    public Envelop getSmss(
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段", defaultValue = "code,name,saasId,parentCode,remark")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            //code like 1,name大于aa ,code 等于1 , defaultValue = "code?1;name>aa;code=1"
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档", defaultValue = "+name,+createTime")
            @RequestParam(value = "sorts", required = false) String sorts,
            @ApiParam(name = "size", value = "分页大小", defaultValue = "15")
            @RequestParam(value = "size", required = false) int size,
            @ApiParam(name = "page", value = "页码", defaultValue = "1")
            @RequestParam(value = "page", required = false) int page,
            HttpServletRequest request,
            HttpServletResponse response) throws Exception {
        //得到list数据
        List<BaseSms> list = smsService.search(fields, filters, sorts, page, size);
        //获取总数
        long count=smsService.getCount(filters);
        //封装头信息
        pagedResponse(request, response, count, page, size);
        //封装返回格式
        List<MSms> mSmss = convertToModels(list, new ArrayList<>(list.size()), MSms.class, fields);
        return Envelop.getSuccessListWithPage(BaseSmsContants.Sms.message_success_find_smss,mSmss, page, size,count);
    }
    @GetMapping(value = BaseSmsContants.Sms.api_getSmssNoPage)
    @ApiOperation(value = "获取短信列表,不分页")
    public Envelop getAppsNoPage(
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段", defaultValue = "code,name,saasId,parentCode,remark")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档", defaultValue = "+name,+createTime")
            @RequestParam(value = "sorts", required = false) String sorts) throws Exception {
        //得到list数据
        List<BaseSms> list = smsService.search(fields,filters,sorts);
        //封装返回格式
        List<MSms> mSmss = convertToModels(list, new ArrayList<>(list.size()), MSms.class, fields);
        return Envelop.getSuccessList(BaseSmsContants.Sms.message_success_find_smss,mSmss);
    }
}

+ 128 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/controller/sms/SmsGatewayController.java

@ -0,0 +1,128 @@
package com.yihu.jw.base.controller.sms;
import com.yihu.jw.base.model.sms.BaseSmsGateway;
import com.yihu.jw.base.service.sms.SmsGatewayService;
import com.yihu.jw.restmodel.base.sms.BaseSmsContants;
import com.yihu.jw.restmodel.base.sms.MSmsGateway;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.common.EnvelopRestController;
import com.yihu.jw.restmodel.exception.ApiException;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
/**
 * Created by chenweida on 2017/5/19.
 */
@RestController
@RequestMapping(BaseSmsContants.SmsGateway.api_common)
@Api(value = "功能模块", description = "功能模块接口管理")
public class SmsGatewayController extends EnvelopRestController {
    @Autowired
    private SmsGatewayService smsGatewayService;
    @PostMapping(value = BaseSmsContants.SmsGateway.api_create, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ApiOperation(value = "创建功能", notes = "创建单个功能")
    public Envelop createSmsGateway(
            @ApiParam(name = "json_data", value = "", defaultValue = "")
            @RequestBody String jsonData) {
        try {
            BaseSmsGateway smsGateway = toEntity(jsonData, BaseSmsGateway.class);
            return Envelop.getSuccess(BaseSmsContants.SmsGateway.message_success_create, smsGatewayService.createSmsGateway(smsGateway));
        } catch (ApiException e) {
            return Envelop.getError(e.getMessage(), e.getErrorCode());
        }
    }
    @PutMapping(value = BaseSmsContants.SmsGateway.api_update, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ApiOperation(value = "修改功能", notes = "修改功能")
    public Envelop updateSmsGateway(
            @ApiParam(name = "json_data", value = "", defaultValue = "")
            @RequestBody String jsonData) {
        try {
            BaseSmsGateway smsGateway = toEntity(jsonData, BaseSmsGateway.class);
            return Envelop.getSuccess(BaseSmsContants.SmsGateway.message_success_update, smsGatewayService.updateSmsGateway(smsGateway));
        } catch (ApiException e) {
            return Envelop.getError(e.getMessage(), e.getErrorCode());
        }
    }
    @DeleteMapping(value = BaseSmsContants.SmsGateway.api_delete, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ApiOperation(value = "删除功能", notes = "删除功能")
    public Envelop deleteSmsGateway(
            @ApiParam(name = "code", value = "code")
            @RequestParam(value = "code", required = true) String code) {
        try {
            smsGatewayService.deleteSmsGateway(code);
            return Envelop.getSuccess(BaseSmsContants.SmsGateway.message_success_delete );
        } catch (ApiException e) {
            return Envelop.getError(e.getMessage(), e.getErrorCode());
        }
    }
    @GetMapping(value = BaseSmsContants.SmsGateway.api_getByCode, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ApiOperation(value = "根据code查找功能", notes = "根据code查找功能")
    public Envelop findByCode(
            @ApiParam(name = "code", value = "code")
            @RequestParam(value = "code", required = true) String code
    ) {
        try {
            return Envelop.getSuccess(BaseSmsContants.SmsGateway.message_success_find, smsGatewayService.findByCode(code));
        } catch (ApiException e) {
            return Envelop.getError(e.getMessage(), e.getErrorCode());
        }
    }
    @RequestMapping(value = BaseSmsContants.SmsGateway.api_getSmsGateways, method = RequestMethod.GET)
    @ApiOperation(value = "获取功能列表(分页)")
    public Envelop getSmsGateways(
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段", defaultValue = "code,name,saasId,parentCode,remark")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            //code like 1,name大于aa ,code 等于1 , defaultValue = "code?1;name>aa;code=1"
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档", defaultValue = "+name,+createTime")
            @RequestParam(value = "sorts", required = false) String sorts,
            @ApiParam(name = "size", value = "分页大小", defaultValue = "15")
            @RequestParam(value = "size", required = false) int size,
            @ApiParam(name = "page", value = "页码", defaultValue = "1")
            @RequestParam(value = "page", required = false) int page,
            HttpServletRequest request,
            HttpServletResponse response) throws Exception {
        //得到list数据
        List<BaseSmsGateway> list = smsGatewayService.search(fields, filters, sorts, page, size);
        //获取总数
        long count=smsGatewayService.getCount(filters);
        //封装头信息
        pagedResponse(request, response, count, page, size);
        //封装返回格式
        List<MSmsGateway> mSmsGateways = convertToModels(list, new ArrayList<>(list.size()), MSmsGateway.class, fields);
        return Envelop.getSuccessListWithPage(BaseSmsContants.SmsGateway.message_success_find_SmsGateways,mSmsGateways, page, size,count);
    }
    @GetMapping(value = BaseSmsContants.SmsGateway.api_getSmsGatewaysNoPage)
    @ApiOperation(value = "获取功能列表,不分页")
    public Envelop getAppsNoPage(
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段", defaultValue = "code,name,saasId,parentCode,remark")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档", defaultValue = "+name,+createTime")
            @RequestParam(value = "sorts", required = false) String sorts) throws Exception {
        //得到list数据
        List<BaseSmsGateway> list = smsGatewayService.search(fields,filters,sorts);
        //封装返回格式
        List<MSmsGateway> mSmsGateways = convertToModels(list, new ArrayList<>(list.size()), MSmsGateway.class, fields);
        return Envelop.getSuccessList(BaseSmsContants.SmsGateway.message_success_find_SmsGateways,mSmsGateways);
    }
}

+ 22 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/sms/SmsDao.java

@ -0,0 +1,22 @@
package com.yihu.jw.base.dao.sms;
import com.yihu.jw.base.model.Function;
import com.yihu.jw.base.model.sms.BaseSms;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by chenweida on 2017/5/22.
 */
public interface SmsDao extends PagingAndSortingRepository<BaseSms, Long>, JpaSpecificationExecutor<BaseSms> {
    @Query("from Function f where f.name=?1 and f.status=0")
    BaseSms findByName(String name);
    @Query("from Function f where f.name=?1 and f.status=0 and f.code != ?2")
    BaseSms findByNameExcludeCode(String name, String code);
    @Query("from Function f where f.code=?1 and f.status=0")
    BaseSms findByCode(String code);
}

+ 21 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/sms/SmsGatewayDao.java

@ -0,0 +1,21 @@
package com.yihu.jw.base.dao.sms;
import com.yihu.jw.base.model.sms.BaseSms;
import com.yihu.jw.base.model.sms.BaseSmsGateway;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by chenweida on 2017/5/22.
 */
public interface SmsGatewayDao extends PagingAndSortingRepository<BaseSmsGateway, Long>, JpaSpecificationExecutor<BaseSmsGateway> {
    @Query("from BaseSmsGateway f where f.name=?1 and f.status=0")
    BaseSmsGateway findByName(String name);
    @Query("from BaseSmsGateway f where f.name=?1 and f.status=0 and f.code != ?2")
    BaseSmsGateway findByNameExcludeCode(String name, String code);
    @Query("from BaseSmsGateway f where f.code=?1 and f.status=0")
    BaseSmsGateway findByCode(String code);
}

+ 2 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/model/Function.java

@ -129,6 +129,7 @@ public class Function extends IdEntity implements java.io.Serializable {
		this.createUserName = createUserName;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time", nullable = false, length = 0)
	public Date getCreateTime() {
		return this.createTime;
@ -156,6 +157,7 @@ public class Function extends IdEntity implements java.io.Serializable {
		this.modifyUserName = modifyUserName;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "modify_time", nullable = false, length = 0)
	public Date getModifyTime() {
		return this.modifyTime;

+ 148 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/model/sms/BaseSms.java

@ -0,0 +1,148 @@
package com.yihu.jw.base.model.sms;// default package
import com.yihu.jw.base.model.base.IdEntity;
import java.sql.Timestamp;
import java.util.Date;
import javax.persistence.*;
import static javax.persistence.GenerationType.IDENTITY;
/**
 * BaseSms entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "base_sms")
public class BaseSms extends IdEntity implements java.io.Serializable {
	// Fields
	private String saasId;	//saasid 关联base_saas code
	private String mobile;	//电话号码
	private String ip;	//发送短信的ip地址
	private Integer type;	//发送短信的类别
	private String captcha;	//验证码 1微信端注册,2微信端找回密码,3医生端找回密码,4患者登录,5医生登录
	private String content;	// 短信内容
	private Date deadline;	//过期时间
	private Integer status;	//短信状态 状态,0未发送,1已发送
	private Date czrq; //操作时间
	// Constructors
	/** default constructor */
	public BaseSms() {
	}
	/** minimal constructor */
	public BaseSms(String mobile, String ip, Integer type, String captcha,
			String content, Timestamp deadline, Integer status, Timestamp czrq) {
		this.mobile = mobile;
		this.ip = ip;
		this.type = type;
		this.captcha = captcha;
		this.content = content;
		this.deadline = deadline;
		this.status = status;
		this.czrq = czrq;
	}
	/** full constructor */
	public BaseSms(String saasId, String mobile, String ip, Integer type,
			String captcha, String content, Timestamp deadline, Integer status,
			Timestamp czrq) {
		this.saasId = saasId;
		this.mobile = mobile;
		this.ip = ip;
		this.type = type;
		this.captcha = captcha;
		this.content = content;
		this.deadline = deadline;
		this.status = status;
		this.czrq = czrq;
	}
	@Column(name = "saas_id", length = 64)
	public String getSaasId() {
		return this.saasId;
	}
	public void setSaasId(String saasId) {
		this.saasId = saasId;
	}
	@Column(name = "mobile", nullable = false, length = 20)
	public String getMobile() {
		return this.mobile;
	}
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	@Column(name = "ip", nullable = false, length = 20)
	public String getIp() {
		return this.ip;
	}
	public void setIp(String ip) {
		this.ip = ip;
	}
	@Column(name = "type", nullable = false)
	public Integer getType() {
		return this.type;
	}
	public void setType(Integer type) {
		this.type = type;
	}
	@Column(name = "captcha", nullable = false, length = 10)
	public String getCaptcha() {
		return this.captcha;
	}
	public void setCaptcha(String captcha) {
		this.captcha = captcha;
	}
	@Column(name = "content", nullable = false, length = 500)
	public String getContent() {
		return this.content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "deadline", nullable = false, length = 0)
	public Date getDeadline() {
		return this.deadline;
	}
	public void setDeadline(Date deadline) {
		this.deadline = deadline;
	}
	@Column(name = "status", nullable = false)
	public Integer getStatus() {
		return this.status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "czrq", nullable = false, length = 0)
	public Date getCzrq() {
		return this.czrq;
	}
	public void setCzrq(Date czrq) {
		this.czrq = czrq;
	}
}

+ 134 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/model/sms/BaseSmsGateway.java

@ -0,0 +1,134 @@
package com.yihu.jw.base.model.sms;// default package
import com.yihu.jw.base.model.base.IdEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
/**
 * BaseSmsGateway entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "base_sms_gateway")
public class BaseSmsGateway  extends IdEntity implements java.io.Serializable {
	// Fields
	private String code; //业务code
	private String name;//名称
	private String saasId; //关联 base_saas code
	private String orgCode; //机构code
	private String ip; // 短信接口的ip地址
	private String username;  //短信接口的账号
	private String password;	//短信接口的密码
	private String url;	//短信接口的url
	private Integer status;// -1 删除 0可用
	// Constructors
	/** default constructor */
	public BaseSmsGateway() {
	}
	/** minimal constructor */
	public BaseSmsGateway(Long id) {
		this.id = id;
	}
	/** full constructor */
	public BaseSmsGateway(Long id, String code, String saasId,
			String orgCode, String ip, String username, String password,
			String url) {
		this.id = id;
		this.code = code;
		this.saasId = saasId;
		this.orgCode = orgCode;
		this.ip = ip;
		this.username = username;
		this.password = password;
		this.url = url;
	}
	@Column(name = "code", length = 64)
	public String getCode() {
		return this.code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	@Column(name = "saas_id", length = 64)
	public String getSaasId() {
		return this.saasId;
	}
	public void setSaasId(String saasId) {
		this.saasId = saasId;
	}
	@Column(name = "org_code", length = 64)
	public String getOrgCode() {
		return this.orgCode;
	}
	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}
	@Column(name = "ip", length = 20)
	public String getIp() {
		return this.ip;
	}
	public void setIp(String ip) {
		this.ip = ip;
	}
	@Column(name = "username", length = 20)
	public String getUsername() {
		return this.username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	@Column(name = "password", length = 50)
	public String getPassword() {
		return this.password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	@Column(name = "url", length = 200)
	public String getUrl() {
		return this.url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
}

+ 71 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/sms/SmsGatewayService.java

@ -0,0 +1,71 @@
package com.yihu.jw.base.service.sms;
import com.yihu.jw.base.dao.sms.SmsGatewayDao;
import com.yihu.jw.base.model.sms.BaseSmsGateway;
import com.yihu.jw.mysql.query.BaseJpaService;
import com.yihu.jw.restmodel.base.BaseContants;
import com.yihu.jw.restmodel.common.CommonContants;
import com.yihu.jw.restmodel.exception.ApiException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
/**
 * Created by chenweida on 2017/5/22.
 */
@Service
public class SmsGatewayService extends BaseJpaService<BaseSmsGateway, SmsGatewayDao> {
    @Autowired
    private SmsGatewayDao smsGatewayDao;
    @Transactional
    public BaseSmsGateway createSmsGateway(BaseSmsGateway smsGateway) throws ApiException {
        if (StringUtils.isEmpty(smsGateway.getCode())) {
            throw new ApiException(BaseContants.SmsGateway.message_fail_code_is_null, CommonContants.common_error_params_code);
        }
        if (StringUtils.isEmpty(smsGateway.getName())) {
            throw new ApiException(BaseContants.SmsGateway.message_fail_name_is_null, CommonContants.common_error_params_code);
        }
        BaseSmsGateway smsGatewayTmp = smsGatewayDao.findByName(smsGateway.getName());
        if (smsGatewayTmp != null) {
            throw new ApiException(BaseContants.SmsGateway.message_fail_name_exist, CommonContants.common_error_params_code);
        }
        return smsGatewayDao.save(smsGateway);
    }
    @Transactional
    public BaseSmsGateway updateSmsGateway(BaseSmsGateway smsGateway) {
        if (StringUtils.isEmpty(smsGateway.getCode())) {
            throw new ApiException(BaseContants.SmsGateway.message_fail_code_is_null, CommonContants.common_error_params_code);
        }
        if (StringUtils.isEmpty(smsGateway.getName())) {
            throw new ApiException(BaseContants.SmsGateway.message_fail_name_is_null, CommonContants.common_error_params_code);
        }
        if (StringUtils.isEmpty(smsGateway.getId())) {
            throw new ApiException(BaseContants.SmsGateway.message_fail_id_is_null, CommonContants.common_error_params_code);
        }
        BaseSmsGateway smsGatewayTmp = smsGatewayDao.findByNameExcludeCode(smsGateway.getName(), smsGateway.getCode());
        if (smsGatewayTmp != null) {
            throw new ApiException(BaseContants.SmsGateway.message_fail_name_exist, CommonContants.common_error_params_code);
        }
        return smsGatewayDao.save(smsGateway);
    }
    public BaseSmsGateway findByCode(String code) {
        BaseSmsGateway smsGateway = smsGatewayDao.findByCode(code);
        if (smsGateway == null) {
            throw new ApiException(BaseContants.SmsGateway.message_fail_code_no_exist, CommonContants.common_error_params_code);
        }
        return smsGateway;
    }
    @Transactional
    public void deleteSmsGateway(String code) {
        BaseSmsGateway smsGateway = smsGatewayDao.findByCode(code);
        if (smsGateway == null) {
            throw new ApiException(BaseContants.SmsGateway.message_fail_code_no_exist, CommonContants.common_error_params_code);
        }
        smsGateway.setStatus(-1);
    }
}

+ 29 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/sms/SmsService.java

@ -0,0 +1,29 @@
package com.yihu.jw.base.service.sms;
import com.yihu.jw.base.dao.sms.SmsDao;
import com.yihu.jw.base.model.sms.BaseSms;
import com.yihu.jw.mysql.query.BaseJpaService;
import com.yihu.jw.restmodel.exception.ApiException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
 * Created by chenweida on 2017/5/22.
 */
@Service
public class SmsService  extends BaseJpaService<BaseSms, SmsDao>{
    @Autowired
    private SmsDao smsDao;
    @Transactional
    public BaseSms createSms(BaseSms sms) throws ApiException {
        return smsDao.save(sms);
    }
    @Transactional
    public BaseSms updateSms(BaseSms sms) {
        return smsDao.save(sms);
    }
}

+ 9 - 13
svr/svr-base/src/main/java/com/yihu/jw/wx/model/WxAccessToken.java

@ -15,27 +15,14 @@ public class WxAccessToken extends IdEntity implements java.io.Serializable {
	// Fields
	private String code;//业务code
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	private String wechatCode;//关联的微信code 关联表 Wx_Wechat
	private String accessToken;//调用微信返回的accesstoken
	private long addTimestamp;//创建时间
	private Integer expiresIn;//凭证有效时间(秒)
	private Date czrq;//操作时间
	// Constructors
	/** default constructor */
	public WxAccessToken() {
	}
	/** minimal constructor */
	public WxAccessToken(Long id, String accessToken, long addTimestamp,
			Integer expiresIn, Date czrq) {
@ -46,6 +33,8 @@ public class WxAccessToken extends IdEntity implements java.io.Serializable {
		this.czrq = czrq;
	}
	// Constructors
	public WxAccessToken(Long id, String code, String wechatCode, String accessToken, long addTimestamp, Integer expiresIn, Date czrq) {
		this.id = id;
		this.code = code;
@ -56,6 +45,13 @@ public class WxAccessToken extends IdEntity implements java.io.Serializable {
		this.czrq = czrq;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	@Column(name = "wechat_code", length = 64)
	public String getWechatCode() {

+ 155 - 153
svr/svr-base/src/main/java/com/yihu/jw/wx/model/WxMenu.java

@ -12,158 +12,160 @@ import java.util.Date;
@Table(name = "wx_menu")
public class WxMenu extends IdEntity implements java.io.Serializable {
	public WxMenu(Long id, String code, String wechatCode, String supMenucode, String type, String name, Integer sort, String url, String updateUser, Date updateTime, Date createTime, String createUser, String remark, Integer status) {
		this.id = id;
		this.code = code;
		this.wechatCode = wechatCode;
		this.supMenucode = supMenucode;
		this.type = type;
		this.name = name;
		this.sort = sort;
		this.url = url;
		this.updateUser = updateUser;
		this.updateTime = updateTime;
		this.createTime = createTime;
		this.createUser = createUser;
		this.remark = remark;
		this.status = status;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	private String code;//业务code
	private String wechatCode;//关联的微信code 关联表 Wx_Wechat
	private String supMenucode;//父菜单id 如果是一级菜单 此字段为空
	private String type;//菜单类型 1 view 2click
	private String name;//菜单名称
	private Integer sort;//菜单排序 父菜单排序 不包含子菜单那
	private String url;//url
	private String updateUser;//更新人
	private Date updateTime;//更新时间
	private Date createTime;//创建时间
	private String createUser;//创建人
	private String remark;//备注
	private Integer status; //状态 -1 已删除 0可用
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	// Constructors
	/** default constructor */
	public WxMenu() {
	}
	@Column(name = "wechat_code", length = 200)
	public String getWechatCode() {
		return this.wechatCode;
	}
	public void setWechatCode(String wechatCode) {
		this.wechatCode = wechatCode;
	}
	@Column(name = "sup_menucode", length = 200)
	public String getSupMenucode() {
		return this.supMenucode;
	}
	public void setSupMenucode(String supMenucode) {
		this.supMenucode = supMenucode;
	}
	@Column(name = "type", length = 20)
	public String getType() {
		return this.type;
	}
	public void setType(String type) {
		this.type = type;
	}
	@Column(name = "name", length = 200)
	public String getName() {
		return this.name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@Column(name = "sort")
	public Integer getSort() {
		return this.sort;
	}
	public void setSort(Integer sort) {
		this.sort = sort;
	}
	@Column(name = "url", length = 1000)
	public String getUrl() {
		return this.url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	@Column(name = "update_user", length = 50)
	public String getUpdateUser() {
		return this.updateUser;
	}
	public void setUpdateUser(String updateUser) {
		this.updateUser = updateUser;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "update_time", length = 0)
	public Date getUpdateTime() {
		return this.updateTime;
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time", length = 0)
	public Date getCreateTime() {
		return this.createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	@Column(name = "create_user", length = 50)
	public String getCreateUser() {
		return this.createUser;
	}
	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}
	@Column(name = "remark", length = 1000)
	public String getRemark() {
		return this.remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
    private String code;//业务code
    private String wechatCode;//关联的微信code 关联表 Wx_Wechat
    private String supMenucode;//父菜单id 如果是一级菜单 此字段为空
    private String type;//菜单类型 1 view 2click
    private String name;//菜单名称
    private Integer sort;//菜单排序 父菜单排序 不包含子菜单那
    private String url;//url
    private String updateUser;//更新人
    private Date updateTime;//更新时间
    private Date createTime;//创建时间
    private String createUser;//创建人
    private String remark;//备注
    private Integer status; //状态 -1 已删除 0可用
    public WxMenu(Long id, String code, String wechatCode, String supMenucode, String type, String name, Integer sort, String url, String updateUser, Date updateTime, Date createTime, String createUser, String remark, Integer status) {
        this.id = id;
        this.code = code;
        this.wechatCode = wechatCode;
        this.supMenucode = supMenucode;
        this.type = type;
        this.name = name;
        this.sort = sort;
        this.url = url;
        this.updateUser = updateUser;
        this.updateTime = updateTime;
        this.createTime = createTime;
        this.createUser = createUser;
        this.remark = remark;
        this.status = status;
    }
    /**
     * default constructor
     */
    public WxMenu() {
    }
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public Integer getStatus() {
        return status;
    }
    // Constructors
    public void setStatus(Integer status) {
        this.status = status;
    }
    @Column(name = "wechat_code", length = 200)
    public String getWechatCode() {
        return this.wechatCode;
    }
    public void setWechatCode(String wechatCode) {
        this.wechatCode = wechatCode;
    }
    @Column(name = "sup_menucode", length = 200)
    public String getSupMenucode() {
        return this.supMenucode;
    }
    public void setSupMenucode(String supMenucode) {
        this.supMenucode = supMenucode;
    }
    @Column(name = "type", length = 20)
    public String getType() {
        return this.type;
    }
    public void setType(String type) {
        this.type = type;
    }
    @Column(name = "name", length = 200)
    public String getName() {
        return this.name;
    }
    public void setName(String name) {
        this.name = name;
    }
    @Column(name = "sort")
    public Integer getSort() {
        return this.sort;
    }
    public void setSort(Integer sort) {
        this.sort = sort;
    }
    @Column(name = "url", length = 1000)
    public String getUrl() {
        return this.url;
    }
    public void setUrl(String url) {
        this.url = url;
    }
    @Column(name = "update_user", length = 50)
    public String getUpdateUser() {
        return this.updateUser;
    }
    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "update_time", length = 0)
    public Date getUpdateTime() {
        return this.updateTime;
    }
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "create_time", length = 0)
    public Date getCreateTime() {
        return this.createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    @Column(name = "create_user", length = 50)
    public String getCreateUser() {
        return this.createUser;
    }
    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }
    @Column(name = "remark", length = 1000)
    public String getRemark() {
        return this.remark;
    }
    public void setRemark(String remark) {
        this.remark = remark;
    }
}

+ 183 - 182
svr/svr-base/src/main/java/com/yihu/jw/wx/model/WxTemplate.java

@ -10,187 +10,188 @@ import java.util.Date;
 */
@Entity
@Table(name = "wx_template")
public class WxTemplate extends IdEntity implements java.io.Serializable{
	// Fields
	private String code;//模板code
	private String name;//模板名称
	private String wechatCode;//关联的微信code 关联表 Wx_Wechat
	private String templateCode;//微信的模板code
	private String value;//模板值
	private String createUser;//创建人
	private String createUserName;//创建人名
	private Date createTime;//创建时间
	private String updateUser;//修改人
	private String updateUserName;//修改人名称
	private Date updateTime;//修改时间
	private String remark;
	private Integer status; //状态 -1 已删除 0可用
	public WxTemplate(Long id, String code, String name, String wechatCode, String templateCode, String value, String createUser, String createUserName, Date createTime, String updateUser, String updateUserName, Date updateTime, String remark, Integer status) {
		this.id = id;
		this.code = code;
		this.name = name;
		this.wechatCode = wechatCode;
		this.templateCode = templateCode;
		this.value = value;
		this.createUser = createUser;
		this.createUserName = createUserName;
		this.createTime = createTime;
		this.updateUser = updateUser;
		this.updateUserName = updateUserName;
		this.updateTime = updateTime;
		this.remark = remark;
		this.status = status;
	}
	public String getUpdateUser() {
		return updateUser;
	}
	public void setUpdateUser(String updateUser) {
		this.updateUser = updateUser;
	}
	public String getUpdateUserName() {
		return updateUserName;
	}
	public void setUpdateUserName(String updateUserName) {
		this.updateUserName = updateUserName;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	// Constructors
	/** default constructor */
	public WxTemplate() {
	}
	@Column(name = "code", length = 64)
	public String getCode() {
		return this.code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	@Column(name = "name", length = 200)
	public String getName() {
		return this.name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@Column(name = "wechat_code", length = 64)
	public String getWechatCode() {
		return this.wechatCode;
	}
	public void setWechatCode(String wechatCode) {
		this.wechatCode = wechatCode;
	}
	@Column(name = "template_code", length = 100)
	public String getTemplateCode() {
		return this.templateCode;
	}
	public void setTemplateCode(String templateCode) {
		this.templateCode = templateCode;
	}
	@Column(name = "value", length = 2000)
	public String getValue() {
		return this.value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	@Column(name = "create_user", length = 200)
	public String getCreateUser() {
		return this.createUser;
	}
	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}
	@Column(name = "create_user_name", length = 200)
	public String getCreateUserName() {
		return this.createUserName;
	}
	public void setCreateUserName(String createUserName) {
		this.createUserName = createUserName;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time", nullable = false, length = 0)
	public Date getCreateTime() {
		return this.createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	@Column(name = "update_user", length = 200)
	public String geUpdateUser() {
		return this.updateUser;
	}
	public void seUpdateUser(String updateUser) {
		this.updateUser = updateUser;
	}
	@Column(name = "update_user_name", length = 200)
	public String geUpdateUserName() {
		return this.updateUserName;
	}
	public void seUpdateUserName(String updateUserName) {
		this.updateUserName = updateUserName;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "update_time", nullable = false, length = 0)
	public Date geUpdateTime() {
		return this.updateTime;
	}
	public void seUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	@Column(name = "remark", length = 1000)
	public String getRemark() {
		return this.remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
public class WxTemplate extends IdEntity implements java.io.Serializable {
    // Fields
    private String code;//模板code
    private String name;//模板名称
    private String wechatCode;//关联的微信code 关联表 Wx_Wechat
    private String templateCode;//微信的模板code
    private String value;//模板值
    private String createUser;//创建人
    private String createUserName;//创建人名
    private Date createTime;//创建时间
    private String updateUser;//修改人
    private String updateUserName;//修改人名称
    private Date updateTime;//修改时间
    private String remark;
    private Integer status; //状态 -1 已删除 0可用
    public WxTemplate(Long id, String code, String name, String wechatCode, String templateCode, String value, String createUser, String createUserName, Date createTime, String updateUser, String updateUserName, Date updateTime, String remark, Integer status) {
        this.id = id;
        this.code = code;
        this.name = name;
        this.wechatCode = wechatCode;
        this.templateCode = templateCode;
        this.value = value;
        this.createUser = createUser;
        this.createUserName = createUserName;
        this.createTime = createTime;
        this.updateUser = updateUser;
        this.updateUserName = updateUserName;
        this.updateTime = updateTime;
        this.remark = remark;
        this.status = status;
    }
    /**
     * default constructor
     */
    public WxTemplate() {
    }
    public String getUpdateUser() {
        return updateUser;
    }
    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }
    public String getUpdateUserName() {
        return updateUserName;
    }
    public void setUpdateUserName(String updateUserName) {
        this.updateUserName = updateUserName;
    }
    public Date getUpdateTime() {
        return updateTime;
    }
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
    public Integer getStatus() {
        return status;
    }
    // Constructors
    public void setStatus(Integer status) {
        this.status = status;
    }
    @Column(name = "code", length = 64)
    public String getCode() {
        return this.code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    @Column(name = "name", length = 200)
    public String getName() {
        return this.name;
    }
    public void setName(String name) {
        this.name = name;
    }
    @Column(name = "wechat_code", length = 64)
    public String getWechatCode() {
        return this.wechatCode;
    }
    public void setWechatCode(String wechatCode) {
        this.wechatCode = wechatCode;
    }
    @Column(name = "template_code", length = 100)
    public String getTemplateCode() {
        return this.templateCode;
    }
    public void setTemplateCode(String templateCode) {
        this.templateCode = templateCode;
    }
    @Column(name = "value", length = 2000)
    public String getValue() {
        return this.value;
    }
    public void setValue(String value) {
        this.value = value;
    }
    @Column(name = "create_user", length = 200)
    public String getCreateUser() {
        return this.createUser;
    }
    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }
    @Column(name = "create_user_name", length = 200)
    public String getCreateUserName() {
        return this.createUserName;
    }
    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "create_time", nullable = false, length = 0)
    public Date getCreateTime() {
        return this.createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    @Column(name = "update_user", length = 200)
    public String geUpdateUser() {
        return this.updateUser;
    }
    public void seUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }
    @Column(name = "update_user_name", length = 200)
    public String geUpdateUserName() {
        return this.updateUserName;
    }
    public void seUpdateUserName(String updateUserName) {
        this.updateUserName = updateUserName;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "update_time", nullable = false, length = 0)
    public Date geUpdateTime() {
        return this.updateTime;
    }
    public void seUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
    @Column(name = "remark", length = 1000)
    public String getRemark() {
        return this.remark;
    }
    public void setRemark(String remark) {
        this.remark = remark;
    }
}

+ 191 - 189
svr/svr-base/src/main/java/com/yihu/jw/wx/model/WxWechat.java

@ -10,194 +10,196 @@ import java.util.Date;
 */
@Entity
@Table(name = "wx_wechat")
public class WxWechat extends IdEntity implements java.io.Serializable{
	// Fields
	private String code;//业务code
	private String saasId;//'saas配置id'
	private String weichatId;//微信的id
	private String name;//名称
	private String status;//'类型 -1 已删除 0待审核 1审核通过 2 审核不通过'
	private String type;//'1:服务号 2 订阅号
	private String appId;//'微信app_id'
	private String appSecret;//'微信app_secret'
	private String baseUrl;//'微信base_url'
	private String createUser;//'创建人'
	private String createUserName;//'创建人名'
	private Date createTime;//'创建时间'
	private String updateUser;//'修改人
	private String updateUserName;//'修改人名'
	private Date updateTime;//'修改时间'
	private String remark;//'备注'
	public WxWechat(String code, String saasId, String weichatId, 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) {
		this.code = code;
		this.saasId = saasId;
		this.weichatId = weichatId;
		this.name = name;
		this.status = status;
		this.type = type;
		this.appId = appId;
		this.appSecret = appSecret;
		this.baseUrl = baseUrl;
		this.createUser = createUser;
		this.createUserName = createUserName;
		this.createTime = createTime;
		this.updateUser = updateUser;
		this.updateUserName = updateUserName;
		this.updateTime = updateTime;
		this.remark = remark;
	}
	/** default constructor */
	public WxWechat() {
	}
	@Column(name = "code", length = 64)
	public String getCode() {
		return this.code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	@Column(name = "saas_id", length = 50)
	public String getSaasId() {
		return this.saasId;
	}
	public void setSaasId(String saasId) {
		this.saasId = saasId;
	}
	@Column(name = "weichat_id", length = 50)
	public String getWeichatId() {
		return this.weichatId;
	}
	public void setWeichatId(String weichatId) {
		this.weichatId = weichatId;
	}
	@Column(name = "name", length = 200)
	public String getName() {
		return this.name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@Column(name = "status", precision = 2, scale = 0)
	public String getStatus() {
		return this.status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	@Column(name = "type", length = 2)
	public String getType() {
		return this.type;
	}
	public void setType(String type) {
		this.type = type;
	}
	@Column(name = "app_id", length = 200)
	public String getAppId() {
		return this.appId;
	}
	public void setAppId(String appId) {
		this.appId = appId;
	}
	@Column(name = "app_secret", length = 200)
	public String getAppSecret() {
		return this.appSecret;
	}
	public void setAppSecret(String appSecret) {
		this.appSecret = appSecret;
	}
	@Column(name = "base_url", length = 200)
	public String getBaseUrl() {
		return this.baseUrl;
	}
	public void setBaseUrl(String baseUrl) {
		this.baseUrl = baseUrl;
	}
	@Column(name = "create_user", length = 200)
	public String getCreateUser() {
		return this.createUser;
	}
	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}
	@Column(name = "create_user_name", length = 200)
	public String getCreateUserName() {
		return this.createUserName;
	}
	public void setCreateUserName(String createUserName) {
		this.createUserName = createUserName;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time", nullable = false, length = 0)
	public Date getCreateTime() {
		return this.createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	@Column(name = "remark", length = 1000)
	public String getRemark() {
		return this.remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	@Column(name = "update_user", length = 200)
	public String getUpdateUser() {
		return this.updateUser;
	}
	public void setUpdateUser(String updateUser) {
		this.updateUser = updateUser;
	}
	@Column(name = "update_user_name", length = 200)
	public String getUpdateUserName() {
		return this.updateUserName;
	}
	public void setUpdateUserName(String updateUserName) {
		this.updateUserName = updateUserName;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "update_time", nullable = false, length = 0)
	public Date getUpdateTime() {
		return this.updateTime;
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
public class WxWechat extends IdEntity implements java.io.Serializable {
    // Fields
    private String code;//业务code
    private String saasId;//'saas配置id'
    private String weichatId;//微信的id
    private String name;//名称
    private String status;//'类型 -1 已删除 0待审核 1审核通过 2 审核不通过'
    private String type;//'1:服务号 2 订阅号
    private String appId;//'微信app_id'
    private String appSecret;//'微信app_secret'
    private String baseUrl;//'微信base_url'
    private String createUser;//'创建人'
    private String createUserName;//'创建人名'
    private Date createTime;//'创建时间'
    private String updateUser;//'修改人
    private String updateUserName;//'修改人名'
    private Date updateTime;//'修改时间'
    private String remark;//'备注'
    public WxWechat(String code, String saasId, String weichatId, 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) {
        this.code = code;
        this.saasId = saasId;
        this.weichatId = weichatId;
        this.name = name;
        this.status = status;
        this.type = type;
        this.appId = appId;
        this.appSecret = appSecret;
        this.baseUrl = baseUrl;
        this.createUser = createUser;
        this.createUserName = createUserName;
        this.createTime = createTime;
        this.updateUser = updateUser;
        this.updateUserName = updateUserName;
        this.updateTime = updateTime;
        this.remark = remark;
    }
    /**
     * default constructor
     */
    public WxWechat() {
    }
    @Column(name = "code", length = 64)
    public String getCode() {
        return this.code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    @Column(name = "saas_id", length = 50)
    public String getSaasId() {
        return this.saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    @Column(name = "weichat_id", length = 50)
    public String getWeichatId() {
        return this.weichatId;
    }
    public void setWeichatId(String weichatId) {
        this.weichatId = weichatId;
    }
    @Column(name = "name", length = 200)
    public String getName() {
        return this.name;
    }
    public void setName(String name) {
        this.name = name;
    }
    @Column(name = "status", precision = 2, scale = 0)
    public String getStatus() {
        return this.status;
    }
    public void setStatus(String status) {
        this.status = status;
    }
    @Column(name = "type", length = 2)
    public String getType() {
        return this.type;
    }
    public void setType(String type) {
        this.type = type;
    }
    @Column(name = "app_id", length = 200)
    public String getAppId() {
        return this.appId;
    }
    public void setAppId(String appId) {
        this.appId = appId;
    }
    @Column(name = "app_secret", length = 200)
    public String getAppSecret() {
        return this.appSecret;
    }
    public void setAppSecret(String appSecret) {
        this.appSecret = appSecret;
    }
    @Column(name = "base_url", length = 200)
    public String getBaseUrl() {
        return this.baseUrl;
    }
    public void setBaseUrl(String baseUrl) {
        this.baseUrl = baseUrl;
    }
    @Column(name = "create_user", length = 200)
    public String getCreateUser() {
        return this.createUser;
    }
    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }
    @Column(name = "create_user_name", length = 200)
    public String getCreateUserName() {
        return this.createUserName;
    }
    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "create_time", nullable = false, length = 0)
    public Date getCreateTime() {
        return this.createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    @Column(name = "remark", length = 1000)
    public String getRemark() {
        return this.remark;
    }
    public void setRemark(String remark) {
        this.remark = remark;
    }
    @Column(name = "update_user", length = 200)
    public String getUpdateUser() {
        return this.updateUser;
    }
    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }
    @Column(name = "update_user_name", length = 200)
    public String getUpdateUserName() {
        return this.updateUserName;
    }
    public void setUpdateUserName(String updateUserName) {
        this.updateUserName = updateUserName;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "update_time", nullable = false, length = 0)
    public Date getUpdateTime() {
        return this.updateTime;
    }
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}