java110
2021-07-21 652d7f0364c62c6d8277ca1fddd35a99d3730ec4
加入小区 短信配置 方便催缴
2个文件已修改
16个文件已添加
1110 ■■■■■ 已修改文件
java110-bean/src/main/java/com/java110/dto/smsConfig/SmsConfigDto.java 125 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/po/smsConfig/SmsConfigPo.java 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-core/src/main/java/com/java110/core/factory/GenerateCodeFactory.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/common/SmsConfigServiceDaoImplMapper.xml 169 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-generator/src/main/resources/newBack/template_1.json 76 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-interface/src/main/java/com/java110/intf/common/ISmsConfigInnerServiceSMO.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-common/src/main/java/com/java110/common/api/SmsConfigApi.java 125 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-common/src/main/java/com/java110/common/bmo/smsConfig/IDeleteSmsConfigBMO.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-common/src/main/java/com/java110/common/bmo/smsConfig/IGetSmsConfigBMO.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-common/src/main/java/com/java110/common/bmo/smsConfig/ISaveSmsConfigBMO.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-common/src/main/java/com/java110/common/bmo/smsConfig/IUpdateSmsConfigBMO.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-common/src/main/java/com/java110/common/bmo/smsConfig/impl/DeleteSmsConfigBMOImpl.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-common/src/main/java/com/java110/common/bmo/smsConfig/impl/GetSmsConfigBMOImpl.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-common/src/main/java/com/java110/common/bmo/smsConfig/impl/SaveSmsConfigBMOImpl.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-common/src/main/java/com/java110/common/bmo/smsConfig/impl/UpdateSmsConfigBMOImpl.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-common/src/main/java/com/java110/common/dao/ISmsConfigServiceDao.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-common/src/main/java/com/java110/common/dao/impl/SmsConfigServiceDaoImpl.java 98 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-common/src/main/java/com/java110/common/smo/impl/SmsConfigInnerServiceSMOImpl.java 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/smsConfig/SmsConfigDto.java
New file
@@ -0,0 +1,125 @@
package com.java110.dto.smsConfig;
import com.java110.dto.PageDto;
import java.io.Serializable;
import java.util.Date;
/**
 * @ClassName FloorDto
 * @Description 短信配置数据层封装
 * @Author wuxw
 * @Date 2019/4/24 8:52
 * @Version 1.0
 * add by wuxw 2019/4/24
 **/
