| New file |
| | |
| | | package com.java110.dto.attrSpec; |
| | | |
| | | 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 AttrSpecDto extends PageDto implements Serializable { |
| | | |
| | | private String specType; |
| | | private String specName; |
| | | private String specHoldplace; |
| | | private String specValueType; |
| | | private String specCd; |
| | | private String specShow; |
| | | private String required; |
| | | private String tableName; |
| | | private String listShow; |
| | | |
| | | |
| | | private Date createTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | |
| | | public String getSpecType() { |
| | | return specType; |
| | | } |
| | | public void setSpecType(String specType) { |
| | | this.specType = specType; |
| | | } |
| | | public String getSpecName() { |
| | | return specName; |
| | | } |
| | | public void setSpecName(String specName) { |
| | | this.specName = specName; |
| | | } |
| | | public String getSpecHoldplace() { |
| | | return specHoldplace; |
| | | } |
| | | public void setSpecHoldplace(String specHoldplace) { |
| | | this.specHoldplace = specHoldplace; |
| | | } |
| | | public String getSpecValueType() { |
| | | return specValueType; |
| | | } |
| | | public void setSpecValueType(String specValueType) { |
| | | this.specValueType = specValueType; |
| | | } |
| | | public String getSpecCd() { |
| | | return specCd; |
| | | } |
| | | public void setSpecCd(String specCd) { |
| | | this.specCd = specCd; |
| | | } |
| | | public String getSpecShow() { |
| | | return specShow; |
| | | } |
| | | public void setSpecShow(String specShow) { |
| | | this.specShow = specShow; |
| | | } |
| | | public String getRequired() { |
| | | return required; |
| | | } |
| | | public void setRequired(String required) { |
| | | this.required = required; |
| | | } |
| | | public String getTableName() { |
| | | return tableName; |
| | | } |
| | | public void setTableName(String tableName) { |
| | | this.tableName = tableName; |
| | | } |
| | | public String getListShow() { |
| | | return listShow; |
| | | } |
| | | public void setListShow(String listShow) { |
| | | this.listShow = listShow; |
| | | } |
| | | |
| | | |
| | | 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; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.po.attrSpec; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | public class AttrSpecPo implements Serializable { |
| | | |
| | | private String specType; |
| | | private String specName; |
| | | private String specHoldplace; |
| | | private String specValueType; |
| | | private String specCd; |
| | | private String statusCd = "0"; |
| | | private String specShow; |
| | | private String required; |
| | | private String tableName; |
| | | private String listShow; |
| | | public String getSpecType() { |
| | | return specType; |
| | | } |
| | | public void setSpecType(String specType) { |
| | | this.specType = specType; |
| | | } |
| | | public String getSpecName() { |
| | | return specName; |
| | | } |
| | | public void setSpecName(String specName) { |
| | | this.specName = specName; |
| | | } |
| | | public String getSpecHoldplace() { |
| | | return specHoldplace; |
| | | } |
| | | public void setSpecHoldplace(String specHoldplace) { |
| | | this.specHoldplace = specHoldplace; |
| | | } |
| | | public String getSpecValueType() { |
| | | return specValueType; |
| | | } |
| | | public void setSpecValueType(String specValueType) { |
| | | this.specValueType = specValueType; |
| | | } |
| | | public String getSpecCd() { |
| | | return specCd; |
| | | } |
| | | public void setSpecCd(String specCd) { |
| | | this.specCd = specCd; |
| | | } |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | public String getSpecShow() { |
| | | return specShow; |
| | | } |
| | | public void setSpecShow(String specShow) { |
| | | this.specShow = specShow; |
| | | } |
| | | public String getRequired() { |
| | | return required; |
| | | } |
| | | public void setRequired(String required) { |
| | | this.required = required; |
| | | } |
| | | public String getTableName() { |
| | | return tableName; |
| | | } |
| | | public void setTableName(String tableName) { |
| | | this.tableName = tableName; |
| | | } |
| | | public String getListShow() { |
| | | return listShow; |
| | | } |
| | | public void setListShow(String listShow) { |
| | | this.listShow = listShow; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | <?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="attrSpecServiceDaoImpl"> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 保存属性规格表信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveAttrSpecInfo" parameterType="Map"> |
| | | insert into attr_spec( |
| | | spec_type,spec_name,spec_holdplace,spec_value_type,spec_cd,spec_show,required,table_name,list_show |
| | | ) values ( |
| | | #{specType},#{specName},#{specHoldplace},#{specValueType},#{specCd},#{specShow},#{required},#{tableName},#{listShow} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | |
| | | <!-- 查询属性规格表信息 add by wuxw 2018-07-03 --> |
| | | <select id="getAttrSpecInfo" parameterType="Map" resultType="Map"> |
| | | select t.spec_type,t.spec_type specType,t.spec_name,t.spec_name specName,t.spec_holdplace,t.spec_holdplace specHoldplace,t.spec_value_type,t.spec_value_type specValueType,t.spec_cd,t.spec_cd specCd,t.status_cd,t.status_cd statusCd,t.spec_show,t.spec_show specShow,t.required,t.table_name,t.table_name tableName,t.list_show,t.list_show listShow |
| | | from attr_spec t |
| | | where 1 =1 |
| | | <if test="specType !=null and specType != ''"> |
| | | and t.spec_type= #{specType} |
| | | </if> |
| | | <if test="specName !=null and specName != ''"> |
| | | and t.spec_name= #{specName} |
| | | </if> |
| | | <if test="specHoldplace !=null and specHoldplace != ''"> |
| | | and t.spec_holdplace= #{specHoldplace} |
| | | </if> |
| | | <if test="specValueType !=null and specValueType != ''"> |
| | | and t.spec_value_type= #{specValueType} |
| | | </if> |
| | | <if test="specCd !=null and specCd != ''"> |
| | | and t.spec_cd= #{specCd} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="specShow !=null and specShow != ''"> |
| | | and t.spec_show= #{specShow} |
| | | </if> |
| | | <if test="required !=null and required != ''"> |
| | | and t.required= #{required} |
| | | </if> |
| | | <if test="tableName !=null and tableName != ''"> |
| | | and t.table_name= #{tableName} |
| | | </if> |
| | | <if test="listShow !=null and listShow != ''"> |
| | | and t.list_show= #{listShow} |
| | | </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="updateAttrSpecInfo" parameterType="Map"> |
| | | update attr_spec t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="specType !=null and specType != ''"> |
| | | , t.spec_type= #{specType} |
| | | </if> |
| | | <if test="specName !=null and specName != ''"> |
| | | , t.spec_name= #{specName} |
| | | </if> |
| | | <if test="specHoldplace !=null and specHoldplace != ''"> |
| | | , t.spec_holdplace= #{specHoldplace} |
| | | </if> |
| | | <if test="specValueType !=null and specValueType != ''"> |
| | | , t.spec_value_type= #{specValueType} |
| | | </if> |
| | | <if test="specShow !=null and specShow != ''"> |
| | | , t.spec_show= #{specShow} |
| | | </if> |
| | | <if test="required !=null and required != ''"> |
| | | , t.required= #{required} |
| | | </if> |
| | | <if test="tableName !=null and tableName != ''"> |
| | | , t.table_name= #{tableName} |
| | | </if> |
| | | <if test="listShow !=null and listShow != ''"> |
| | | , t.list_show= #{listShow} |
| | | </if> |
| | | where 1=1 <if test="specCd !=null and specCd != ''"> |
| | | and t.spec_cd= #{specCd} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询属性规格表数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryAttrSpecsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from attr_spec t |
| | | where 1 =1 |
| | | <if test="specType !=null and specType != ''"> |
| | | and t.spec_type= #{specType} |
| | | </if> |
| | | <if test="specName !=null and specName != ''"> |
| | | and t.spec_name= #{specName} |
| | | </if> |
| | | <if test="specHoldplace !=null and specHoldplace != ''"> |
| | | and t.spec_holdplace= #{specHoldplace} |
| | | </if> |
| | | <if test="specValueType !=null and specValueType != ''"> |
| | | and t.spec_value_type= #{specValueType} |
| | | </if> |
| | | <if test="specCd !=null and specCd != ''"> |
| | | and t.spec_cd= #{specCd} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="specShow !=null and specShow != ''"> |
| | | and t.spec_show= #{specShow} |
| | | </if> |
| | | <if test="required !=null and required != ''"> |
| | | and t.required= #{required} |
| | | </if> |
| | | <if test="tableName !=null and tableName != ''"> |
| | | and t.table_name= #{tableName} |
| | | </if> |
| | | <if test="listShow !=null and listShow != ''"> |
| | | and t.list_show= #{listShow} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | { |
| | | "autoMove": true, |
| | | "id": "ifdId", |
| | | "name": "importFeeDetail", |
| | | "desc": "费用导入明细", |
| | | "shareParam": "communityId", |
| | | "shareColumn": "community_id", |
| | | "shareName": "fee", |
| | | "tableName": "import_fee_detail", |
| | | "id": "specCd", |
| | | "name": "attrSpec", |
| | | "desc": "属性规格表", |
| | | "shareParam": "specCd", |
| | | "shareColumn": "spec_cd", |
| | | "shareName": "common", |
| | | "tableName": "attr_spec", |
| | | "param": { |
| | | "ifdId": "ifd_id", |
| | | "floorNum": "floor_num", |
| | | "unitNum": "unit_num", |
| | | "roomNum": "room_num", |
| | | "feeName": "fee_name", |
| | | "startTime": "start_time", |
| | | "endTime": "end_time", |
| | | "amount": "amount", |
| | | "roomId": "room_id", |
| | | "feeId": "fee_id", |
| | | "state": "state", |
| | | "communityId": "community_id", |
| | | "specCd": "spec_cd", |
| | | "tableName": "table_name", |
| | | "specName": "spec_name", |
| | | "specHoldplace": "spec_holdplace", |
| | | "required": "required", |
| | | "specShow": "spec_show", |
| | | "specValueType": "spec_value_type", |
| | | "specType": "spec_type", |
| | | "listShow": "list_show", |
| | | "statusCd": "status_cd" |
| | | }, |
| | | "required": [ |
| | | { |
| | | "code": "ifdId", |
| | | "msg": "费用导入明细不能为空" |
| | | "code": "specCd", |
| | | "msg": "规格ID不能为空" |
| | | }, |
| | | { |
| | | "code": "tableName", |
| | | "msg": "表名称不能为空" |
| | | },{ |
| | | "code": "specName", |
| | | "msg": "规格名称不能为空" |
| | | },{ |
| | | "code": "specHoldplace", |
| | | "msg": "提示不能为空" |
| | | },{ |
| | | "code": "required", |
| | | "msg": "必填不能为空" |
| | | },{ |
| | | "code": "specShow", |
| | | "msg": "是否显示不能为空" |
| | | },{ |
| | | "code": "specValueType", |
| | | "msg": "规格值不能为空" |
| | | },{ |
| | | "code": "specType", |
| | | "msg": "规格类型不能为空" |
| | | },{ |
| | | "code": "listShow", |
| | | "msg": "是否list中显示不能为空" |
| | | } |
| | | ] |
| | | } |
| New file |
| | |
| | | { |
| | | "autoMove": true, |
| | | "id": "ifdId", |
| | | "name": "importFeeDetail", |
| | | "desc": "费用导入明细", |
| | | "shareParam": "communityId", |
| | | "shareColumn": "community_id", |
| | | "shareName": "fee", |
| | | "tableName": "import_fee_detail", |
| | | "param": { |
| | | "ifdId": "ifd_id", |
| | | "floorNum": "floor_num", |
| | | "unitNum": "unit_num", |
| | | "roomNum": "room_num", |
| | | "feeName": "fee_name", |
| | | "startTime": "start_time", |
| | | "endTime": "end_time", |
| | | "amount": "amount", |
| | | "roomId": "room_id", |
| | | "feeId": "fee_id", |
| | | "state": "state", |
| | | "communityId": "community_id", |
| | | "statusCd": "status_cd" |
| | | }, |
| | | "required": [ |
| | | { |
| | | "code": "ifdId", |
| | | "msg": "费用导入明细不能为空" |
| | | } |
| | | ] |
| | | } |
| New file |
| | |
| | | package com.java110.intf.common; |
| | | |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.attrSpec.AttrSpecDto; |
| | | import com.java110.po.attrSpec.AttrSpecPo; |
| | | 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 IAttrSpecInnerServiceSMO |
| | | * @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("/attrSpecApi") |
| | | public interface IAttrSpecInnerServiceSMO { |
| | | |
| | | |
| | | @RequestMapping(value = "/saveAttrSpec", method = RequestMethod.POST) |
| | | public int saveAttrSpec(@RequestBody AttrSpecPo attrSpecPo); |
| | | |
| | | @RequestMapping(value = "/updateAttrSpec", method = RequestMethod.POST) |
| | | public int updateAttrSpec(@RequestBody AttrSpecPo attrSpecPo); |
| | | |
| | | @RequestMapping(value = "/deleteAttrSpec", method = RequestMethod.POST) |
| | | public int deleteAttrSpec(@RequestBody AttrSpecPo attrSpecPo); |
| | | |
| | | /** |
| | | * <p>查询小区楼信息</p> |
| | | * |
| | | * @param attrSpecDto 数据对象分享 |
| | | * @return AttrSpecDto 对象数据 |
| | | */ |
| | | @RequestMapping(value = "/queryAttrSpecs", method = RequestMethod.POST) |
| | | List<AttrSpecDto> queryAttrSpecs(@RequestBody AttrSpecDto attrSpecDto); |
| | | |
| | | /** |
| | | * 查询<p>小区楼</p>总记录数 |
| | | * |
| | | * @param attrSpecDto 数据对象分享 |
| | | * @return 小区下的小区楼记录数 |
| | | */ |
| | | @RequestMapping(value = "/queryAttrSpecsCount", method = RequestMethod.POST) |
| | | int queryAttrSpecsCount(@RequestBody AttrSpecDto attrSpecDto); |
| | | } |
| New file |
| | |
| | | package com.java110.common.api; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.common.bmo.attrSpec.IDeleteAttrSpecBMO; |
| | | import com.java110.common.bmo.attrSpec.IGetAttrSpecBMO; |
| | | import com.java110.common.bmo.attrSpec.ISaveAttrSpecBMO; |
| | | import com.java110.common.bmo.attrSpec.IUpdateAttrSpecBMO; |
| | | import com.java110.dto.attrSpec.AttrSpecDto; |
| | | import com.java110.po.attrSpec.AttrSpecPo; |
| | | 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 = "/attrSpec") |
| | | public class AttrSpecApi { |
| | | |
| | | @Autowired |
| | | private ISaveAttrSpecBMO saveAttrSpecBMOImpl; |
| | | @Autowired |
| | | private IUpdateAttrSpecBMO updateAttrSpecBMOImpl; |
| | | @Autowired |
| | | private IDeleteAttrSpecBMO deleteAttrSpecBMOImpl; |
| | | |
| | | @Autowired |
| | | private IGetAttrSpecBMO getAttrSpecBMOImpl; |
| | | |
| | | /** |
| | | * 微信保存消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /attrSpec/saveAttrSpec |
| | | * @path /app/attrSpec/saveAttrSpec |
| | | */ |
| | | @RequestMapping(value = "/saveAttrSpec", method = RequestMethod.POST) |
| | | public ResponseEntity<String> saveAttrSpec(@RequestBody JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "specCd", "请求报文中未包含specCd"); |
| | | Assert.hasKeyAndValue(reqJson, "tableName", "请求报文中未包含tableName"); |
| | | Assert.hasKeyAndValue(reqJson, "specName", "请求报文中未包含specName"); |
| | | Assert.hasKeyAndValue(reqJson, "specHoldplace", "请求报文中未包含specHoldplace"); |
| | | Assert.hasKeyAndValue(reqJson, "required", "请求报文中未包含required"); |
| | | Assert.hasKeyAndValue(reqJson, "specShow", "请求报文中未包含specShow"); |
| | | Assert.hasKeyAndValue(reqJson, "specValueType", "请求报文中未包含specValueType"); |
| | | Assert.hasKeyAndValue(reqJson, "specType", "请求报文中未包含specType"); |
| | | Assert.hasKeyAndValue(reqJson, "listShow", "请求报文中未包含listShow"); |
| | | |
| | | |
| | | AttrSpecPo attrSpecPo = BeanConvertUtil.covertBean(reqJson, AttrSpecPo.class); |
| | | return saveAttrSpecBMOImpl.save(attrSpecPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信修改消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /attrSpec/updateAttrSpec |
| | | * @path /app/attrSpec/updateAttrSpec |
| | | */ |
| | | @RequestMapping(value = "/updateAttrSpec", method = RequestMethod.POST) |
| | | public ResponseEntity<String> updateAttrSpec(@RequestBody JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "specCd", "请求报文中未包含specCd"); |
| | | Assert.hasKeyAndValue(reqJson, "tableName", "请求报文中未包含tableName"); |
| | | Assert.hasKeyAndValue(reqJson, "specName", "请求报文中未包含specName"); |
| | | Assert.hasKeyAndValue(reqJson, "specHoldplace", "请求报文中未包含specHoldplace"); |
| | | Assert.hasKeyAndValue(reqJson, "required", "请求报文中未包含required"); |
| | | Assert.hasKeyAndValue(reqJson, "specShow", "请求报文中未包含specShow"); |
| | | Assert.hasKeyAndValue(reqJson, "specValueType", "请求报文中未包含specValueType"); |
| | | Assert.hasKeyAndValue(reqJson, "specType", "请求报文中未包含specType"); |
| | | Assert.hasKeyAndValue(reqJson, "listShow", "请求报文中未包含listShow"); |
| | | Assert.hasKeyAndValue(reqJson, "specCd", "specCd不能为空"); |
| | | |
| | | |
| | | AttrSpecPo attrSpecPo = BeanConvertUtil.covertBean(reqJson, AttrSpecPo.class); |
| | | return updateAttrSpecBMOImpl.update(attrSpecPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信删除消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /attrSpec/deleteAttrSpec |
| | | * @path /app/attrSpec/deleteAttrSpec |
| | | */ |
| | | @RequestMapping(value = "/deleteAttrSpec", method = RequestMethod.POST) |
| | | public ResponseEntity<String> deleteAttrSpec(@RequestBody JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空"); |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "specCd", "specCd不能为空"); |
| | | |
| | | |
| | | AttrSpecPo attrSpecPo = BeanConvertUtil.covertBean(reqJson, AttrSpecPo.class); |
| | | return deleteAttrSpecBMOImpl.delete(attrSpecPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信删除消息模板 |
| | | * |
| | | * @param tableName 小区表名 |
| | | * @return |
| | | * @serviceCode /attrSpec/queryAttrSpec |
| | | * @path /app/attrSpec/queryAttrSpec |
| | | */ |
| | | @RequestMapping(value = "/queryAttrSpec", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryAttrSpec(@RequestParam(value = "tableName") String tableName) { |
| | | AttrSpecDto attrSpecDto = new AttrSpecDto(); |
| | | attrSpecDto.setTableName(tableName); |
| | | return getAttrSpecBMOImpl.get(attrSpecDto); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.common.bmo.attrSpec; |
| | | |
| | | import com.java110.po.attrSpec.AttrSpecPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface IDeleteAttrSpecBMO { |
| | | |
| | | |
| | | /** |
| | | * 修改属性规格表 |
| | | * add by wuxw |
| | | * |
| | | * @param attrSpecPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> delete(AttrSpecPo attrSpecPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.common.bmo.attrSpec; |
| | | |
| | | import com.java110.dto.attrSpec.AttrSpecDto; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface IGetAttrSpecBMO { |
| | | |
| | | |
| | | /** |
| | | * 查询属性规格表 |
| | | * add by wuxw |
| | | * |
| | | * @param attrSpecDto |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> get(AttrSpecDto attrSpecDto); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.common.bmo.attrSpec; |
| | | |
| | | import com.java110.po.attrSpec.AttrSpecPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface ISaveAttrSpecBMO { |
| | | |
| | | |
| | | /** |
| | | * 添加属性规格表 |
| | | * add by wuxw |
| | | * |
| | | * @param attrSpecPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> save(AttrSpecPo attrSpecPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.common.bmo.attrSpec; |
| | | |
| | | import com.java110.po.attrSpec.AttrSpecPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface IUpdateAttrSpecBMO { |
| | | |
| | | |
| | | /** |
| | | * 修改属性规格表 |
| | | * add by wuxw |
| | | * |
| | | * @param attrSpecPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> update(AttrSpecPo attrSpecPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.common.bmo.attrSpec.impl; |
| | | |
| | | import com.java110.common.bmo.attrSpec.IDeleteAttrSpecBMO; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.intf.common.IAttrSpecInnerServiceSMO; |
| | | import com.java110.po.attrSpec.AttrSpecPo; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("deleteAttrSpecBMOImpl") |
| | | public class DeleteAttrSpecBMOImpl implements IDeleteAttrSpecBMO { |
| | | |
| | | @Autowired |
| | | private IAttrSpecInnerServiceSMO attrSpecInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param attrSpecPo 数据 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> delete(AttrSpecPo attrSpecPo) { |
| | | |
| | | int flag = attrSpecInnerServiceSMOImpl.deleteAttrSpec(attrSpecPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.common.bmo.attrSpec.impl; |
| | | |
| | | import com.java110.common.bmo.attrSpec.IGetAttrSpecBMO; |
| | | import com.java110.dto.attrSpec.AttrSpecDto; |
| | | import com.java110.intf.common.IAttrSpecInnerServiceSMO; |
| | | 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("getAttrSpecBMOImpl") |
| | | public class GetAttrSpecBMOImpl implements IGetAttrSpecBMO { |
| | | |
| | | @Autowired |
| | | private IAttrSpecInnerServiceSMO attrSpecInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param attrSpecDto |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | public ResponseEntity<String> get(AttrSpecDto attrSpecDto) { |
| | | |
| | | |
| | | int count = attrSpecInnerServiceSMOImpl.queryAttrSpecsCount(attrSpecDto); |
| | | |
| | | List<AttrSpecDto> attrSpecDtos = null; |
| | | if (count > 0) { |
| | | attrSpecDtos = attrSpecInnerServiceSMOImpl.queryAttrSpecs(attrSpecDto); |
| | | } else { |
| | | attrSpecDtos = new ArrayList<>(); |
| | | } |
| | | |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) attrSpecDto.getRow()), count, attrSpecDtos); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | | return responseEntity; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.common.bmo.attrSpec.impl; |
| | | |
| | | import com.java110.common.bmo.attrSpec.ISaveAttrSpecBMO; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.intf.common.IAttrSpecInnerServiceSMO; |
| | | import com.java110.po.attrSpec.AttrSpecPo; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("saveAttrSpecBMOImpl") |
| | | public class SaveAttrSpecBMOImpl implements ISaveAttrSpecBMO { |
| | | |
| | | @Autowired |
| | | private IAttrSpecInnerServiceSMO attrSpecInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * 添加小区信息 |
| | | * |
| | | * @param attrSpecPo |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> save(AttrSpecPo attrSpecPo) { |
| | | |
| | | //attrSpecPo.setSpecCd(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_specCd)); |
| | | int flag = attrSpecInnerServiceSMOImpl.saveAttrSpec(attrSpecPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.common.bmo.attrSpec.impl; |
| | | |
| | | import com.java110.common.bmo.attrSpec.IUpdateAttrSpecBMO; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.intf.common.IAttrSpecInnerServiceSMO; |
| | | import com.java110.po.attrSpec.AttrSpecPo; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("updateAttrSpecBMOImpl") |
| | | public class UpdateAttrSpecBMOImpl implements IUpdateAttrSpecBMO { |
| | | |
| | | @Autowired |
| | | private IAttrSpecInnerServiceSMO attrSpecInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param attrSpecPo |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> update(AttrSpecPo attrSpecPo) { |
| | | |
| | | int flag = attrSpecInnerServiceSMOImpl.updateAttrSpec(attrSpecPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | 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 IAttrSpecServiceDao { |
| | | |
| | | |
| | | /** |
| | | * 保存 属性规格表信息 |
| | | * @param info |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void saveAttrSpecInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询属性规格表信息(instance过程) |
| | | * 根据bId 查询属性规格表信息 |
| | | * @param info bId 信息 |
| | | * @return 属性规格表信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | List<Map> getAttrSpecInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 修改属性规格表信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void updateAttrSpecInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 查询属性规格表总数 |
| | | * |
| | | * @param info 属性规格表信息 |
| | | * @return 属性规格表数量 |
| | | */ |
| | | int queryAttrSpecsCount(Map info); |
| | | |
| | | } |
| New file |
| | |
| | | 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.IAttrSpecServiceDao; |
| | | 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("attrSpecServiceDaoImpl") |
| | | //@Transactional |
| | | public class AttrSpecServiceDaoImpl extends BaseServiceDao implements IAttrSpecServiceDao { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(AttrSpecServiceDaoImpl.class); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 保存属性规格表信息 到 instance |
| | | * @param info bId 信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void saveAttrSpecInfo(Map info) throws DAOException { |
| | | logger.debug("保存属性规格表信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("attrSpecServiceDaoImpl.saveAttrSpecInfo",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> getAttrSpecInfo(Map info) throws DAOException { |
| | | logger.debug("查询属性规格表信息 入参 info : {}",info); |
| | | |
| | | List<Map> businessAttrSpecInfos = sqlSessionTemplate.selectList("attrSpecServiceDaoImpl.getAttrSpecInfo",info); |
| | | |
| | | return businessAttrSpecInfos; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改属性规格表信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void updateAttrSpecInfo(Map info) throws DAOException { |
| | | logger.debug("修改属性规格表信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("attrSpecServiceDaoImpl.updateAttrSpecInfo",info); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改属性规格表信息Instance数据失败:"+ JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询属性规格表数量 |
| | | * @param info 属性规格表信息 |
| | | * @return 属性规格表数量 |
| | | */ |
| | | @Override |
| | | public int queryAttrSpecsCount(Map info) { |
| | | logger.debug("查询属性规格表数据 入参 info : {}",info); |
| | | |
| | | List<Map> businessAttrSpecInfos = sqlSessionTemplate.selectList("attrSpecServiceDaoImpl.queryAttrSpecsCount", info); |
| | | if (businessAttrSpecInfos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(businessAttrSpecInfos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.common.smo.impl; |
| | | |
| | | |
| | | import com.java110.common.dao.IAttrSpecServiceDao; |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.attrSpec.AttrSpecDto; |
| | | import com.java110.intf.common.IAttrSpecInnerServiceSMO; |
| | | import com.java110.po.attrSpec.AttrSpecPo; |
| | | 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 AttrSpecInnerServiceSMOImpl extends BaseServiceSMO implements IAttrSpecInnerServiceSMO { |
| | | |
| | | @Autowired |
| | | private IAttrSpecServiceDao attrSpecServiceDaoImpl; |
| | | |
| | | |
| | | @Override |
| | | public int saveAttrSpec(@RequestBody AttrSpecPo attrSpecPo) { |
| | | int saveFlag = 1; |
| | | attrSpecServiceDaoImpl.saveAttrSpecInfo(BeanConvertUtil.beanCovertMap(attrSpecPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int updateAttrSpec(@RequestBody AttrSpecPo attrSpecPo) { |
| | | int saveFlag = 1; |
| | | attrSpecServiceDaoImpl.updateAttrSpecInfo(BeanConvertUtil.beanCovertMap(attrSpecPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int deleteAttrSpec(@RequestBody AttrSpecPo attrSpecPo) { |
| | | int saveFlag = 1; |
| | | attrSpecPo.setStatusCd("1"); |
| | | attrSpecServiceDaoImpl.updateAttrSpecInfo(BeanConvertUtil.beanCovertMap(attrSpecPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public List<AttrSpecDto> queryAttrSpecs(@RequestBody AttrSpecDto attrSpecDto) { |
| | | |
| | | //校验是否传了 分页信息 |
| | | |
| | | int page = attrSpecDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | attrSpecDto.setPage((page - 1) * attrSpecDto.getRow()); |
| | | } |
| | | |
| | | List<AttrSpecDto> attrSpecs = BeanConvertUtil.covertBeanList(attrSpecServiceDaoImpl.getAttrSpecInfo(BeanConvertUtil.beanCovertMap(attrSpecDto)), AttrSpecDto.class); |
| | | |
| | | return attrSpecs; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int queryAttrSpecsCount(@RequestBody AttrSpecDto attrSpecDto) { |
| | | return attrSpecServiceDaoImpl.queryAttrSpecsCount(BeanConvertUtil.beanCovertMap(attrSpecDto)); |
| | | } |
| | | |
| | | public IAttrSpecServiceDao getAttrSpecServiceDaoImpl() { |
| | | return attrSpecServiceDaoImpl; |
| | | } |
| | | |
| | | public void setAttrSpecServiceDaoImpl(IAttrSpecServiceDao attrSpecServiceDaoImpl) { |
| | | this.attrSpecServiceDaoImpl = attrSpecServiceDaoImpl; |
| | | } |
| | | } |