| New file |
| | |
| | | package com.java110.dto.payFeeConfigDiscount; |
| | | |
| | | 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 PayFeeConfigDiscountDto extends PageDto implements Serializable { |
| | | |
| | | private String configDiscountId; |
| | | private String configId; |
| | | private String discountId; |
| | | private String communityId; |
| | | |
| | | |
| | | private Date createTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | |
| | | public String getConfigDiscountId() { |
| | | return configDiscountId; |
| | | } |
| | | public void setConfigDiscountId(String configDiscountId) { |
| | | this.configDiscountId = configDiscountId; |
| | | } |
| | | public String getConfigId() { |
| | | return configId; |
| | | } |
| | | public void setConfigId(String configId) { |
| | | this.configId = configId; |
| | | } |
| | | public String getDiscountId() { |
| | | return discountId; |
| | | } |
| | | public void setDiscountId(String discountId) { |
| | | this.discountId = discountId; |
| | | } |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | |
| | | |
| | | 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.payFeeConfigDiscount; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | public class PayFeeConfigDiscountPo implements Serializable { |
| | | |
| | | private String configDiscountId; |
| | | private String configId; |
| | | private String statusCd = "0"; |
| | | private String discountId; |
| | | private String communityId; |
| | | public String getConfigDiscountId() { |
| | | return configDiscountId; |
| | | } |
| | | public void setConfigDiscountId(String configDiscountId) { |
| | | this.configDiscountId = configDiscountId; |
| | | } |
| | | public String getConfigId() { |
| | | return configId; |
| | | } |
| | | public void setConfigId(String configId) { |
| | | this.configId = configId; |
| | | } |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | public String getDiscountId() { |
| | | return discountId; |
| | | } |
| | | public void setDiscountId(String discountId) { |
| | | this.discountId = discountId; |
| | | } |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | public static final String CODE_PREFIX_returnId = "12"; |
| | | public static final String CODE_PREFIX_discountId = "13"; |
| | | public static final String CODE_PREFIX_ruleId = "14"; |
| | | public static final String CODE_PREFIX_configDiscountId = "14"; |
| | | |
| | | |
| | | /** |
| 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="payFeeConfigDiscountServiceDaoImpl"> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 保存费用项折扣信息 add by wuxw 2018-07-03 --> |
| | | <insert id="savePayFeeConfigDiscountInfo" parameterType="Map"> |
| | | insert into pay_fee_config_discount( |
| | | config_discount_id,config_id,discount_id,community_id |
| | | ) values ( |
| | | #{configDiscountId},#{configId},#{discountId},#{communityId} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | |
| | | <!-- 查询费用项折扣信息 add by wuxw 2018-07-03 --> |
| | | <select id="getPayFeeConfigDiscountInfo" parameterType="Map" resultType="Map"> |
| | | select t.config_discount_id,t.config_discount_id configDiscountId,t.config_id,t.config_id configId,t.status_cd,t.status_cd statusCd,t.discount_id,t.discount_id discountId,t.community_id,t.community_id communityId |
| | | from pay_fee_config_discount t |
| | | where 1 =1 |
| | | <if test="configDiscountId !=null and configDiscountId != ''"> |
| | | and t.config_discount_id= #{configDiscountId} |
| | | </if> |
| | | <if test="configId !=null and configId != ''"> |
| | | and t.config_id= #{configId} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="discountId !=null and discountId != ''"> |
| | | and t.discount_id= #{discountId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </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="updatePayFeeConfigDiscountInfo" parameterType="Map"> |
| | | update pay_fee_config_discount t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="configId !=null and configId != ''"> |
| | | , t.config_id= #{configId} |
| | | </if> |
| | | <if test="discountId !=null and discountId != ''"> |
| | | , t.discount_id= #{discountId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | </if> |
| | | where 1=1 <if test="configDiscountId !=null and configDiscountId != ''"> |
| | | and t.config_discount_id= #{configDiscountId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询费用项折扣数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryPayFeeConfigDiscountsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from pay_fee_config_discount t |
| | | where 1 =1 |
| | | <if test="configDiscountId !=null and configDiscountId != ''"> |
| | | and t.config_discount_id= #{configDiscountId} |
| | | </if> |
| | | <if test="configId !=null and configId != ''"> |
| | | and t.config_id= #{configId} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="discountId !=null and discountId != ''"> |
| | | and t.discount_id= #{discountId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | { |
| | | "autoMove": true, |
| | | "id": "specId", |
| | | "name": "feeDiscountRuleSpec", |
| | | "desc": "折扣规则配置", |
| | | "shareParam": "ruleId", |
| | | "shareColumn": "rule_id", |
| | | "id": "configDiscountId", |
| | | "name": "payFeeConfigDiscount", |
| | | "desc": "费用项折扣", |
| | | "shareParam": "communityId", |
| | | "shareColumn": "community_id", |
| | | "shareName": "fee", |
| | | "tableName": "fee_discount_rule_spec", |
| | | "tableName": "pay_fee_config_discount", |
| | | "param": { |
| | | "specId": "spec_id", |
| | | "ruleId": "rule_id", |
| | | "specName": "spec_name", |
| | | "remark": "remark", |
| | | "configDiscountId": "config_discount_id", |
| | | "configId": "config_id", |
| | | "discountId": "discount_id", |
| | | "communityId": "community_id", |
| | | "statusCd": "status_cd" |
| | | }, |
| | | "required": [ |
| | | { |
| | | "code": "ruleId", |
| | | "msg": "规则不能为空" |
| | | "code": "configId", |
| | | "msg": "费用项不能为空" |
| | | }, |
| | | { |
| | | "code": "discountId", |
| | | "msg": "折扣不能为空" |
| | | }, |
| | | { |
| | | "code": "communityId", |
| | | "msg": "小区不能为空" |
| | | } |
| | | ] |
| | | } |
| | |
| | | { |
| | | "templateName": "费用折扣", |
| | | "directories": "property", |
| | | "templateCode": "feeDiscount", |
| | | "templateKey": "discountId", |
| | | "templateKeyName": "折扣ID", |
| | | "searchCode": "discountId", |
| | | "searchName": "折扣ID", |
| | | "templateCode": "payFeeConfigDiscount", |
| | | "templateKey": "configDiscountId", |
| | | "templateKeyName": "费用折扣ID", |
| | | "searchCode": "configDiscountId", |
| | | "searchName": "费用折扣ID", |
| | | "conditions": [ |
| | | { |
| | | "name": "折扣名称", |
| | | "inputType": "input", |
| | | "code": "discountName", |
| | | "whereCondition": "equal" |
| | | }, |
| | | { |
| | | "name": "折扣类型", |
| | | "inputType": "select", |
| | | "selectValue":"1001,2002", |
| | | "selectValueName":"优惠,违约", |
| | | "code": "discountType", |
| | | "whereCondition": "equal" |
| | | }, |
| | | { |
| | | "name": "规则名称", |
| | | "inputType": "input", |
| | | "code": "ruleName", |
| | | "code": "configId", |
| | | "whereCondition": "equal" |
| | | } |
| | | ], |
| | | "columns": [ |
| | | { |
| | | "code": "discountName", |
| | | "code": "discountId", |
| | | "cnCode": "折扣名称", |
| | | "desc": "必填,请填写折扣名称", |
| | | "required": true, |
| | | "hasDefaultValue": false, |
| | | "inputType": "input", |
| | | "limit": "maxLength", |
| | | "limitParam": "256", |
| | | "limitErrInfo": "折扣名称不能超过256位", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code": "discountType", |
| | | "cnCode": "折扣类型", |
| | | "desc": "必填,请选择折扣类型", |
| | | "desc": "必填,请选择折扣名称", |
| | | "required": true, |
| | | "hasDefaultValue": false, |
| | | "inputType": "select", |
| | |
| | | "selectValueName":"优惠,违约", |
| | | "limit": "num", |
| | | "limitParam": "", |
| | | "limitErrInfo": "折扣类型格式错误", |
| | | "limitErrInfo": "折扣格式错误", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code": "ruleId", |
| | | "cnCode": "规则", |
| | | "desc": "必填,请选择规则", |
| | | "code": "discountId", |
| | | "cnCode": "折扣名称", |
| | | "desc": "必填,请选择折扣名称", |
| | | "required": true, |
| | | "hasDefaultValue": false, |
| | | "inputType": "input", |
| | | "inputType": "select", |
| | | "selectValue":"1001,2002", |
| | | "selectValueName":"优惠,违约", |
| | | "limit": "num", |
| | | "limitParam": "", |
| | | "limitErrInfo": "规则不是有效数字", |
| | | "limitErrInfo": "折扣格式错误", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code": "discountDesc", |
| | | "cnCode": "描述", |
| | | "desc": "可填,请填写描述", |
| | | "required": true, |
| | | "hasDefaultValue": false, |
| | | "inputType": "input", |
| | | "limit": "maxLength", |
| | | "limitParam": "", |
| | | "limitErrInfo": "描述不能超过500位", |
| | | "show": false |
| | | } |
| | | ] |
| | | } |
| New file |
| | |
| | | package com.java110.intf.fee; |
| | | |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.payFeeConfigDiscount.PayFeeConfigDiscountDto; |
| | | import com.java110.po.payFeeConfigDiscount.PayFeeConfigDiscountPo; |
| | | 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 IPayFeeConfigDiscountInnerServiceSMO |
| | | * @Description 费用项折扣接口类 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 9:04 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | @FeignClient(name = "community-service", configuration = {FeignConfiguration.class}) |
| | | @RequestMapping("/payFeeConfigDiscountApi") |
| | | public interface IPayFeeConfigDiscountInnerServiceSMO { |
| | | |
| | | |
| | | @RequestMapping(value = "/savePayFeeConfigDiscount", method = RequestMethod.POST) |
| | | public int savePayFeeConfigDiscount(@RequestBody PayFeeConfigDiscountPo payFeeConfigDiscountPo); |
| | | |
| | | @RequestMapping(value = "/updatePayFeeConfigDiscount", method = RequestMethod.POST) |
| | | public int updatePayFeeConfigDiscount(@RequestBody PayFeeConfigDiscountPo payFeeConfigDiscountPo); |
| | | |
| | | @RequestMapping(value = "/deletePayFeeConfigDiscount", method = RequestMethod.POST) |
| | | public int deletePayFeeConfigDiscount(@RequestBody PayFeeConfigDiscountPo payFeeConfigDiscountPo); |
| | | |
| | | /** |
| | | * <p>查询小区楼信息</p> |
| | | * |
| | | * @param payFeeConfigDiscountDto 数据对象分享 |
| | | * @return PayFeeConfigDiscountDto 对象数据 |
| | | */ |
| | | @RequestMapping(value = "/queryPayFeeConfigDiscounts", method = RequestMethod.POST) |
| | | List<PayFeeConfigDiscountDto> queryPayFeeConfigDiscounts(@RequestBody PayFeeConfigDiscountDto payFeeConfigDiscountDto); |
| | | |
| | | /** |
| | | * 查询<p>小区楼</p>总记录数 |
| | | * |
| | | * @param payFeeConfigDiscountDto 数据对象分享 |
| | | * @return 小区下的小区楼记录数 |
| | | */ |
| | | @RequestMapping(value = "/queryPayFeeConfigDiscountsCount", method = RequestMethod.POST) |
| | | int queryPayFeeConfigDiscountsCount(@RequestBody PayFeeConfigDiscountDto payFeeConfigDiscountDto); |
| | | } |
| | |
| | | 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; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | |
| | | @RestController |
| | |
| | | |
| | | JSONArray feeDiscountRuleSpecs = reqJson.getJSONArray("feeDiscountRuleSpecs"); |
| | | FeeDiscountPo feeDiscountPo = BeanConvertUtil.covertBean(reqJson, FeeDiscountPo.class); |
| | | return saveFeeDiscountBMOImpl.save(feeDiscountPo,feeDiscountRuleSpecs); |
| | | return saveFeeDiscountBMOImpl.save(feeDiscountPo, feeDiscountRuleSpecs); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | JSONArray feeDiscountRuleSpecs = reqJson.getJSONArray("feeDiscountRuleSpecs"); |
| | | FeeDiscountPo feeDiscountPo = BeanConvertUtil.covertBean(reqJson, FeeDiscountPo.class); |
| | | return updateFeeDiscountBMOImpl.update(feeDiscountPo,feeDiscountRuleSpecs); |
| | | return updateFeeDiscountBMOImpl.update(feeDiscountPo, feeDiscountRuleSpecs); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @RequestMapping(value = "/queryFeeDiscount", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryFeeDiscount(@RequestParam(value = "communityId") String communityId, |
| | | @RequestParam(value = "discountType") String discountType, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | FeeDiscountDto feeDiscountDto = new FeeDiscountDto(); |
| | | feeDiscountDto.setPage(page); |
| | | feeDiscountDto.setRow(row); |
| | | feeDiscountDto.setCommunityId(communityId); |
| | | feeDiscountDto.setDiscountType(discountType); |
| | | return getFeeDiscountBMOImpl.get(feeDiscountDto); |
| | | } |
| | | |
| New file |
| | |
| | | package com.java110.fee.api; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.dto.payFeeConfigDiscount.PayFeeConfigDiscountDto; |
| | | import com.java110.fee.bmo.payFeeConfigDiscount.IDeletePayFeeConfigDiscountBMO; |
| | | import com.java110.fee.bmo.payFeeConfigDiscount.IGetPayFeeConfigDiscountBMO; |
| | | import com.java110.fee.bmo.payFeeConfigDiscount.ISavePayFeeConfigDiscountBMO; |
| | | import com.java110.fee.bmo.payFeeConfigDiscount.IUpdatePayFeeConfigDiscountBMO; |
| | | import com.java110.po.payFeeConfigDiscount.PayFeeConfigDiscountPo; |
| | | 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.*; |
| | | |
| | | |
| | | @RestController |
| | | @RequestMapping(value = "/payFeeConfigDiscount") |
| | | public class PayFeeConfigDiscountApi { |
| | | |
| | | @Autowired |
| | | private ISavePayFeeConfigDiscountBMO savePayFeeConfigDiscountBMOImpl; |
| | | @Autowired |
| | | private IUpdatePayFeeConfigDiscountBMO updatePayFeeConfigDiscountBMOImpl; |
| | | @Autowired |
| | | private IDeletePayFeeConfigDiscountBMO deletePayFeeConfigDiscountBMOImpl; |
| | | |
| | | @Autowired |
| | | private IGetPayFeeConfigDiscountBMO getPayFeeConfigDiscountBMOImpl; |
| | | |
| | | /** |
| | | * 微信保存消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /payFeeConfigDiscount/savePayFeeConfigDiscount |
| | | * @path /app/payFeeConfigDiscount/savePayFeeConfigDiscount |
| | | */ |
| | | @RequestMapping(value = "/savePayFeeConfigDiscount", method = RequestMethod.POST) |
| | | public ResponseEntity<String> savePayFeeConfigDiscount(@RequestBody JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "configId", "请求报文中未包含configId"); |
| | | Assert.hasKeyAndValue(reqJson, "discountId", "请求报文中未包含discountId"); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId"); |
| | | |
| | | |
| | | PayFeeConfigDiscountPo payFeeConfigDiscountPo = BeanConvertUtil.covertBean(reqJson, PayFeeConfigDiscountPo.class); |
| | | return savePayFeeConfigDiscountBMOImpl.save(payFeeConfigDiscountPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信修改消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /payFeeConfigDiscount/updatePayFeeConfigDiscount |
| | | * @path /app/payFeeConfigDiscount/updatePayFeeConfigDiscount |
| | | */ |
| | | @RequestMapping(value = "/updatePayFeeConfigDiscount", method = RequestMethod.POST) |
| | | public ResponseEntity<String> updatePayFeeConfigDiscount(@RequestBody JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "configId", "请求报文中未包含configId"); |
| | | Assert.hasKeyAndValue(reqJson, "discountId", "请求报文中未包含discountId"); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId"); |
| | | Assert.hasKeyAndValue(reqJson, "configDiscountId", "configDiscountId不能为空"); |
| | | |
| | | |
| | | PayFeeConfigDiscountPo payFeeConfigDiscountPo = BeanConvertUtil.covertBean(reqJson, PayFeeConfigDiscountPo.class); |
| | | return updatePayFeeConfigDiscountBMOImpl.update(payFeeConfigDiscountPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信删除消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /payFeeConfigDiscount/deletePayFeeConfigDiscount |
| | | * @path /app/payFeeConfigDiscount/deletePayFeeConfigDiscount |
| | | */ |
| | | @RequestMapping(value = "/deletePayFeeConfigDiscount", method = RequestMethod.POST) |
| | | public ResponseEntity<String> deletePayFeeConfigDiscount(@RequestBody JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空"); |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "configDiscountId", "configDiscountId不能为空"); |
| | | |
| | | |
| | | PayFeeConfigDiscountPo payFeeConfigDiscountPo = BeanConvertUtil.covertBean(reqJson, PayFeeConfigDiscountPo.class); |
| | | return deletePayFeeConfigDiscountBMOImpl.delete(payFeeConfigDiscountPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信删除消息模板 |
| | | * |
| | | * @param communityId 小区ID |
| | | * @return |
| | | * @serviceCode /payFeeConfigDiscount/queryPayFeeConfigDiscount |
| | | * @path /app/payFeeConfigDiscount/queryPayFeeConfigDiscount |
| | | */ |
| | | @RequestMapping(value = "/queryPayFeeConfigDiscount", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryPayFeeConfigDiscount(@RequestParam(value = "communityId") String communityId, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | PayFeeConfigDiscountDto payFeeConfigDiscountDto = new PayFeeConfigDiscountDto(); |
| | | payFeeConfigDiscountDto.setPage(page); |
| | | payFeeConfigDiscountDto.setRow(row); |
| | | payFeeConfigDiscountDto.setCommunityId(communityId); |
| | | return getPayFeeConfigDiscountBMOImpl.get(payFeeConfigDiscountDto); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.fee.bmo.payFeeConfigDiscount; |
| | | |
| | | import com.java110.po.payFeeConfigDiscount.PayFeeConfigDiscountPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface IDeletePayFeeConfigDiscountBMO { |
| | | |
| | | |
| | | /** |
| | | * 修改费用项折扣 |
| | | * add by wuxw |
| | | * |
| | | * @param payFeeConfigDiscountPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> delete(PayFeeConfigDiscountPo payFeeConfigDiscountPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.bmo.payFeeConfigDiscount; |
| | | |
| | | import com.java110.dto.payFeeConfigDiscount.PayFeeConfigDiscountDto; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface IGetPayFeeConfigDiscountBMO { |
| | | |
| | | |
| | | /** |
| | | * 查询费用项折扣 |
| | | * add by wuxw |
| | | * |
| | | * @param payFeeConfigDiscountDto |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> get(PayFeeConfigDiscountDto payFeeConfigDiscountDto); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.bmo.payFeeConfigDiscount; |
| | | |
| | | import com.java110.po.payFeeConfigDiscount.PayFeeConfigDiscountPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface ISavePayFeeConfigDiscountBMO { |
| | | |
| | | |
| | | /** |
| | | * 添加费用项折扣 |
| | | * add by wuxw |
| | | * |
| | | * @param payFeeConfigDiscountPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> save(PayFeeConfigDiscountPo payFeeConfigDiscountPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.bmo.payFeeConfigDiscount; |
| | | |
| | | import com.java110.po.payFeeConfigDiscount.PayFeeConfigDiscountPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface IUpdatePayFeeConfigDiscountBMO { |
| | | |
| | | |
| | | /** |
| | | * 修改费用项折扣 |
| | | * add by wuxw |
| | | * |
| | | * @param payFeeConfigDiscountPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> update(PayFeeConfigDiscountPo payFeeConfigDiscountPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.bmo.payFeeConfigDiscount.impl; |
| | | |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.fee.bmo.payFeeConfigDiscount.IDeletePayFeeConfigDiscountBMO; |
| | | import com.java110.intf.fee.IPayFeeConfigDiscountInnerServiceSMO; |
| | | import com.java110.po.payFeeConfigDiscount.PayFeeConfigDiscountPo; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("deletePayFeeConfigDiscountBMOImpl") |
| | | public class DeletePayFeeConfigDiscountBMOImpl implements IDeletePayFeeConfigDiscountBMO { |
| | | |
| | | @Autowired |
| | | private IPayFeeConfigDiscountInnerServiceSMO payFeeConfigDiscountInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param payFeeConfigDiscountPo 数据 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> delete(PayFeeConfigDiscountPo payFeeConfigDiscountPo) { |
| | | |
| | | int flag = payFeeConfigDiscountInnerServiceSMOImpl.deletePayFeeConfigDiscount(payFeeConfigDiscountPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.bmo.payFeeConfigDiscount.impl; |
| | | |
| | | import com.java110.dto.payFeeConfigDiscount.PayFeeConfigDiscountDto; |
| | | import com.java110.fee.bmo.payFeeConfigDiscount.IGetPayFeeConfigDiscountBMO; |
| | | import com.java110.intf.fee.IPayFeeConfigDiscountInnerServiceSMO; |
| | | 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("getPayFeeConfigDiscountBMOImpl") |
| | | public class GetPayFeeConfigDiscountBMOImpl implements IGetPayFeeConfigDiscountBMO { |
| | | |
| | | @Autowired |
| | | private IPayFeeConfigDiscountInnerServiceSMO payFeeConfigDiscountInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param payFeeConfigDiscountDto |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | public ResponseEntity<String> get(PayFeeConfigDiscountDto payFeeConfigDiscountDto) { |
| | | |
| | | |
| | | int count = payFeeConfigDiscountInnerServiceSMOImpl.queryPayFeeConfigDiscountsCount(payFeeConfigDiscountDto); |
| | | |
| | | List<PayFeeConfigDiscountDto> payFeeConfigDiscountDtos = null; |
| | | if (count > 0) { |
| | | payFeeConfigDiscountDtos = payFeeConfigDiscountInnerServiceSMOImpl.queryPayFeeConfigDiscounts(payFeeConfigDiscountDto); |
| | | } else { |
| | | payFeeConfigDiscountDtos = new ArrayList<>(); |
| | | } |
| | | |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) payFeeConfigDiscountDto.getRow()), count, payFeeConfigDiscountDtos); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | | return responseEntity; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.bmo.payFeeConfigDiscount.impl; |
| | | |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.fee.bmo.payFeeConfigDiscount.ISavePayFeeConfigDiscountBMO; |
| | | import com.java110.intf.fee.IPayFeeConfigDiscountInnerServiceSMO; |
| | | import com.java110.po.payFeeConfigDiscount.PayFeeConfigDiscountPo; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("savePayFeeConfigDiscountBMOImpl") |
| | | public class SavePayFeeConfigDiscountBMOImpl implements ISavePayFeeConfigDiscountBMO { |
| | | |
| | | @Autowired |
| | | private IPayFeeConfigDiscountInnerServiceSMO payFeeConfigDiscountInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * 添加小区信息 |
| | | * |
| | | * @param payFeeConfigDiscountPo |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> save(PayFeeConfigDiscountPo payFeeConfigDiscountPo) { |
| | | |
| | | payFeeConfigDiscountPo.setConfigDiscountId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_configDiscountId)); |
| | | int flag = payFeeConfigDiscountInnerServiceSMOImpl.savePayFeeConfigDiscount(payFeeConfigDiscountPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.bmo.payFeeConfigDiscount.impl; |
| | | |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.fee.bmo.payFeeConfigDiscount.IUpdatePayFeeConfigDiscountBMO; |
| | | import com.java110.intf.fee.IPayFeeConfigDiscountInnerServiceSMO; |
| | | import com.java110.po.payFeeConfigDiscount.PayFeeConfigDiscountPo; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("updatePayFeeConfigDiscountBMOImpl") |
| | | public class UpdatePayFeeConfigDiscountBMOImpl implements IUpdatePayFeeConfigDiscountBMO { |
| | | |
| | | @Autowired |
| | | private IPayFeeConfigDiscountInnerServiceSMO payFeeConfigDiscountInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param payFeeConfigDiscountPo |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> update(PayFeeConfigDiscountPo payFeeConfigDiscountPo) { |
| | | |
| | | int flag = payFeeConfigDiscountInnerServiceSMOImpl.updatePayFeeConfigDiscount(payFeeConfigDiscountPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.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 IPayFeeConfigDiscountServiceDao { |
| | | |
| | | |
| | | /** |
| | | * 保存 费用项折扣信息 |
| | | * @param info |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void savePayFeeConfigDiscountInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询费用项折扣信息(instance过程) |
| | | * 根据bId 查询费用项折扣信息 |
| | | * @param info bId 信息 |
| | | * @return 费用项折扣信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | List<Map> getPayFeeConfigDiscountInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 修改费用项折扣信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void updatePayFeeConfigDiscountInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 查询费用项折扣总数 |
| | | * |
| | | * @param info 费用项折扣信息 |
| | | * @return 费用项折扣数量 |
| | | */ |
| | | int queryPayFeeConfigDiscountsCount(Map info); |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.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.fee.dao.IPayFeeConfigDiscountServiceDao; |
| | | 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("payFeeConfigDiscountServiceDaoImpl") |
| | | //@Transactional |
| | | public class PayFeeConfigDiscountServiceDaoImpl extends BaseServiceDao implements IPayFeeConfigDiscountServiceDao { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(PayFeeConfigDiscountServiceDaoImpl.class); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 保存费用项折扣信息 到 instance |
| | | * @param info bId 信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void savePayFeeConfigDiscountInfo(Map info) throws DAOException { |
| | | logger.debug("保存费用项折扣信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("payFeeConfigDiscountServiceDaoImpl.savePayFeeConfigDiscountInfo",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> getPayFeeConfigDiscountInfo(Map info) throws DAOException { |
| | | logger.debug("查询费用项折扣信息 入参 info : {}",info); |
| | | |
| | | List<Map> businessPayFeeConfigDiscountInfos = sqlSessionTemplate.selectList("payFeeConfigDiscountServiceDaoImpl.getPayFeeConfigDiscountInfo",info); |
| | | |
| | | return businessPayFeeConfigDiscountInfos; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改费用项折扣信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void updatePayFeeConfigDiscountInfo(Map info) throws DAOException { |
| | | logger.debug("修改费用项折扣信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("payFeeConfigDiscountServiceDaoImpl.updatePayFeeConfigDiscountInfo",info); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改费用项折扣信息Instance数据失败:"+ JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询费用项折扣数量 |
| | | * @param info 费用项折扣信息 |
| | | * @return 费用项折扣数量 |
| | | */ |
| | | @Override |
| | | public int queryPayFeeConfigDiscountsCount(Map info) { |
| | | logger.debug("查询费用项折扣数据 入参 info : {}",info); |
| | | |
| | | List<Map> businessPayFeeConfigDiscountInfos = sqlSessionTemplate.selectList("payFeeConfigDiscountServiceDaoImpl.queryPayFeeConfigDiscountsCount", info); |
| | | if (businessPayFeeConfigDiscountInfos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(businessPayFeeConfigDiscountInfos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.smo.impl; |
| | | |
| | | |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.payFeeConfigDiscount.PayFeeConfigDiscountDto; |
| | | import com.java110.fee.dao.IPayFeeConfigDiscountServiceDao; |
| | | import com.java110.intf.fee.IPayFeeConfigDiscountInnerServiceSMO; |
| | | import com.java110.po.payFeeConfigDiscount.PayFeeConfigDiscountPo; |
| | | 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 PayFeeConfigDiscountInnerServiceSMOImpl extends BaseServiceSMO implements IPayFeeConfigDiscountInnerServiceSMO { |
| | | |
| | | @Autowired |
| | | private IPayFeeConfigDiscountServiceDao payFeeConfigDiscountServiceDaoImpl; |
| | | |
| | | |
| | | @Override |
| | | public int savePayFeeConfigDiscount(@RequestBody PayFeeConfigDiscountPo payFeeConfigDiscountPo) { |
| | | int saveFlag = 1; |
| | | payFeeConfigDiscountServiceDaoImpl.savePayFeeConfigDiscountInfo(BeanConvertUtil.beanCovertMap(payFeeConfigDiscountPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int updatePayFeeConfigDiscount(@RequestBody PayFeeConfigDiscountPo payFeeConfigDiscountPo) { |
| | | int saveFlag = 1; |
| | | payFeeConfigDiscountServiceDaoImpl.updatePayFeeConfigDiscountInfo(BeanConvertUtil.beanCovertMap(payFeeConfigDiscountPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int deletePayFeeConfigDiscount(@RequestBody PayFeeConfigDiscountPo payFeeConfigDiscountPo) { |
| | | int saveFlag = 1; |
| | | payFeeConfigDiscountPo.setStatusCd("1"); |
| | | payFeeConfigDiscountServiceDaoImpl.updatePayFeeConfigDiscountInfo(BeanConvertUtil.beanCovertMap(payFeeConfigDiscountPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public List<PayFeeConfigDiscountDto> queryPayFeeConfigDiscounts(@RequestBody PayFeeConfigDiscountDto payFeeConfigDiscountDto) { |
| | | |
| | | //校验是否传了 分页信息 |
| | | |
| | | int page = payFeeConfigDiscountDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | payFeeConfigDiscountDto.setPage((page - 1) * payFeeConfigDiscountDto.getRow()); |
| | | } |
| | | |
| | | List<PayFeeConfigDiscountDto> payFeeConfigDiscounts = BeanConvertUtil.covertBeanList(payFeeConfigDiscountServiceDaoImpl.getPayFeeConfigDiscountInfo(BeanConvertUtil.beanCovertMap(payFeeConfigDiscountDto)), PayFeeConfigDiscountDto.class); |
| | | |
| | | return payFeeConfigDiscounts; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int queryPayFeeConfigDiscountsCount(@RequestBody PayFeeConfigDiscountDto payFeeConfigDiscountDto) { |
| | | return payFeeConfigDiscountServiceDaoImpl.queryPayFeeConfigDiscountsCount(BeanConvertUtil.beanCovertMap(payFeeConfigDiscountDto)); |
| | | } |
| | | |
| | | public IPayFeeConfigDiscountServiceDao getPayFeeConfigDiscountServiceDaoImpl() { |
| | | return payFeeConfigDiscountServiceDaoImpl; |
| | | } |
| | | |
| | | public void setPayFeeConfigDiscountServiceDaoImpl(IPayFeeConfigDiscountServiceDao payFeeConfigDiscountServiceDaoImpl) { |
| | | this.payFeeConfigDiscountServiceDaoImpl = payFeeConfigDiscountServiceDaoImpl; |
| | | } |
| | | } |