public class SmsConfigDto extends PageDto implements Serializable {
    private String accessKeyId;
private String smsBusi;
private String signName;
private String templateCode;
private String storeId;
private String accessSecret;
private String smsId;
private String objId;
private String smsType;
private String logSwitch;
private String region;
private String remarks;
    private Date createTime;
    private String statusCd = "0";
    public String getAccessKeyId() {
        return accessKeyId;
    }
public void setAccessKeyId(String accessKeyId) {
        this.accessKeyId = accessKeyId;
    }
public String getSmsBusi() {
        return smsBusi;
    }
public void setSmsBusi(String smsBusi) {
        this.smsBusi = smsBusi;
    }
public String getSignName() {
        return signName;
    }
public void setSignName(String signName) {
        this.signName = signName;
    }
public String getTemplateCode() {
        return templateCode;
    }
public void setTemplateCode(String templateCode) {
        this.templateCode = templateCode;
    }
public String getStoreId() {
        return storeId;
    }
public void setStoreId(String storeId) {
        this.storeId = storeId;
    }
public String getAccessSecret() {
        return accessSecret;
    }
public void setAccessSecret(String accessSecret) {
        this.accessSecret = accessSecret;
    }
public String getSmsId() {
        return smsId;
    }
public void setSmsId(String smsId) {
        this.smsId = smsId;
    }
public String getObjId() {
        return objId;
    }
public void setObjId(String objId) {
        this.objId = objId;
    }
public String getSmsType() {
        return smsType;
    }
public void setSmsType(String smsType) {
        this.smsType = smsType;
    }
public String getLogSwitch() {
        return logSwitch;
    }
public void setLogSwitch(String logSwitch) {
        this.logSwitch = logSwitch;
    }
public String getRegion() {
        return region;
    }
public void setRegion(String region) {
        this.region = region;
    }
public String getRemarks() {
        return remarks;
    }
public void setRemarks(String remarks) {
        this.remarks = remarks;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public String getStatusCd() {
        return statusCd;
    }
    public void setStatusCd(String statusCd) {
        this.statusCd = statusCd;
    }
}
java110-bean/src/main/java/com/java110/po/smsConfig/SmsConfigPo.java
New file
@@ -0,0 +1,102 @@
package com.java110.po.smsConfig;
import java.io.Serializable;
import java.util.Date;
public class SmsConfigPo implements Serializable {
    private String accessKeyId;
private String smsBusi;
private String signName;
private String statusCd = "0";
private String templateCode;
private String storeId;
private String accessSecret;
private String smsId;
private String objId;
private String smsType;
private String logSwitch;
private String region;
private String remarks;
public String getAccessKeyId() {
        return accessKeyId;
    }
public void setAccessKeyId(String accessKeyId) {
        this.accessKeyId = accessKeyId;
    }
public String getSmsBusi() {
        return smsBusi;
    }
public void setSmsBusi(String smsBusi) {
        this.smsBusi = smsBusi;
    }
public String getSignName() {
        return signName;
    }
public void setSignName(String signName) {
        this.signName = signName;
    }
public String getStatusCd() {
        return statusCd;
    }
public void setStatusCd(String statusCd) {
        this.statusCd = statusCd;
    }
public String getTemplateCode() {
        return templateCode;
    }
public void setTemplateCode(String templateCode) {
        this.templateCode = templateCode;
    }
public String getStoreId() {
        return storeId;
    }
public void setStoreId(String storeId) {
        this.storeId = storeId;
    }
public String getAccessSecret() {
        return accessSecret;
    }
public void setAccessSecret(String accessSecret) {
        this.accessSecret = accessSecret;
    }
public String getSmsId() {
        return smsId;
    }
public void setSmsId(String smsId) {
        this.smsId = smsId;
    }
public String getObjId() {
        return objId;
    }
public void setObjId(String objId) {
        this.objId = objId;
    }
public String getSmsType() {
        return smsType;
    }
public void setSmsType(String smsType) {
        this.smsType = smsType;
    }
public String getLogSwitch() {
        return logSwitch;
    }
public void setLogSwitch(String logSwitch) {
        this.logSwitch = logSwitch;
    }
public String getRegion() {
        return region;
    }
public void setRegion(String region) {
        this.region = region;
    }
public String getRemarks() {
        return remarks;
    }
public void setRemarks(String remarks) {
        this.remarks = remarks;
    }
}
java110-core/src/main/java/com/java110/core/factory/GenerateCodeFactory.java
@@ -209,6 +209,7 @@
    public static final String CODE_PREFIX_bankId = "74";
    public static final String CODE_PREFIX_bondId = "76";
    public static final String CODE_PREFIX_bobjId = "77";
    public static final String CODE_PREFIX_smsId = "78";
java110-db/src/main/resources/mapper/common/SmsConfigServiceDaoImplMapper.xml
New file
@@ -0,0 +1,169 @@
<?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="smsConfigServiceDaoImpl">
    <!-- 保存短信配置信息 add by wuxw 2018-07-03 -->
    <insert id="saveSmsConfigInfo" parameterType="Map">
        insert into sms_config(
access_key_id,sms_busi,sign_name,template_code,store_id,access_secret,sms_id,obj_id,sms_type,log_switch,region,remarks
) values (
#{accessKeyId},#{smsBusi},#{signName},#{templateCode},#{storeId},#{accessSecret},#{smsId},#{objId},#{smsType},#{logSwitch},#{region},#{remarks}
)
    </insert>
    <!-- 查询短信配置信息 add by wuxw 2018-07-03 -->
    <select id="getSmsConfigInfo" parameterType="Map" resultType="Map">
        select  t.access_key_id,t.access_key_id accessKeyId,t.sms_busi,t.sms_busi smsBusi,t.sign_name,t.sign_name signName,t.status_cd,t.status_cd statusCd,t.template_code,t.template_code templateCode,t.store_id,t.store_id storeId,t.access_secret,t.access_secret accessSecret,t.sms_id,t.sms_id smsId,t.obj_id,t.obj_id objId,t.sms_type,t.sms_type smsType,t.log_switch,t.log_switch logSwitch,t.region,t.remarks
from sms_config t
where 1 =1
<if test="accessKeyId !=null and accessKeyId != ''">
   and t.access_key_id= #{accessKeyId}
</if>
<if test="smsBusi !=null and smsBusi != ''">
   and t.sms_busi= #{smsBusi}
</if>
<if test="signName !=null and signName != ''">
   and t.sign_name= #{signName}
</if>
<if test="statusCd !=null and statusCd != ''">
   and t.status_cd= #{statusCd}
</if>
<if test="templateCode !=null and templateCode != ''">
   and t.template_code= #{templateCode}
</if>
<if test="storeId !=null and storeId != ''">
   and t.store_id= #{storeId}
</if>
<if test="accessSecret !=null and accessSecret != ''">
   and t.access_secret= #{accessSecret}
</if>
<if test="smsId !=null and smsId != ''">
   and t.sms_id= #{smsId}
</if>
<if test="objId !=null and objId != ''">
   and t.obj_id= #{objId}
</if>
<if test="smsType !=null and smsType != ''">
   and t.sms_type= #{smsType}
</if>
<if test="logSwitch !=null and logSwitch != ''">
   and t.log_switch= #{logSwitch}
</if>
<if test="region !=null and region != ''">
   and t.region= #{region}
</if>
<if test="remarks !=null and remarks != ''">
   and t.remarks= #{remarks}
</if>
order by t.create_time desc
<if test="page != -1 and page != null ">
   limit #{page}, #{row}
</if>
    </select>
    <!-- 修改短信配置信息 add by wuxw 2018-07-03 -->
    <update id="updateSmsConfigInfo" parameterType="Map">
        update  sms_config t set t.status_cd = #{statusCd}
<if test="newBId != null and newBId != ''">
,t.b_id = #{newBId}
</if>
<if test="accessKeyId !=null and accessKeyId != ''">
, t.access_key_id= #{accessKeyId}
</if>
<if test="smsBusi !=null and smsBusi != ''">
, t.sms_busi= #{smsBusi}
</if>
<if test="signName !=null and signName != ''">
, t.sign_name= #{signName}
</if>
<if test="templateCode !=null and templateCode != ''">
, t.template_code= #{templateCode}
</if>
<if test="storeId !=null and storeId != ''">
, t.store_id= #{storeId}
</if>
<if test="accessSecret !=null and accessSecret != ''">
, t.access_secret= #{accessSecret}
</if>
<if test="objId !=null and objId != ''">
, t.obj_id= #{objId}
</if>
<if test="smsType !=null and smsType != ''">
, t.sms_type= #{smsType}
</if>
<if test="logSwitch !=null and logSwitch != ''">
, t.log_switch= #{logSwitch}
</if>
<if test="region !=null and region != ''">
, t.region= #{region}
</if>
<if test="remarks !=null and remarks != ''">
, t.remarks= #{remarks}
</if>
 where 1=1 <if test="smsId !=null and smsId != ''">
and t.sms_id= #{smsId}
</if>
    </update>
    <!-- 查询短信配置数量 add by wuxw 2018-07-03 -->
     <select id="querySmsConfigsCount" parameterType="Map" resultType="Map">
        select  count(1) count
from sms_config t
where 1 =1
<if test="accessKeyId !=null and accessKeyId != ''">
   and t.access_key_id= #{accessKeyId}
</if>
<if test="smsBusi !=null and smsBusi != ''">
   and t.sms_busi= #{smsBusi}
</if>
<if test="signName !=null and signName != ''">
   and t.sign_name= #{signName}
</if>
<if test="statusCd !=null and statusCd != ''">
   and t.status_cd= #{statusCd}
</if>
<if test="templateCode !=null and templateCode != ''">
   and t.template_code= #{templateCode}
</if>
<if test="storeId !=null and storeId != ''">
   and t.store_id= #{storeId}
</if>
<if test="accessSecret !=null and accessSecret != ''">
   and t.access_secret= #{accessSecret}
</if>
<if test="smsId !=null and smsId != ''">
   and t.sms_id= #{smsId}
</if>
<if test="objId !=null and objId != ''">
   and t.obj_id= #{objId}
</if>
<if test="smsType !=null and smsType != ''">
   and t.sms_type= #{smsType}
</if>
<if test="logSwitch !=null and logSwitch != ''">
   and t.log_switch= #{logSwitch}
</if>
<if test="region !=null and region != ''">
   and t.region= #{region}
</if>
<if test="remarks !=null and remarks != ''">
   and t.remarks= #{remarks}
</if>
     </select>
</mapper>
java110-generator/src/main/resources/newBack/template_1.json
@@ -1,54 +1,58 @@
{
  "autoMove": true,
  "id": "detailId",
  "name": "accountBondObjDetail",
  "desc": "保证金明细",
  "shareParam": "detailId",
  "shareColumn": "detail_id",
  "shareName": "acct",
  "tableName": "account_bond_obj_detail",
  "id": "smsId",
  "name": "smsConfig",
  "desc": "短信配置",
  "shareParam": "objId",
  "shareColumn": "obj_id",
  "shareName": "common",
  "tableName": "sms_config",
  "param": {
    "detailId": "detail_id",
    "bobjId": "bobj_id",
    "smsId": "sms_id",
    "storeId": "store_id",
    "objId": "obj_id",
    "bondType": "bond_type",
    "receivableAmount": "receivable_amount",
    "receivedAmount": "received_amount",
    "remark": "remark",
    "state": "state",
    "startTime": "start_time",
    "endTime": "end_time",
    "createTime": "create_time",
    "smsType": "sms_type",
    "smsBusi": "sms_busi",
    "templateCode": "template_code",
    "signName": "sign_name",
    "accessSecret": "access_secret",
    "accessKeyId": "access_key_id",
    "region": "region",
    "logSwitch": "log_switch",
    "remarks": "remarks",
    "statusCd": "status_cd"
  },
  "required": [
    {
      "code": "bobjId",
      "msg": "保证金ID不能为空"
    },
    {
      "code": "objId",
      "msg": "保证对象ID类型不能为空"
      "msg": "对象不能为空"
    },
    {
      "code": "bondType",
      "msg": "保证对象类型不能为空"
    },{
      "code": "receivableAmount",
      "msg": "应收金额不能为空"
    },{
      "code": "receivedAmount",
      "msg": "实收金额不能为空"
      "code": "smsType",
      "msg": "短信类型不能为空"
    },
    {
      "code": "state",
      "msg": "状态不能为空"
      "code": "smsBusi",
      "msg": "短信业务不能为空"
    },{
      "code": "startTime",
      "msg": "开始时间不能为空"
      "code": "templateCode",
      "msg": "短信模板不能为空"
    },{
      "code": "endTime",
      "msg": "结束时间不能为空"
      "code": "signName",
      "msg": "短信签名不能为空"
    },
    {
      "code": "accessSecret",
      "msg": "访问秘钥不能为空"
    },{
      "code": "accessKeyId",
      "msg": "访问Key不能为空"
    },{
      "code": "region",
      "msg": "区域不能为空"
    },{
      "code": "logSwitch",
      "msg": "日志开关不能为空"
    }
  ]
}
java110-interface/src/main/java/com/java110/intf/common/ISmsConfigInnerServiceSMO.java
New file
@@ -0,0 +1,53 @@
package com.java110.intf.common;
import com.java110.config.feign.FeignConfiguration;
import com.java110.dto.smsConfig.SmsConfigDto;
import com.java110.po.smsConfig.SmsConfigPo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import java.util.List;
/**
 * @ClassName ISmsConfigInnerServiceSMO
 * @Description 短信配置接口类
 * @Author wuxw
 * @Date 2019/4/24 9:04
 * @Version 1.0
 * add by wuxw 2019/4/24
 **/
@FeignClient(name = "common-service", configuration = {FeignConfiguration.class})
@RequestMapping("/smsConfigApi")
public interface ISmsConfigInnerServiceSMO {
    @RequestMapping(value = "/saveSmsConfig", method = RequestMethod.POST)
    public int saveSmsConfig(@RequestBody SmsConfigPo smsConfigPo);
    @RequestMapping(value = "/updateSmsConfig", method = RequestMethod.POST)
    public int updateSmsConfig(@RequestBody  SmsConfigPo smsConfigPo);
    @RequestMapping(value = "/deleteSmsConfig", method = RequestMethod.POST)
    public int deleteSmsConfig(@RequestBody  SmsConfigPo smsConfigPo);
    /**
     * <p>查询小区楼信息</p>
     *
     *
     * @param smsConfigDto 数据对象分享
     * @return SmsConfigDto 对象数据
     */
    @RequestMapping(value = "/querySmsConfigs", method = RequestMethod.POST)
    List<SmsConfigDto> querySmsConfigs(@RequestBody SmsConfigDto smsConfigDto);
    /**
     * 查询<p>小区楼</p>总记录数
     *
     * @param smsConfigDto 数据对象分享
     * @return 小区下的小区楼记录数
     */
    @RequestMapping(value = "/querySmsConfigsCount", method = RequestMethod.POST)
    int querySmsConfigsCount(@RequestBody SmsConfigDto smsConfigDto);
}
service-common/src/main/java/com/java110/common/api/SmsConfigApi.java
New file
@@ -0,0 +1,125 @@
package com.java110.common.api;
import com.alibaba.fastjson.JSONObject;
import com.java110.common.bmo.smsConfig.IDeleteSmsConfigBMO;
import com.java110.common.bmo.smsConfig.IGetSmsConfigBMO;
import com.java110.common.bmo.smsConfig.ISaveSmsConfigBMO;
import com.java110.common.bmo.smsConfig.IUpdateSmsConfigBMO;
import com.java110.dto.smsConfig.SmsConfigDto;
import com.java110.po.smsConfig.SmsConfigPo;
import com.java110.utils.util.Assert;
import com.java110.utils.util.BeanConvertUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping(value = "/smsConfig")
public class SmsConfigApi {
    @Autowired
    private ISaveSmsConfigBMO saveSmsConfigBMOImpl;
    @Autowired
    private IUpdateSmsConfigBMO updateSmsConfigBMOImpl;
    @Autowired
    private IDeleteSmsConfigBMO deleteSmsConfigBMOImpl;
    @Autowired
    private IGetSmsConfigBMO getSmsConfigBMOImpl;
    /**
     * 微信保存消息模板
     *
     * @param reqJson
     * @return
     * @serviceCode /smsConfig/saveSmsConfig
     * @path /app/smsConfig/saveSmsConfig
     */
    @RequestMapping(value = "/saveSmsConfig", method = RequestMethod.POST)
    public ResponseEntity<String> saveSmsConfig(@RequestBody JSONObject reqJson) {
        Assert.hasKeyAndValue(reqJson, "objId", "请求报文中未包含objId");
        Assert.hasKeyAndValue(reqJson, "smsType", "请求报文中未包含smsType");
        Assert.hasKeyAndValue(reqJson, "smsBusi", "请求报文中未包含smsBusi");
        Assert.hasKeyAndValue(reqJson, "templateCode", "请求报文中未包含templateCode");
        Assert.hasKeyAndValue(reqJson, "signName", "请求报文中未包含signName");
        Assert.hasKeyAndValue(reqJson, "accessSecret", "请求报文中未包含accessSecret");
        Assert.hasKeyAndValue(reqJson, "accessKeyId", "请求报文中未包含accessKeyId");
        Assert.hasKeyAndValue(reqJson, "region", "请求报文中未包含region");
        Assert.hasKeyAndValue(reqJson, "logSwitch", "请求报文中未包含logSwitch");
        SmsConfigPo smsConfigPo = BeanConvertUtil.covertBean(reqJson, SmsConfigPo.class);
        return saveSmsConfigBMOImpl.save(smsConfigPo);
    }
    /**
     * 微信修改消息模板
     *
     * @param reqJson
     * @return
     * @serviceCode /smsConfig/updateSmsConfig
     * @path /app/smsConfig/updateSmsConfig
     */
    @RequestMapping(value = "/updateSmsConfig", method = RequestMethod.POST)
    public ResponseEntity<String> updateSmsConfig(@RequestBody JSONObject reqJson) {
        Assert.hasKeyAndValue(reqJson, "objId", "请求报文中未包含objId");
        Assert.hasKeyAndValue(reqJson, "smsType", "请求报文中未包含smsType");
        Assert.hasKeyAndValue(reqJson, "smsBusi", "请求报文中未包含smsBusi");
        Assert.hasKeyAndValue(reqJson, "templateCode", "请求报文中未包含templateCode");
        Assert.hasKeyAndValue(reqJson, "signName", "请求报文中未包含signName");
        Assert.hasKeyAndValue(reqJson, "accessSecret", "请求报文中未包含accessSecret");
        Assert.hasKeyAndValue(reqJson, "accessKeyId", "请求报文中未包含accessKeyId");
        Assert.hasKeyAndValue(reqJson, "region", "请求报文中未包含region");
        Assert.hasKeyAndValue(reqJson, "logSwitch", "请求报文中未包含logSwitch");
        Assert.hasKeyAndValue(reqJson, "smsId", "smsId不能为空");
        SmsConfigPo smsConfigPo = BeanConvertUtil.covertBean(reqJson, SmsConfigPo.class);
        return updateSmsConfigBMOImpl.update(smsConfigPo);
    }
    /**
     * 微信删除消息模板
     *
     * @param reqJson
     * @return
     * @serviceCode /smsConfig/deleteSmsConfig
     * @path /app/smsConfig/deleteSmsConfig
     */
    @RequestMapping(value = "/deleteSmsConfig", method = RequestMethod.POST)
    public ResponseEntity<String> deleteSmsConfig(@RequestBody JSONObject reqJson) {
        Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空");
        Assert.hasKeyAndValue(reqJson, "smsId", "smsId不能为空");
        SmsConfigPo smsConfigPo = BeanConvertUtil.covertBean(reqJson, SmsConfigPo.class);
        return deleteSmsConfigBMOImpl.delete(smsConfigPo);
    }
    /**
     * 微信删除消息模板
     *
     * @param objId 小区ID
     * @return
     * @serviceCode /smsConfig/querySmsConfig
     * @path /app/smsConfig/querySmsConfig
     */
    @RequestMapping(value = "/querySmsConfig", method = RequestMethod.GET)
    public ResponseEntity<String> querySmsConfig(@RequestParam(value = "objId") String objId,
                                                 @RequestParam(value = "page") int page,
                                                 @RequestParam(value = "row") int row) {
        SmsConfigDto smsConfigDto = new SmsConfigDto();
        smsConfigDto.setPage(page);
        smsConfigDto.setRow(row);
        smsConfigDto.setObjId(objId);
        return getSmsConfigBMOImpl.get(smsConfigDto);
    }
}
service-common/src/main/java/com/java110/common/bmo/smsConfig/IDeleteSmsConfigBMO.java
New file
@@ -0,0 +1,17 @@
package com.java110.common.bmo.smsConfig;
import com.java110.po.smsConfig.SmsConfigPo;
import org.springframework.http.ResponseEntity;
public interface IDeleteSmsConfigBMO {
    /**
     * 修改短信配置
     * add by wuxw
     * @param smsConfigPo
     * @return
     */
    ResponseEntity<String> delete(SmsConfigPo smsConfigPo);
}
service-common/src/main/java/com/java110/common/bmo/smsConfig/IGetSmsConfigBMO.java
New file
@@ -0,0 +1,16 @@
package com.java110.common.bmo.smsConfig;
import com.java110.dto.smsConfig.SmsConfigDto;
import org.springframework.http.ResponseEntity;
public interface IGetSmsConfigBMO {
    /**
     * 查询短信配置
     * add by wuxw
     * @param  smsConfigDto
     * @return
     */
    ResponseEntity<String> get(SmsConfigDto smsConfigDto);
}
service-common/src/main/java/com/java110/common/bmo/smsConfig/ISaveSmsConfigBMO.java
New file
@@ -0,0 +1,17 @@
package com.java110.common.bmo.smsConfig;
import com.java110.po.smsConfig.SmsConfigPo;
import org.springframework.http.ResponseEntity;
public interface ISaveSmsConfigBMO {
    /**
     * 添加短信配置
     * add by wuxw
     * @param smsConfigPo
     * @return
     */
    ResponseEntity<String> save(SmsConfigPo smsConfigPo);
}
service-common/src/main/java/com/java110/common/bmo/smsConfig/IUpdateSmsConfigBMO.java
New file
@@ -0,0 +1,17 @@
package com.java110.common.bmo.smsConfig;
import com.java110.po.smsConfig.SmsConfigPo;
import org.springframework.http.ResponseEntity;
public interface IUpdateSmsConfigBMO {
    /**
     * 修改短信配置
     * add by wuxw
     * @param smsConfigPo
     * @return
     */
    ResponseEntity<String> update(SmsConfigPo smsConfigPo);
}
service-common/src/main/java/com/java110/common/bmo/smsConfig/impl/DeleteSmsConfigBMOImpl.java
New file
@@ -0,0 +1,34 @@
package com.java110.common.bmo.smsConfig.impl;
import com.java110.common.bmo.smsConfig.IDeleteSmsConfigBMO;
import com.java110.core.annotation.Java110Transactional;
import com.java110.intf.common.ISmsConfigInnerServiceSMO;
import com.java110.po.smsConfig.SmsConfigPo;
import com.java110.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
@Service("deleteSmsConfigBMOImpl")
public class DeleteSmsConfigBMOImpl implements IDeleteSmsConfigBMO {
    @Autowired
    private ISmsConfigInnerServiceSMO smsConfigInnerServiceSMOImpl;
    /**
     * @param smsConfigPo 数据
     * @return 订单服务能够接受的报文
     */
    @Java110Transactional
    public ResponseEntity<String> delete(SmsConfigPo smsConfigPo) {
        int flag = smsConfigInnerServiceSMOImpl.deleteSmsConfig(smsConfigPo);
        if (flag > 0) {
            return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功");
        }
        return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败");
    }
}
service-common/src/main/java/com/java110/common/bmo/smsConfig/impl/GetSmsConfigBMOImpl.java
New file
@@ -0,0 +1,44 @@
package com.java110.common.bmo.smsConfig.impl;
import com.java110.common.bmo.smsConfig.IGetSmsConfigBMO;
import com.java110.dto.smsConfig.SmsConfigDto;
import com.java110.intf.common.ISmsConfigInnerServiceSMO;
import com.java110.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
@Service("getSmsConfigBMOImpl")
public class GetSmsConfigBMOImpl implements IGetSmsConfigBMO {
    @Autowired
    private ISmsConfigInnerServiceSMO smsConfigInnerServiceSMOImpl;
    /**
     * @param smsConfigDto
     * @return 订单服务能够接受的报文
     */
    public ResponseEntity<String> get(SmsConfigDto smsConfigDto) {
        int count = smsConfigInnerServiceSMOImpl.querySmsConfigsCount(smsConfigDto);
        List<SmsConfigDto> smsConfigDtos = null;
        if (count > 0) {
            smsConfigDtos = smsConfigInnerServiceSMOImpl.querySmsConfigs(smsConfigDto);
        } else {
            smsConfigDtos = new ArrayList<>();
        }
        ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) smsConfigDto.getRow()), count, smsConfigDtos);
        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
        return responseEntity;
    }
}
service-common/src/main/java/com/java110/common/bmo/smsConfig/impl/SaveSmsConfigBMOImpl.java
New file
@@ -0,0 +1,38 @@
package com.java110.common.bmo.smsConfig.impl;
import com.java110.common.bmo.smsConfig.ISaveSmsConfigBMO;
import com.java110.core.annotation.Java110Transactional;
import com.java110.core.factory.GenerateCodeFactory;
import com.java110.intf.common.ISmsConfigInnerServiceSMO;
import com.java110.po.smsConfig.SmsConfigPo;
import com.java110.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
@Service("saveSmsConfigBMOImpl")
public class SaveSmsConfigBMOImpl implements ISaveSmsConfigBMO {
    @Autowired
    private ISmsConfigInnerServiceSMO smsConfigInnerServiceSMOImpl;
    /**
     * 添加小区信息
     *
     * @param smsConfigPo
     * @return 订单服务能够接受的报文
     */
    @Java110Transactional
    public ResponseEntity<String> save(SmsConfigPo smsConfigPo) {
        smsConfigPo.setSmsId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_smsId));
        int flag = smsConfigInnerServiceSMOImpl.saveSmsConfig(smsConfigPo);
        if (flag > 0) {
            return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功");
        }
        return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败");
    }
}
service-common/src/main/java/com/java110/common/bmo/smsConfig/impl/UpdateSmsConfigBMOImpl.java
New file
@@ -0,0 +1,34 @@
package com.java110.common.bmo.smsConfig.impl;
import com.java110.common.bmo.smsConfig.IUpdateSmsConfigBMO;
import com.java110.core.annotation.Java110Transactional;
import com.java110.intf.common.ISmsConfigInnerServiceSMO;
import com.java110.po.smsConfig.SmsConfigPo;
import com.java110.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
@Service("updateSmsConfigBMOImpl")
public class UpdateSmsConfigBMOImpl implements IUpdateSmsConfigBMO {
    @Autowired
    private ISmsConfigInnerServiceSMO smsConfigInnerServiceSMOImpl;
    /**
     * @param smsConfigPo
     * @return 订单服务能够接受的报文
     */
    @Java110Transactional
    public ResponseEntity<String> update(SmsConfigPo smsConfigPo) {
        int flag = smsConfigInnerServiceSMOImpl.updateSmsConfig(smsConfigPo);
        if (flag > 0) {
            return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功");
        }
        return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败");
    }
}
service-common/src/main/java/com/java110/common/dao/ISmsConfigServiceDao.java
New file
@@ -0,0 +1,61 @@
package com.java110.common.dao;
import com.java110.utils.exception.DAOException;
import com.java110.entity.merchant.BoMerchant;
import com.java110.entity.merchant.BoMerchantAttr;
import com.java110.entity.merchant.Merchant;
import com.java110.entity.merchant.MerchantAttr;
import java.util.List;
import java.util.Map;
/**
 * 短信配置组件内部之间使用,没有给外围系统提供服务能力
 * 短信配置服务接口类,要求全部以字符串传输,方便微服务化
 * 新建客户,修改客户,删除客户,查询客户等功能
 *
 * Created by wuxw on 2016/12/27.
 */
