src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
@@ -275,7 +275,8 @@ LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jh.house_code LEFT JOIN jczz_grid_range jgr on jgr.house_code=jda.address_code LEFT JOIN jczz_grid jg on jg.id = jgr.grid_id and jg.is_deleted = 0 <where> where jh.is_deleted = 0 and jh.name != '' and jh.name is not null <if test="household.userId!=null"> AND jg.id IN ( SELECT DISTINCT jgm.grid_id FROM jczz_gridman jgm WHERE jgm.user_id = #{household.userId} ) @@ -316,9 +317,7 @@ <if test="household.id!=null and household.id!=''"> and jh.id = #{household.id} </if> and jh.is_deleted = 0 order by jh.create_time desc </where> </select> src/main/java/org/springblade/modules/pay/controller/AliPayController.java
New file @@ -0,0 +1,39 @@ package org.springblade.modules.pay.controller; import io.swagger.annotations.Api; import lombok.AllArgsConstructor; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.tool.api.R; import org.springblade.modules.pay.entity.AliPayInfo; import org.springblade.modules.pay.service.IAliPayService; import org.springblade.modules.pay.service.IWxPayService; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController @AllArgsConstructor @RequestMapping("/alipay") @Api(value = "微信支付接口", tags = "微信支付接口") public class AliPayController extends BladeController { private IAliPayService aliPayService; @PostMapping("/save") public R save(@RequestBody AliPayInfo aliPayInfo) { return R.status(aliPayService.save(aliPayInfo)); } @PostMapping("/update") public R update(@RequestBody AliPayInfo aliPayInfo) { return R.status(aliPayService.updateById(aliPayInfo)); } @PostMapping("saveOrUpdate") public R saveOrUpdate(@RequestBody AliPayInfo aliPayInfo) { return R.status(aliPayService.saveOrUpdate(aliPayInfo)); } } src/main/java/org/springblade/modules/pay/controller/WxPayController.java
New file @@ -0,0 +1,49 @@ package org.springblade.modules.pay.controller; import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult; import com.github.binarywang.wxpay.constant.WxPayConstants; import io.swagger.annotations.Api; import lombok.AllArgsConstructor; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.tool.api.R; import org.springblade.modules.pay.entity.WxPayInfo; import org.springblade.modules.pay.service.IWxPayService; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController @AllArgsConstructor @RequestMapping("/wxpay") @Api(value = "微信支付接口", tags = "微信支付接口") public class WxPayController extends BladeController { private IWxPayService wxPayService; @PostMapping("/save") public R save(@RequestBody WxPayInfo wxPayInfo) { return R.status(wxPayService.save(wxPayInfo)); } @PostMapping("/update") public R update(@RequestBody WxPayInfo wxPayInfo) { return R.status(wxPayService.updateById(wxPayInfo)); } @PostMapping("saveOrUpdate") public R saveOrUpdate(@RequestBody WxPayInfo wxPayInfo) { return R.status(wxPayService.saveOrUpdate(wxPayInfo)); } /** * 获取openId * @param code * @return */ @PostMapping("getOpenId") public R getOpenId(String code){ return R.data(wxPayService.getOpenId(code)); } } src/main/java/org/springblade/modules/pay/entity/AliPayInfo.java
New file @@ -0,0 +1,35 @@ package org.springblade.modules.pay.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; @Data @TableName("jczz_property_company_alipay") @ApiModel(value = "支付宝商户信息", description = "支付宝商户信息") public class AliPayInfo implements Serializable { private static final long serialVersionUID = 1L; /** * 主键 */ @JsonSerialize(using = ToStringSerializer.class) @ApiModelProperty("主键id") @TableId(value = "id", type = IdType.ASSIGN_ID) private Long id; //物业id private String propertyCompanyId; private String appId; private String privateKey; private String publicKey; } src/main/java/org/springblade/modules/pay/entity/WxPayInfo.java
New file @@ -0,0 +1,38 @@ package org.springblade.modules.pay.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; @Data @TableName("jczz_property_company_wxpay") @ApiModel(value = "微信商户信息", description = "微信商户信息") public class WxPayInfo implements Serializable { private static final long serialVersionUID = 1L; /** * 主键 */ @JsonSerialize(using = ToStringSerializer.class) @ApiModelProperty("主键id") @TableId(value = "id", type = IdType.ASSIGN_ID) private Long id; //物业id private String propertyCompanyId; private String appId; private String mchId; private String mchKey; private String appSecret; private String keyPath; private String officialAppId; private String officialAppSecret; } src/main/java/org/springblade/modules/pay/mapper/AliPayMapper.java
New file @@ -0,0 +1,8 @@ package org.springblade.modules.pay.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.springblade.modules.pay.entity.AliPayInfo; import org.springblade.modules.pay.entity.WxPayInfo; public interface AliPayMapper extends BaseMapper<AliPayInfo> { } src/main/java/org/springblade/modules/pay/mapper/AliPayMapper.xml
New file @@ -0,0 +1,7 @@ <?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="org.springblade.modules.pay.mapper.AliPayMapper"> </mapper> src/main/java/org/springblade/modules/pay/mapper/WxPayMapper.java
New file @@ -0,0 +1,7 @@ package org.springblade.modules.pay.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.springblade.modules.pay.entity.WxPayInfo; public interface WxPayMapper extends BaseMapper<WxPayInfo> { } src/main/java/org/springblade/modules/pay/mapper/WxPayMapper.xml
New file @@ -0,0 +1,7 @@ <?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="org.springblade.modules.pay.mapper.WxPayMapper"> </mapper> src/main/java/org/springblade/modules/pay/service/IAliPayService.java
New file @@ -0,0 +1,8 @@ package org.springblade.modules.pay.service; import com.baomidou.mybatisplus.extension.service.IService; import org.springblade.modules.pay.entity.AliPayInfo; import org.springblade.modules.pay.entity.WxPayInfo; public interface IAliPayService extends IService<AliPayInfo> { } src/main/java/org/springblade/modules/pay/service/IWxPayService.java
New file @@ -0,0 +1,14 @@ package org.springblade.modules.pay.service; import com.baomidou.mybatisplus.extension.service.IService; import org.springblade.modules.pay.entity.WxPayInfo; public interface IWxPayService extends IService<WxPayInfo> { /** * 获取openId * @param code * @return */ Object getOpenId(String code); } src/main/java/org/springblade/modules/pay/service/impl/AliPayServiceImpl.java
New file @@ -0,0 +1,14 @@ package org.springblade.modules.pay.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springblade.modules.pay.entity.AliPayInfo; import org.springblade.modules.pay.entity.WxPayInfo; import org.springblade.modules.pay.mapper.AliPayMapper; import org.springblade.modules.pay.mapper.WxPayMapper; import org.springblade.modules.pay.service.IAliPayService; import org.springblade.modules.pay.service.IWxPayService; import org.springframework.stereotype.Service; @Service public class AliPayServiceImpl extends ServiceImpl<AliPayMapper, AliPayInfo> implements IAliPayService { } src/main/java/org/springblade/modules/pay/service/impl/WxPayServiceImpl.java
New file @@ -0,0 +1,25 @@ package org.springblade.modules.pay.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springblade.modules.pay.entity.WxPayInfo; import org.springblade.modules.pay.mapper.WxPayMapper; import org.springblade.modules.pay.service.IWxPayService; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; @Service public class WxPayServiceImpl extends ServiceImpl<WxPayMapper,WxPayInfo> implements IWxPayService { private final String MINI_PROGRAM_APP_ID = "wx41aa8a5d2e565a05"; @Override public Object getOpenId(String code) { return null; } } src/main/java/org/springblade/modules/property/controller/PropertyChargeController.java
New file @@ -0,0 +1,120 @@ /* * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * Neither the name of the dreamlu.net developer nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * Author: Chill 庄骞 (smallchill@163.com) */ package org.springblade.modules.property.controller; import com.baomidou.mybatisplus.core.metadata.IPage; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import lombok.AllArgsConstructor; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.Func; import org.springblade.modules.property.entity.PropertyCharge; import org.springblade.modules.property.service.IPropertyChargeService; import org.springblade.modules.property.service.IPropertyCompanyService; import org.springblade.modules.property.vo.PropertyChargeVO; import org.springblade.modules.property.vo.PropertyCompanyDetailVO; import org.springblade.modules.property.vo.PropertyCompanyVO; import org.springblade.modules.property.wrapper.PropertyCompanyWrapper; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; import java.util.List; /** * 物业公司 控制器 * * @author BladeX * @since 2023-11-23 */ @RestController @AllArgsConstructor @RequestMapping("propertyCharge/propertyCharge") @Api(value = "物业收费项", tags = "物业收费项接口") public class PropertyChargeController { private final IPropertyChargeService propertyChargeService; /** * 物业公司 详情 */ @GetMapping("/detail") @ApiOperationSupport(order = 1) @ApiOperation(value = "详情", notes = "传入propertyCompany") public R<PropertyCharge> detail(PropertyCharge propertyCompany) { PropertyCharge detail = propertyChargeService.getOne(Condition.getQueryWrapper(propertyCompany)); return R.data(detail); } /** * 物业公司 自定义分页 */ @GetMapping("/page") @ApiOperationSupport(order = 3) @ApiOperation(value = "分页", notes = "传入propertyCompany") public R<IPage<PropertyChargeVO>> page(PropertyChargeVO propertyChargeVO, Query query) { IPage<PropertyChargeVO> pages = propertyChargeService.getPage(Condition.getPage(query), propertyChargeVO); return R.data(pages); } /** * 物业公司 新增 */ @PostMapping("/save") @ApiOperationSupport(order = 4) @ApiOperation(value = "新增", notes = "传入propertyCompany") public R save(@Valid @RequestBody PropertyCharge propertyCompany) { return R.status(propertyChargeService.save(propertyCompany)); } /** * 物业公司 修改 */ @PostMapping("/update") @ApiOperationSupport(order = 5) @ApiOperation(value = "修改", notes = "传入propertyCompany") public R update(@Valid @RequestBody PropertyCharge propertyCompany) { return R.status(propertyChargeService.updateById(propertyCompany)); } /** * 物业公司 新增或修改 */ @PostMapping("/submit") @ApiOperationSupport(order = 6) @ApiOperation(value = "新增或修改", notes = "传入propertyCompany") public R submit(@Valid @RequestBody PropertyCharge propertyCompany) { return R.status(propertyChargeService.saveOrUpdate(propertyCompany)); } /** * 物业公司 删除 */ @PostMapping("/remove") @ApiOperationSupport(order = 7) @ApiOperation(value = "逻辑删除", notes = "传入ids") public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { List<Integer> toIntList = Func.toIntList(ids); return R.status(propertyChargeService.removeBatchByIds(toIntList)); } } src/main/java/org/springblade/modules/property/controller/PropertyChargeRecordController.java
New file @@ -0,0 +1,117 @@ /* * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * Neither the name of the dreamlu.net developer nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * Author: Chill 庄骞 (smallchill@163.com) */ package org.springblade.modules.property.controller; import com.baomidou.mybatisplus.core.metadata.IPage; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import lombok.AllArgsConstructor; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.Func; import org.springblade.modules.property.entity.PropertyChargeRecord; import org.springblade.modules.property.service.IPropertyChargeRecordService; import org.springblade.modules.property.service.IPropertyChargeService; import org.springblade.modules.property.vo.PropertyChargeRecordVO; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; import java.util.List; /** * 物业公司 控制器 * * @author BladeX * @since 2023-11-23 */ @RestController @AllArgsConstructor @RequestMapping("propertyChargeRecord/propertyChargeRecord") @Api(value = "物业收费项", tags = "物业收费项接口") public class PropertyChargeRecordController { private final IPropertyChargeRecordService propertyChargeRecordService; /** * 物业公司 详情 */ @GetMapping("/detail") @ApiOperationSupport(order = 1) @ApiOperation(value = "详情", notes = "传入propertyCompany") public R<PropertyChargeRecord> detail(PropertyChargeRecord propertyCompany) { PropertyChargeRecord detail = propertyChargeRecordService.getOne(Condition.getQueryWrapper(propertyCompany)); return R.data(detail); } /** * 物业公司 自定义分页 */ @GetMapping("/page") @ApiOperationSupport(order = 3) @ApiOperation(value = "分页", notes = "传入propertyCompany") public R<IPage<PropertyChargeRecordVO>> page(PropertyChargeRecordVO vo, Query query) { IPage<PropertyChargeRecordVO> pages = propertyChargeRecordService.getPage(Condition.getPage(query), vo); return R.data(pages); } /** * 物业公司 新增 */ @PostMapping("/save") @ApiOperationSupport(order = 4) @ApiOperation(value = "新增", notes = "传入propertyCompany") public R save(@Valid @RequestBody PropertyChargeRecord propertyCompany) { return R.status(propertyChargeRecordService.save(propertyCompany)); } /** * 物业公司 修改 */ @PostMapping("/update") @ApiOperationSupport(order = 5) @ApiOperation(value = "修改", notes = "传入propertyCompany") public R update(@Valid @RequestBody PropertyChargeRecord propertyCompany) { return R.status(propertyChargeRecordService.updateById(propertyCompany)); } /** * 物业公司 新增或修改 */ @PostMapping("/submit") @ApiOperationSupport(order = 6) @ApiOperation(value = "新增或修改", notes = "传入propertyCompany") public R submit(@Valid @RequestBody PropertyChargeRecord propertyCompany) { return R.status(propertyChargeRecordService.saveOrUpdate(propertyCompany)); } /** * 物业公司 删除 */ @PostMapping("/remove") @ApiOperationSupport(order = 7) @ApiOperation(value = "逻辑删除", notes = "传入ids") public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { List<Integer> toIntList = Func.toIntList(ids); return R.status(propertyChargeRecordService.removeBatchByIds(toIntList)); } } src/main/java/org/springblade/modules/property/controller/PropertyCompanyController.java
@@ -178,5 +178,13 @@ return R.data(propertyCompanyService.getDetail(propertyCompany)); } /** * 物业公司 商户配置 * @return */ @GetMapping("/getPayConfig") @ApiOperation(value = "商户配置") public R getPayConfig(PropertyCompanyVO propertyCompany) { return R.data(propertyCompanyService.getPayConfig(propertyCompany)); } } src/main/java/org/springblade/modules/property/entity/PropertyCharge.java
New file @@ -0,0 +1,33 @@ package org.springblade.modules.property.entity; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModel; import lombok.Data; import org.springblade.core.mp.base.BaseEntity; import javax.print.DocFlavor; @Data @TableName("jczz_property_charge") @ApiModel(value = "PropertyCompanyComment对象", description = "物业收费项") public class PropertyCharge extends BaseEntity { //物业公司的deptId private String propertyId; //缴费项名称 private String name; //缴费类型 private String payType; //单价 private Double unitPrice; //缴费周期(几月一缴) private String payPeriod; //计算公式 private String calculationFormula; } src/main/java/org/springblade/modules/property/entity/PropertyChargeRecord.java
New file @@ -0,0 +1,47 @@ package org.springblade.modules.property.entity; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import lombok.Data; import org.springblade.core.mp.base.BaseEntity; import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; @Data @TableName("jczz_property_charge_record") @ApiModel(value = "PropertyChargeRecord", description = "物业缴费记录") public class PropertyChargeRecord extends BaseEntity { //物业公司的deptId private String propertyId; //缴费项id private String chargeId; //编号 private String no; //付款人id private String payUser; //付款时间 @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date payTime; //缴费方式 private String payFunc; //付款金额 private String payPrice; //付款房屋的houseCode private String payHouse; //缴费内容 private String payContent; } src/main/java/org/springblade/modules/property/mapper/PropertyChargeMapper.java
New file @@ -0,0 +1,42 @@ /* * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * Neither the name of the dreamlu.net developer nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * Author: Chill 庄骞 (smallchill@163.com) */ package org.springblade.modules.property.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import liquibase.pro.packaged.P; import org.apache.ibatis.annotations.Param; import org.springblade.modules.property.entity.PropertyCharge; import org.springblade.modules.property.entity.PropertyCompanyEntity; import org.springblade.modules.property.vo.PropertyChargeVO; import org.springblade.modules.property.vo.PropertyCompanyDetailVO; import org.springblade.modules.property.vo.PropertyCompanyVO; import java.util.List; import java.util.Map; /** * 物业缴费项 Mapper 接口 * * @author BladeX * @since 2023-11-23 */ public interface PropertyChargeMapper extends BaseMapper<PropertyCharge> { List<PropertyChargeVO> getPage(IPage<PropertyChargeVO> page, @Param("vo") PropertyChargeVO propertyChargeVO); } src/main/java/org/springblade/modules/property/mapper/PropertyChargeMapper.xml
New file @@ -0,0 +1,25 @@ <?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="org.springblade.modules.property.mapper.PropertyChargeMapper"> <select id="getPage" resultType="org.springblade.modules.property.vo.PropertyChargeVO"> SELECT jpch.* FROM jczz_property_charge jpch LEFT JOIN jczz_property_company jpco ON jpco.dept_id = jpch.property_id and jpco.is_deleted = 0 where jpch.is_deleted = 0 <if test="vo.propertyId != null and vo.propertyId != ''"> AND jpch.property_id = #{vo.propertyId} </if> <if test="vo.name != null and vo.name != ''"> AND jpch.name LIKE CONCAT('%',#{vo.name},'%') </if> <if test="vo.payType != null and vo.payType != ''"> AND jpch.pay_type = #{vo.payType} </if> <if test="vo.payPeriod != null and vo.payPeriod != ''"> AND jpch.pay_period = #{vo.payPeriod} </if> </select> </mapper> src/main/java/org/springblade/modules/property/mapper/PropertyChargeRecordMapper.java
New file @@ -0,0 +1,39 @@ /* * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * Neither the name of the dreamlu.net developer nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * Author: Chill 庄骞 (smallchill@163.com) */ package org.springblade.modules.property.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import org.apache.ibatis.annotations.Param; import org.springblade.modules.property.entity.PropertyCharge; import org.springblade.modules.property.entity.PropertyChargeRecord; import org.springblade.modules.property.vo.PropertyChargeRecordVO; import org.springblade.modules.property.vo.PropertyChargeVO; import java.util.List; /** * 物业缴费项 Mapper 接口 * * @author BladeX * @since 2023-11-23 */ public interface PropertyChargeRecordMapper extends BaseMapper<PropertyChargeRecord> { List<PropertyChargeRecordVO> getPage(IPage<PropertyChargeRecordVO> page, @Param("vo") PropertyChargeRecordVO vo); } src/main/java/org/springblade/modules/property/mapper/PropertyChargeRecordMapper.xml
New file @@ -0,0 +1,9 @@ <?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="org.springblade.modules.property.mapper.PropertyChargeRecordMapper"> <select id="getPage" resultType="org.springblade.modules.property.vo.PropertyChargeRecordVO"> SELECT * FROM jczz_property_charge_record where is_deleted = 0 </select> </mapper> src/main/java/org/springblade/modules/property/service/IPropertyChargeRecordService.java
New file @@ -0,0 +1,36 @@ /* * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * Neither the name of the dreamlu.net developer nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * Author: Chill 庄骞 (smallchill@163.com) */ package org.springblade.modules.property.service; import com.baomidou.mybatisplus.core.metadata.IPage; import org.springblade.core.mp.base.BaseService; import org.springblade.modules.property.entity.PropertyCharge; import org.springblade.modules.property.entity.PropertyChargeRecord; import org.springblade.modules.property.vo.PropertyChargeRecordVO; import org.springblade.modules.property.vo.PropertyChargeVO; /** * 物业公司 服务类 * * @author BladeX * @since 2023-11-23 */ public interface IPropertyChargeRecordService extends BaseService<PropertyChargeRecord> { IPage<PropertyChargeRecordVO> getPage(IPage<PropertyChargeRecordVO> page, PropertyChargeRecordVO vo); } src/main/java/org/springblade/modules/property/service/IPropertyChargeService.java
New file @@ -0,0 +1,35 @@ /* * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * Neither the name of the dreamlu.net developer nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * Author: Chill 庄骞 (smallchill@163.com) */ package org.springblade.modules.property.service; import com.baomidou.mybatisplus.core.metadata.IPage; import org.springblade.core.mp.base.BaseService; import org.springblade.modules.property.entity.PropertyCharge; import org.springblade.modules.property.vo.PropertyChargeVO; import org.springblade.modules.property.vo.PropertyCompanyVO; /** * 物业公司 服务类 * * @author BladeX * @since 2023-11-23 */ public interface IPropertyChargeService extends BaseService<PropertyCharge> { IPage<PropertyChargeVO> getPage(IPage<PropertyChargeVO> page, PropertyChargeVO propertyChargeVO); } src/main/java/org/springblade/modules/property/service/IPropertyCompanyService.java
@@ -17,6 +17,8 @@ package org.springblade.modules.property.service; import com.baomidou.mybatisplus.extension.service.IService; import org.springblade.modules.pay.entity.AliPayInfo; import org.springblade.modules.pay.entity.WxPayInfo; import org.springblade.modules.property.entity.PropertyCompanyEntity; import org.springblade.modules.property.vo.PropertyCompanyDetailVO; import org.springblade.modules.property.vo.PropertyCompanyVO; @@ -73,4 +75,8 @@ * @return */ PropertyCompanyDetailVO getDetail(PropertyCompanyVO propertyCompany); Boolean payConfig(WxPayInfo wxPayInfo, AliPayInfo aliPayInfo); PropertyCompanyDetailVO getPayConfig(PropertyCompanyVO propertyCompany); } src/main/java/org/springblade/modules/property/service/impl/PropertyChargeRecordServiceImpl.java
New file @@ -0,0 +1,21 @@ package org.springblade.modules.property.service.impl; import com.baomidou.mybatisplus.core.metadata.IPage; import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.modules.property.entity.PropertyCharge; import org.springblade.modules.property.entity.PropertyChargeRecord; import org.springblade.modules.property.mapper.PropertyChargeMapper; import org.springblade.modules.property.mapper.PropertyChargeRecordMapper; import org.springblade.modules.property.service.IPropertyChargeRecordService; import org.springblade.modules.property.service.IPropertyChargeService; import org.springblade.modules.property.vo.PropertyChargeRecordVO; import org.springblade.modules.property.vo.PropertyChargeVO; import org.springframework.stereotype.Service; @Service public class PropertyChargeRecordServiceImpl extends BaseServiceImpl<PropertyChargeRecordMapper, PropertyChargeRecord> implements IPropertyChargeRecordService { @Override public IPage<PropertyChargeRecordVO> getPage(IPage<PropertyChargeRecordVO> page, PropertyChargeRecordVO vo) { return page.setRecords(baseMapper.getPage(page, vo)); } } src/main/java/org/springblade/modules/property/service/impl/PropertyChargeServiceImpl.java
New file @@ -0,0 +1,17 @@ package org.springblade.modules.property.service.impl; import com.baomidou.mybatisplus.core.metadata.IPage; import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.modules.property.entity.PropertyCharge; import org.springblade.modules.property.mapper.PropertyChargeMapper; import org.springblade.modules.property.service.IPropertyChargeService; import org.springblade.modules.property.vo.PropertyChargeVO; import org.springframework.stereotype.Service; @Service public class PropertyChargeServiceImpl extends BaseServiceImpl<PropertyChargeMapper, PropertyCharge> implements IPropertyChargeService { @Override public IPage<PropertyChargeVO> getPage(IPage<PropertyChargeVO> page, PropertyChargeVO propertyChargeVO) { return page.setRecords(baseMapper.getPage(page, propertyChargeVO)); } } src/main/java/org/springblade/modules/property/service/impl/PropertyCompanyServiceImpl.java
@@ -16,10 +16,16 @@ */ package org.springblade.modules.property.service.impl; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import liquibase.pro.packaged.D; import liquibase.pro.packaged.P; import org.springblade.core.mp.support.Condition; import org.springblade.modules.pay.entity.AliPayInfo; import org.springblade.modules.pay.entity.WxPayInfo; import org.springblade.modules.pay.service.IAliPayService; import org.springblade.modules.pay.service.IWxPayService; import org.springblade.modules.property.entity.PropertyCompanyEntity; import org.springblade.modules.property.vo.PropertyCompanyDetailVO; import org.springblade.modules.property.vo.PropertyCompanyVO; @@ -47,6 +53,11 @@ @Autowired private IDeptService deptService; @Autowired private IWxPayService wxPayService; @Autowired private IAliPayService aliPayService; /** * 自定义分页 * @@ -137,4 +148,30 @@ public PropertyCompanyDetailVO getDetail(PropertyCompanyVO propertyCompany) { return baseMapper.getDetail(propertyCompany); } @Override public Boolean payConfig(WxPayInfo wxPayInfo, AliPayInfo aliPayInfo) { boolean wx = wxPayService.saveOrUpdate(wxPayInfo); boolean ali = aliPayService.saveOrUpdate(aliPayInfo); return wx&&ali; } @Override public PropertyCompanyDetailVO getPayConfig(PropertyCompanyVO propertyCompany) { PropertyCompanyDetailVO detail = this.getDetail(propertyCompany); AliPayInfo pA = new AliPayInfo(); pA.setPropertyCompanyId(detail.getId().toString()); detail.setAliPayInfo(aliPayService.getOne(Condition.getQueryWrapper(pA))); WxPayInfo pW = new WxPayInfo(); pW.setPropertyCompanyId(detail.getId().toString()); detail.setWxPayInfo(wxPayService.getOne(Condition.getQueryWrapper(pW))); return detail; } } src/main/java/org/springblade/modules/property/vo/PropertyChargeRecordVO.java
New file @@ -0,0 +1,8 @@ package org.springblade.modules.property.vo; import lombok.Data; import org.springblade.modules.property.entity.PropertyChargeRecord; @Data public class PropertyChargeRecordVO extends PropertyChargeRecord { } src/main/java/org/springblade/modules/property/vo/PropertyChargeVO.java
New file @@ -0,0 +1,9 @@ package org.springblade.modules.property.vo; import lombok.Data; import org.springblade.modules.property.entity.PropertyCharge; @Data public class PropertyChargeVO extends PropertyCharge { } src/main/java/org/springblade/modules/property/vo/PropertyCompanyDetailVO.java
@@ -19,6 +19,8 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.modules.pay.entity.AliPayInfo; import org.springblade.modules.pay.entity.WxPayInfo; import org.springblade.modules.property.entity.PropertyCompanyEntity; import java.util.ArrayList; @@ -51,4 +53,11 @@ */ private List<PropertyDistrictUserVO> districtUserVOS = new ArrayList<>(); //微信商户 private WxPayInfo wxPayInfo; //支付宝商户 private AliPayInfo aliPayInfo; } src/main/java/org/springblade/modules/property/vo/PropertyCompanyVO.java
@@ -17,6 +17,8 @@ package org.springblade.modules.property.vo; import io.swagger.annotations.ApiModelProperty; import org.springblade.modules.pay.entity.AliPayInfo; import org.springblade.modules.pay.entity.WxPayInfo; import org.springblade.modules.property.entity.PropertyCompanyEntity; import org.springblade.core.tool.node.INode; import lombok.Data; @@ -48,4 +50,5 @@ private String principalPhone; }