public interface ISmsConfigServiceDao {
    /**
     * 保存 短信配置信息
     * @param info
     * @throws DAOException DAO异常
     */
    void saveSmsConfigInfo(Map info) throws DAOException;
    /**
     * 查询短信配置信息(instance过程)
     * 根据bId 查询短信配置信息
     * @param info bId 信息
     * @return 短信配置信息
     * @throws DAOException DAO异常
     */
    List<Map> getSmsConfigInfo(Map info) throws DAOException;
    /**
     * 修改短信配置信息
     * @param info 修改信息
     * @throws DAOException DAO异常
     */
    void updateSmsConfigInfo(Map info) throws DAOException;
    /**
     * 查询短信配置总数
     *
     * @param info 短信配置信息
     * @return 短信配置数量
     */
    int querySmsConfigsCount(Map info);
}
service-common/src/main/java/com/java110/common/dao/impl/SmsConfigServiceDaoImpl.java
New file
@@ -0,0 +1,98 @@
package com.java110.common.dao.impl;
import com.alibaba.fastjson.JSONObject;
import com.java110.utils.constant.ResponseConstant;
import com.java110.utils.exception.DAOException;
import com.java110.utils.util.DateUtil;
import com.java110.core.base.dao.BaseServiceDao;
import com.java110.common.dao.ISmsConfigServiceDao;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
/**
 * 短信配置服务 与数据库交互
 * Created by wuxw on 2017/4/5.
 */
@Service("smsConfigServiceDaoImpl")
//@Transactional
public class SmsConfigServiceDaoImpl extends BaseServiceDao implements ISmsConfigServiceDao {
    private static Logger logger = LoggerFactory.getLogger(SmsConfigServiceDaoImpl.class);
    /**
     * 保存短信配置信息 到 instance
     * @param info   bId 信息
     * @throws DAOException DAO异常
     */
    @Override
    public void saveSmsConfigInfo(Map info) throws DAOException {
        logger.debug("保存短信配置信息Instance 入参 info : {}",info);
        int saveFlag = sqlSessionTemplate.insert("smsConfigServiceDaoImpl.saveSmsConfigInfo",info);
        if(saveFlag < 1){
            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存短信配置信息Instance数据失败:"+ JSONObject.toJSONString(info));
        }
    }
    /**
     * 查询短信配置信息(instance)
     * @param info bId 信息
     * @return List<Map>
     * @throws DAOException DAO异常
     */
    @Override
    public List<Map> getSmsConfigInfo(Map info) throws DAOException {
        logger.debug("查询短信配置信息 入参 info : {}",info);
        List<Map> businessSmsConfigInfos = sqlSessionTemplate.selectList("smsConfigServiceDaoImpl.getSmsConfigInfo",info);
        return businessSmsConfigInfos;
    }
    /**
     * 修改短信配置信息
     * @param info 修改信息
     * @throws DAOException DAO异常
     */
    @Override
    public void updateSmsConfigInfo(Map info) throws DAOException {
        logger.debug("修改短信配置信息Instance 入参 info : {}",info);
        int saveFlag = sqlSessionTemplate.update("smsConfigServiceDaoImpl.updateSmsConfigInfo",info);
        if(saveFlag < 1){
            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改短信配置信息Instance数据失败:"+ JSONObject.toJSONString(info));
        }
    }
     /**
     * 查询短信配置数量
     * @param info 短信配置信息
     * @return 短信配置数量
     */
    @Override
    public int querySmsConfigsCount(Map info) {
        logger.debug("查询短信配置数据 入参 info : {}",info);
        List<Map> businessSmsConfigInfos = sqlSessionTemplate.selectList("smsConfigServiceDaoImpl.querySmsConfigsCount", info);
        if (businessSmsConfigInfos.size() < 1) {
            return 0;
        }
        return Integer.parseInt(businessSmsConfigInfos.get(0).get("count").toString());
    }
}
service-common/src/main/java/com/java110/common/smo/impl/SmsConfigInnerServiceSMOImpl.java
New file
@@ -0,0 +1,83 @@
package com.java110.common.smo.impl;
import com.java110.common.dao.ISmsConfigServiceDao;
import com.java110.core.base.smo.BaseServiceSMO;
import com.java110.dto.PageDto;
import com.java110.dto.smsConfig.SmsConfigDto;
import com.java110.intf.common.ISmsConfigInnerServiceSMO;
import com.java110.po.smsConfig.SmsConfigPo;
import com.java110.utils.util.BeanConvertUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
 * @ClassName FloorInnerServiceSMOImpl
 * @Description 短信配置内部服务实现类
 * @Author wuxw
 * @Date 2019/4/24 9:20
 * @Version 1.0
 * add by wuxw 2019/4/24
 **/
@RestController
public class SmsConfigInnerServiceSMOImpl extends BaseServiceSMO implements ISmsConfigInnerServiceSMO {
    @Autowired
    private ISmsConfigServiceDao smsConfigServiceDaoImpl;
    @Override
    public int saveSmsConfig(@RequestBody SmsConfigPo smsConfigPo) {
        int saveFlag = 1;
        smsConfigServiceDaoImpl.saveSmsConfigInfo(BeanConvertUtil.beanCovertMap(smsConfigPo));
        return saveFlag;
    }
    @Override
    public int updateSmsConfig(@RequestBody SmsConfigPo smsConfigPo) {
        int saveFlag = 1;
        smsConfigServiceDaoImpl.updateSmsConfigInfo(BeanConvertUtil.beanCovertMap(smsConfigPo));
        return saveFlag;
    }
    @Override
    public int deleteSmsConfig(@RequestBody SmsConfigPo smsConfigPo) {
        int saveFlag = 1;
        smsConfigPo.setStatusCd("1");
        smsConfigServiceDaoImpl.updateSmsConfigInfo(BeanConvertUtil.beanCovertMap(smsConfigPo));
        return saveFlag;
    }
    @Override
    public List<SmsConfigDto> querySmsConfigs(@RequestBody SmsConfigDto smsConfigDto) {
        //校验是否传了 分页信息
        int page = smsConfigDto.getPage();
        if (page != PageDto.DEFAULT_PAGE) {
            smsConfigDto.setPage((page - 1) * smsConfigDto.getRow());
        }
        List<SmsConfigDto> smsConfigs = BeanConvertUtil.covertBeanList(smsConfigServiceDaoImpl.getSmsConfigInfo(BeanConvertUtil.beanCovertMap(smsConfigDto)), SmsConfigDto.class);
        return smsConfigs;
    }
    @Override
    public int querySmsConfigsCount(@RequestBody SmsConfigDto smsConfigDto) {
        return smsConfigServiceDaoImpl.querySmsConfigsCount(BeanConvertUtil.beanCovertMap(smsConfigDto));
    }
    public ISmsConfigServiceDao getSmsConfigServiceDaoImpl() {
        return smsConfigServiceDaoImpl;
    }
    public void setSmsConfigServiceDaoImpl(ISmsConfigServiceDao smsConfigServiceDaoImpl) {
        this.smsConfigServiceDaoImpl = smsConfigServiceDaoImpl;
    }
}