| @@ -6,7 +6,9 @@ import com.iformall.common.ResultData; | |||||
| import com.iformall.controller.base.BaseController; | import com.iformall.controller.base.BaseController; | ||||
| import com.iformall.domain.po.WxBillPayWay; | import com.iformall.domain.po.WxBillPayWay; | ||||
| import com.iformall.domain.po.WxEnergyFees; | import com.iformall.domain.po.WxEnergyFees; | ||||
| import com.iformall.domain.po.WxFinanceAdvance; | |||||
| import com.iformall.domain.po.WxFinanceAdvanceType; | import com.iformall.domain.po.WxFinanceAdvanceType; | ||||
| import com.iformall.domain.po.WxFinanceReceive; | |||||
| import com.iformall.domain.po.base.BaseEntity; | import com.iformall.domain.po.base.BaseEntity; | ||||
| import com.iformall.enums.EnumBillAllType; | import com.iformall.enums.EnumBillAllType; | ||||
| import com.iformall.enums.EnumYesOrNo; | import com.iformall.enums.EnumYesOrNo; | ||||
| @@ -46,18 +48,13 @@ public class WxFinanceController extends BaseController { | |||||
| */ | */ | ||||
| @GetMapping("billTypes") | @GetMapping("billTypes") | ||||
| public ResultData billTypes() { | public ResultData billTypes() { | ||||
| Map<Integer,String> tmap = new HashMap<Integer,String>(); | |||||
| Map<Integer,EnumBillAllType> tmap = new HashMap<Integer,EnumBillAllType>(); | |||||
| for (EnumBillAllType t : EnumBillAllType.getOperateNotEnergyTypes()) { | for (EnumBillAllType t : EnumBillAllType.getOperateNotEnergyTypes()) { | ||||
| tmap.put(t.getCode(), t.getMessage()); | |||||
| tmap.put(t.getCode(), t); | |||||
| } | } | ||||
| return new ResultData(tmap); | return new ResultData(tmap); | ||||
| } | } | ||||
| @GetMapping("billTypeIsFixedPrice") | |||||
| public ResultData billTypeIsFixedPrice(Integer billType) { | |||||
| return new ResultData(EnumBillAllType.getEnum(billType).isFixedPrice()); | |||||
| } | |||||
| @ApiOperation("费用科目列表") | @ApiOperation("费用科目列表") | ||||
| @GetMapping("feesList") | @GetMapping("feesList") | ||||
| @ApiImplicitParams({ | @ApiImplicitParams({ | ||||
| @@ -151,4 +148,56 @@ public class WxFinanceController extends BaseController { | |||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @ApiOperation("预收记录列表") | |||||
| @GetMapping("advanceList") | |||||
| @ApiImplicitParams({ | |||||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true), | |||||
| }) | |||||
| public ResultData advanceList(@ModelAttribute WxFinanceAdvance record, Integer pageNum, Integer pageSize) { | |||||
| record.updateTenantInfo(getTenantInfo()); | |||||
| record.setSortColumns(BaseEntity.SortField.CreateTime_DESC); | |||||
| PageInfo<WxFinanceAdvance> page = wxFinanceService.advanceListAsPage(record, pageNum, pageSize); | |||||
| return new ResultData(page); | |||||
| } | |||||
| @ApiOperation("预收记录新增修改") | |||||
| @PostMapping("saveAdvance") | |||||
| public ResultData saveAdvance(@RequestBody WxFinanceAdvance record) { | |||||
| record.updateTenantInfo(getTenantInfo()); | |||||
| wxFinanceService.saveOrUpdateAdvance(record,this.getUser()); | |||||
| return new ResultData(); | |||||
| } | |||||
| @PostMapping("advanceUpdateIsDel") | |||||
| public ResultData advanceUpdateIsDel(@RequestBody WxFinanceAdvance record) { | |||||
| record.updateTenantInfo(getTenantInfo()); | |||||
| wxFinanceService.updateAdvanceIsDel(record); | |||||
| return new ResultData(); | |||||
| } | |||||
| @ApiOperation("新增收款单") | |||||
| @PostMapping("createReceive") | |||||
| public ResultData createReceive(@RequestBody WxFinanceAdvanceType record) { | |||||
| record.updateTenantInfo(getTenantInfo()); | |||||
| if (new BigDecimal(record.getRate()).compareTo(new BigDecimal(100)) > 0 ) { | |||||
| return new ResultData(Result.ERROR,"冲抵比例不能超过100"); | |||||
| } | |||||
| wxFinanceService.saveOrUpdateAdvanceType(record); | |||||
| return new ResultData(); | |||||
| } | |||||
| // @ApiOperation("收款记录列表") | |||||
| // @GetMapping("receiveList") | |||||
| // @ApiImplicitParams({ | |||||
| // @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||||
| // @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true), | |||||
| // }) | |||||
| // public ResultData receiveList(@ModelAttribute WxFinanceReceive record, Integer pageNum, Integer pageSize) { | |||||
| // record.updateTenantInfo(getTenantInfo()); | |||||
| // record.setSortColumns(BaseEntity.SortField.CreateTime_DESC); | |||||
| // PageInfo<WxFinanceAdvanceType> page = wxFinanceService.receiveListAsPage(record, pageNum, pageSize); | |||||
| // return new ResultData(page); | |||||
| // } | |||||
| } | } | ||||
| @@ -2618,3 +2618,58 @@ insert into wx_energy_fees_89 (id,tenant_id,parent_tenant_id,create_time,upda | |||||
| (3,'789',null,now(),now(),0,'运营管理费',1,1,0), | (3,'789',null,now(),now(),0,'运营管理费',1,1,0), | ||||
| (5,'789',null,now(),now(),0,'物业费',1,1,0), | (5,'789',null,now(),now(),0,'物业费',1,1,0), | ||||
| (6,'789',null,now(),now(),0,'物业押金',1,1,1); | (6,'789',null,now(),now(),0,'物业押金',1,1,1); | ||||
| CREATE TABLE `wx_finance_receive` ( | |||||
| `id` bigint(20) NOT NULL COMMENT '主键ID', | |||||
| `tenant_id` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '租户ID', | |||||
| `parent_tenant_id` varchar(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '父租户ID', | |||||
| `create_time` timestamp NULL DEFAULT NULL, | |||||
| `update_time` timestamp NULL DEFAULT NULL, | |||||
| `total_money` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '总支付金额', | |||||
| `status` int(3) NOT NULL COMMENT '状态', | |||||
| `create_by` bigint(20) DEFAULT NULL COMMENT '创建人', | |||||
| `create_by_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '创建人名称', | |||||
| `update_by` bigint(20) DEFAULT NULL COMMENT '更新人', | |||||
| `update_by_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '更新人名称', | |||||
| `money_detail` text COLLATE utf8mb4_unicode_ci COMMENT '收款详细', | |||||
| `merchant_id` bigint(20) NOT NULL COMMENT '商户编号', | |||||
| PRIMARY KEY (`id`), | |||||
| UNIQUE KEY `id_UNIQUE` (`id`) | |||||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='能耗表'; | |||||
| CREATE TABLE `wx_finance_receive_bill` ( | |||||
| `id` bigint(20) NOT NULL COMMENT '主键ID', | |||||
| `tenant_id` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '租户ID', | |||||
| `parent_tenant_id` varchar(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '父租户ID', | |||||
| `create_time` timestamp NULL DEFAULT NULL, | |||||
| `update_time` timestamp NULL DEFAULT NULL, | |||||
| `bill_id` bigint(20) NOT NULL COMMENT '账单id', | |||||
| `bill_type` int(3) NOT NULL COMMENT '账单类型', | |||||
| `fees_id` bigint(20) NOT NULL COMMENT '费用科目', | |||||
| `pay_way` bigint(20) NOT NULL COMMENT '支付方式', | |||||
| `receive_id` bigint(20) NOT NULL COMMENT '收款编号', | |||||
| PRIMARY KEY (`id`), | |||||
| UNIQUE KEY `id_UNIQUE` (`id`) | |||||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='能耗表'; | |||||
| CREATE TABLE `wx_finance_advance` ( | |||||
| `id` bigint(20) NOT NULL COMMENT '主键ID', | |||||
| `tenant_id` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '租户ID', | |||||
| `parent_tenant_id` varchar(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '父租户ID', | |||||
| `create_time` timestamp NULL DEFAULT NULL, | |||||
| `update_time` timestamp NULL DEFAULT NULL, | |||||
| `is_del` int(1) NOT NULL DEFAULT '0', | |||||
| `advance_type_id` bigint(20) NOT NULL COMMENT '类型id', | |||||
| `merchant_id` bigint(20) NOT NULL COMMENT '商户编码', | |||||
| `create_by` bigint(20) DEFAULT NULL COMMENT '创建人', | |||||
| `create_by_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, | |||||
| `update_by` bigint(20) DEFAULT NULL, | |||||
| `update_by_name` bigint(100) DEFAULT NULL, | |||||
| `money` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '金额', | |||||
| `remain_money` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '剩余金额', | |||||
| PRIMARY KEY (`id`), | |||||
| UNIQUE KEY `id_UNIQUE` (`id`) | |||||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='能耗表'; | |||||
| @@ -0,0 +1,64 @@ | |||||
| package com.iformall.domain.po; | |||||
| import com.baomidou.mybatisplus.annotation.TableField; | |||||
| import com.baomidou.mybatisplus.annotation.TableName; | |||||
| import com.iformall.domain.po.base.TenantEntity; | |||||
| import lombok.Data; | |||||
| import lombok.EqualsAndHashCode; | |||||
| import lombok.ToString; | |||||
| import java.util.Date; | |||||
| /** | |||||
| */ | |||||
| @TableName(value = "wx_finance_advance") | |||||
| @Data | |||||
| @ToString(callSuper = true) | |||||
| @EqualsAndHashCode(callSuper = true) | |||||
| public class WxFinanceAdvance extends TenantEntity { | |||||
| private static final long serialVersionUID = 7009117540201976664L; | |||||
| @io.swagger.annotations.ApiModelProperty(value="id",name="id") | |||||
| private Long id; | |||||
| @io.swagger.annotations.ApiModelProperty(value="createTime",name="createTime") | |||||
| private Date createTime; | |||||
| @TableField(exist = false) | |||||
| private Date createBegin; | |||||
| @TableField(exist = false) | |||||
| private Date createEnd; | |||||
| @io.swagger.annotations.ApiModelProperty(value="updateTime",name="updateTime") | |||||
| private Date updateTime; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "isDel", name = "isDel") | |||||
| private Integer isDel; | |||||
| @io.swagger.annotations.ApiModelProperty(value="advanceTypeId",name="advanceTypeId") | |||||
| private Long advanceTypeId; | |||||
| @TableField(exist = false) | |||||
| private String advanceTypeName; | |||||
| @io.swagger.annotations.ApiModelProperty(value="advanceTypeId",name="advanceTypeId") | |||||
| private Long merchantId; | |||||
| @TableField(exist = false) | |||||
| private String merchantName; | |||||
| @TableField(exist = false) | |||||
| private String shopNumber; | |||||
| @io.swagger.annotations.ApiModelProperty(value="createBy",name="createBy") | |||||
| private Long createBy; | |||||
| @io.swagger.annotations.ApiModelProperty(value="createByName",name="createByName") | |||||
| private String createByName; | |||||
| @io.swagger.annotations.ApiModelProperty(value="updateBy",name="updateBy") | |||||
| private Long updateBy; | |||||
| @io.swagger.annotations.ApiModelProperty(value="updateByName",name="updateByName") | |||||
| private String updateByName; | |||||
| @io.swagger.annotations.ApiModelProperty(value="预充总金额",name="money") | |||||
| private String money; | |||||
| @io.swagger.annotations.ApiModelProperty(value="剩余总金额",name="remainMoney") | |||||
| private String remainMoney; | |||||
| } | |||||
| @@ -0,0 +1,50 @@ | |||||
| package com.iformall.domain.po; | |||||
| import com.baomidou.mybatisplus.annotation.TableName; | |||||
| import com.iformall.domain.po.base.TenantEntity; | |||||
| import lombok.Data; | |||||
| import lombok.EqualsAndHashCode; | |||||
| import lombok.ToString; | |||||
| import java.util.Date; | |||||
| /** | |||||
| */ | |||||
| @TableName(value = "wx_finance_receive") | |||||
| @Data | |||||
| @ToString(callSuper = true) | |||||
| @EqualsAndHashCode(callSuper = true) | |||||
| public class WxFinanceReceive extends TenantEntity { | |||||
| private static final long serialVersionUID = 7009117540201976664L; | |||||
| @io.swagger.annotations.ApiModelProperty(value="id",name="id") | |||||
| private Long id; | |||||
| @io.swagger.annotations.ApiModelProperty(value="createTime",name="createTime") | |||||
| private Date createTime; | |||||
| @io.swagger.annotations.ApiModelProperty(value="updateTime",name="updateTime") | |||||
| private Date updateTime; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "收款总金额", name = "totalMoney") | |||||
| private String totalMoney; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "状态EnumFinanceReceiveStatus", name = "status") | |||||
| private Integer status; | |||||
| @io.swagger.annotations.ApiModelProperty(value="createBy",name="createBy") | |||||
| private Long createBy; | |||||
| @io.swagger.annotations.ApiModelProperty(value="createByName",name="createByName") | |||||
| private String createByName; | |||||
| @io.swagger.annotations.ApiModelProperty(value="updateBy",name="updateBy") | |||||
| private Long updateBy; | |||||
| @io.swagger.annotations.ApiModelProperty(value="updateByName",name="updateByName") | |||||
| private String updateByName; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "moneyDetail", name = "moneyDetail") | |||||
| private String moneyDetail; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "merchantId", name = "merchantId") | |||||
| private Long merchantId; | |||||
| } | |||||
| @@ -0,0 +1,43 @@ | |||||
| package com.iformall.domain.po; | |||||
| import com.baomidou.mybatisplus.annotation.TableName; | |||||
| import com.iformall.domain.po.base.TenantEntity; | |||||
| import lombok.Data; | |||||
| import lombok.EqualsAndHashCode; | |||||
| import lombok.ToString; | |||||
| import java.util.Date; | |||||
| /** | |||||
| */ | |||||
| @TableName(value = "wx_finance_receive_bill") | |||||
| @Data | |||||
| @ToString(callSuper = true) | |||||
| @EqualsAndHashCode(callSuper = true) | |||||
| public class WxFinanceReceiveBill extends TenantEntity { | |||||
| private static final long serialVersionUID = 7009117540201976664L; | |||||
| @io.swagger.annotations.ApiModelProperty(value="id",name="id") | |||||
| private Long id; | |||||
| @io.swagger.annotations.ApiModelProperty(value="createTime",name="createTime") | |||||
| private Date createTime; | |||||
| @io.swagger.annotations.ApiModelProperty(value="updateTime",name="updateTime") | |||||
| private Date updateTime; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "收款编号", name = "receiveId") | |||||
| private Long receiveId; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "账单编号", name = "billId") | |||||
| private Long billId; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "账单类型EnumBillAllType", name = "billType") | |||||
| private Integer billType; | |||||
| @io.swagger.annotations.ApiModelProperty(value="科目编号",name="feesId") | |||||
| private Long feesId; | |||||
| @io.swagger.annotations.ApiModelProperty(value="支付方式",name="payWay") | |||||
| private Long payWay; | |||||
| } | |||||
| @@ -464,5 +464,9 @@ public class WxMerchant extends TenantEntity { | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String billCompleteRemark; | private String billCompleteRemark; | ||||
| @TableField(exist = false) | |||||
| private String shopNumber; | |||||
| @TableField(exist = false) | |||||
| private Long shopId; | |||||
| } | } | ||||
| @@ -0,0 +1,38 @@ | |||||
| package com.iformall.enums; | |||||
| /** | |||||
| */ | |||||
| public enum EnumFinanceReceiveStatus { | |||||
| NORMAL(1,"正常"), | |||||
| INVALID(2,"作废"), | |||||
| SETOFF(3, "红冲"), | |||||
| ; | |||||
| public static EnumFinanceReceiveStatus getEnum(Integer code) { | |||||
| for (EnumFinanceReceiveStatus value : values()) { | |||||
| if (value.getCode().equals(code)) { | |||||
| return value; | |||||
| } | |||||
| } | |||||
| return null; | |||||
| } | |||||
| private Integer code; | |||||
| private String message; | |||||
| EnumFinanceReceiveStatus(Integer code, String message) { | |||||
| this.code = code; | |||||
| this.message = message; | |||||
| } | |||||
| public Integer getCode() { | |||||
| return code; | |||||
| } | |||||
| public String getMessage() { | |||||
| return message; | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,19 @@ | |||||
| package com.iformall.mapper; | |||||
| import com.iformall.common.CommonMapper; | |||||
| import com.iformall.domain.po.WxFinanceAdvance; | |||||
| import org.apache.ibatis.annotations.Param; | |||||
| import java.util.List; | |||||
| /** | |||||
| */ | |||||
| public interface WxFinanceAdvanceMapper extends CommonMapper<WxFinanceAdvance, Long> { | |||||
| List<WxFinanceAdvance> findList(WxFinanceAdvance wxBillRent); | |||||
| WxFinanceAdvance selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||||
| void setIsDel(@Param("id")Long id,@Param("tenantId")String tenantId,@Param("isDel")Integer isDel); | |||||
| } | |||||
| @@ -0,0 +1,16 @@ | |||||
| package com.iformall.mapper; | |||||
| import com.iformall.common.CommonMapper; | |||||
| import com.iformall.domain.po.WxFinanceReceiveBill; | |||||
| import org.apache.ibatis.annotations.Param; | |||||
| import java.util.List; | |||||
| /** | |||||
| */ | |||||
| public interface WxFinanceReceiveBillMapper extends CommonMapper<WxFinanceReceiveBill, Long> { | |||||
| List<WxFinanceReceiveBill> findList(WxFinanceReceiveBill wxBillRent); | |||||
| WxFinanceReceiveBill selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||||
| } | |||||
| @@ -0,0 +1,18 @@ | |||||
| package com.iformall.mapper; | |||||
| import com.iformall.common.CommonMapper; | |||||
| import com.iformall.domain.po.WxFinanceReceive; | |||||
| import org.apache.ibatis.annotations.Param; | |||||
| import java.util.List; | |||||
| /** | |||||
| */ | |||||
| public interface WxFinanceReceiveMapper extends CommonMapper<WxFinanceReceive, Long> { | |||||
| List<WxFinanceReceive> findList(WxFinanceReceive wxBillRent); | |||||
| WxFinanceReceive selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||||
| void setIsDel(@Param("id")Long id,@Param("tenantId")String tenantId,@Param("isDel")Integer isDel); | |||||
| } | |||||
| @@ -2,8 +2,11 @@ package com.iformall.service; | |||||
| import java.util.Map; | import java.util.Map; | ||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.iformall.domain.po.MallUserInfo; | |||||
| import com.iformall.domain.po.WxBillPayWay; | import com.iformall.domain.po.WxBillPayWay; | ||||
| import com.iformall.domain.po.WxFinanceAdvance; | |||||
| import com.iformall.domain.po.WxFinanceAdvanceType; | import com.iformall.domain.po.WxFinanceAdvanceType; | ||||
| import com.iformall.domain.po.WxFinanceReceive; | |||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| /** | /** | ||||
| */ | */ | ||||
| @@ -22,4 +25,14 @@ public interface WxFinanceService { | |||||
| WxFinanceAdvanceType getAdvanceTypeById(TenantEntity tenantEntity,Long id); | WxFinanceAdvanceType getAdvanceTypeById(TenantEntity tenantEntity,Long id); | ||||
| void saveOrUpdateAdvanceType(WxFinanceAdvanceType record); | void saveOrUpdateAdvanceType(WxFinanceAdvanceType record); | ||||
| void updateAdvanceTypeIsDel(WxFinanceAdvanceType record); | void updateAdvanceTypeIsDel(WxFinanceAdvanceType record); | ||||
| Map<Long,WxFinanceAdvanceType> getAdvanceTypeMap(WxFinanceAdvanceType record); | |||||
| //预收款 | |||||
| PageInfo<WxFinanceAdvance> advanceListAsPage(WxFinanceAdvance record, Integer pageIndex, Integer pageSize); | |||||
| WxFinanceAdvance getAdvanceById(TenantEntity tenantEntity,Long id); | |||||
| void saveOrUpdateAdvance(WxFinanceAdvance record,MallUserInfo user); | |||||
| void updateAdvanceIsDel(WxFinanceAdvance record); | |||||
| //收款 | |||||
| PageInfo<WxFinanceReceive> receiveListAsPage(WxFinanceReceive record, Integer pageIndex, Integer pageSize); | |||||
| } | } | ||||
| @@ -111,8 +111,10 @@ public interface WxShopService { | |||||
| Map<Long,WxShop> findShopMap(WxShop wxShop); | Map<Long,WxShop> findShopMap(WxShop wxShop); | ||||
| Map<Long,String> getMerchantShopNumberMap(TenantEntity tenantEntity,List<Long> merchantIds); | |||||
| Map<Long,String> getMerchantShopNumberMap(TenantEntity tenantEntity,List<Long> merchantIds,Integer isDel); | |||||
| List<Long> getFloorBuildShopIds(TenantEntity tenantEntity,String floorRule,Long building,Long floor,Integer shopDel) ; | List<Long> getFloorBuildShopIds(TenantEntity tenantEntity,String floorRule,Long building,Long floor,Integer shopDel) ; | ||||
| List<Long> getMerchantIds(WxShop wxShop); | |||||
| } | } | ||||
| @@ -188,7 +188,7 @@ public class WxCashBackActivityServiceImpl implements WxCashBackActivityService | |||||
| Map<Long,String> merchantShopNumberMap = null; | Map<Long,String> merchantShopNumberMap = null; | ||||
| if (null != midList && midList.size() > 0 ) { | if (null != midList && midList.size() > 0 ) { | ||||
| merchantShopNumberMap = wxShopService.getMerchantShopNumberMap(tenantEntity, midList); | |||||
| merchantShopNumberMap = wxShopService.getMerchantShopNumberMap(tenantEntity, midList,EnumYesOrNo.NO.getCode()); | |||||
| } | } | ||||
| for (WxCashBackActivityRecord _r : recordList) { | for (WxCashBackActivityRecord _r : recordList) { | ||||
| @@ -385,10 +385,15 @@ public class WxEnergyServiceImpl implements WxEnergyService { | |||||
| tq.updateTenantInfo(record); | tq.updateTenantInfo(record); | ||||
| tq.setId(record.getTimeId()); | tq.setId(record.getTimeId()); | ||||
| WxEnergyFeesTime time = this.getFeesTimeById(tq); | WxEnergyFeesTime time = this.getFeesTimeById(tq); | ||||
| if (null == time ) { | |||||
| throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(),"区间未查询到"); | |||||
| } | |||||
| // record.setStartTime(time.getStartTime()); | // record.setStartTime(time.getStartTime()); | ||||
| // record.setEndTime(time.getEndTime()); | // record.setEndTime(time.getEndTime()); | ||||
| WxEnergyMeter meter = this.getMeterById(record, record.getMeterId()); | WxEnergyMeter meter = this.getMeterById(record, record.getMeterId()); | ||||
| if (null == meter ) { | |||||
| throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(),"能源表未查询到"); | |||||
| } | |||||
| if (time.getType().intValue() != meter.getType().intValue()) { | if (time.getType().intValue() != meter.getType().intValue()) { | ||||
| throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(),"选择的表类型和区间不匹配"); | throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(),"选择的表类型和区间不匹配"); | ||||
| } | } | ||||
| @@ -30,12 +30,26 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| @Autowired | @Autowired | ||||
| WxFinanceAdvanceTypeMapper wxFinanceAdvanceTypeMapper; | WxFinanceAdvanceTypeMapper wxFinanceAdvanceTypeMapper; | ||||
| @Autowired | @Autowired | ||||
| WxFinanceAdvanceMapper wxFinanceAdvanceMapper; | |||||
| @Autowired | |||||
| WxFinanceAdvanceTypeFeesMapper wxFinanceAdvanceTypeFeesMapper; | WxFinanceAdvanceTypeFeesMapper wxFinanceAdvanceTypeFeesMapper; | ||||
| @Autowired | |||||
| WxFinanceReceiveMapper wxFinanceReceiveMapper; | |||||
| @Autowired | |||||
| WxFinanceReceiveBillMapper wxFinanceReceiveBillMapper; | |||||
| @Lazy | @Lazy | ||||
| @Autowired | @Autowired | ||||
| WxEnergyService wxEnergyService; | WxEnergyService wxEnergyService; | ||||
| @Lazy | |||||
| @Autowired | |||||
| WxMerchantService wxMerchantService; | |||||
| @Lazy | |||||
| @Autowired | |||||
| WxShopService wxShopService; | |||||
| @Override | @Override | ||||
| public PageInfo<WxBillPayWay> payWayListAsPage(WxBillPayWay record, Integer pageIndex, Integer pageSize) { | public PageInfo<WxBillPayWay> payWayListAsPage(WxBillPayWay record, Integer pageIndex, Integer pageSize) { | ||||
| PageInfo<WxBillPayWay> page = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxBillPayWayMapper.findList(record)); | PageInfo<WxBillPayWay> page = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxBillPayWayMapper.findList(record)); | ||||
| @@ -180,5 +194,118 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| public void updateAdvanceTypeIsDel(WxFinanceAdvanceType record) { | public void updateAdvanceTypeIsDel(WxFinanceAdvanceType record) { | ||||
| wxFinanceAdvanceTypeMapper.setIsDel(record.getId(), record.getTenantId(), record.getIsDel()); | wxFinanceAdvanceTypeMapper.setIsDel(record.getId(), record.getTenantId(), record.getIsDel()); | ||||
| } | } | ||||
| @Override | |||||
| public Map<Long, WxFinanceAdvanceType> getAdvanceTypeMap(WxFinanceAdvanceType record) { | |||||
| List<WxFinanceAdvanceType> list = wxFinanceAdvanceTypeMapper.findList(record); | |||||
| if (null != list && list.size() > 0 ) { | |||||
| Map<Long,WxFinanceAdvanceType> retMap = new HashMap<Long,WxFinanceAdvanceType>(); | |||||
| for (int i = 0 ; i<list.size() ; i ++) { | |||||
| WxFinanceAdvanceType m = list.get(i); | |||||
| retMap.put(m.getId(), m); | |||||
| } | |||||
| return retMap; | |||||
| } | |||||
| return null; | |||||
| } | |||||
| @Override | |||||
| public PageInfo<WxFinanceAdvance> advanceListAsPage(WxFinanceAdvance record, Integer pageIndex, Integer pageSize) { | |||||
| PageInfo<WxFinanceAdvance> page = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxFinanceAdvanceMapper.findList(record)); | |||||
| if (null != page && null != page.getList()) { | |||||
| WxFinanceAdvanceType fat = new WxFinanceAdvanceType(); | |||||
| fat.updateTenantInfo(record); | |||||
| Map<Long, WxFinanceAdvanceType> advanceTypMap = this.getAdvanceTypeMap(fat); | |||||
| List<Long> merchantIdList = new ArrayList<Long>(); | |||||
| for (int i = 0 ; i < page.getList().size() ; i++) { | |||||
| WxFinanceAdvance at = page.getList().get(i); | |||||
| if (!merchantIdList.contains(at.getMerchantId())) { | |||||
| merchantIdList.add(at.getMerchantId()); | |||||
| } | |||||
| } | |||||
| WxMerchant mq = new WxMerchant(); | |||||
| mq.updateTenantInfo(record); | |||||
| mq.setIds(merchantIdList); | |||||
| Map<Long, WxMerchant> merchantMap = wxMerchantService.findMerchantMap(mq); | |||||
| Map<Long, String> shopNumberMap = wxShopService.getMerchantShopNumberMap(record, merchantIdList, null); | |||||
| for (int i = 0 ; i < page.getList().size() ; i++) { | |||||
| WxFinanceAdvance at = page.getList().get(i); | |||||
| if (null != advanceTypMap) { | |||||
| WxFinanceAdvanceType wfat = advanceTypMap.get(at.getAdvanceTypeId()); | |||||
| if (null != wfat) { | |||||
| at.setAdvanceTypeName(wfat.getName()); | |||||
| } | |||||
| } | |||||
| if (null != merchantMap) { | |||||
| WxMerchant m = merchantMap.get(at.getMerchantId()); | |||||
| if (null != m) { | |||||
| at.setMerchantName(m.getName()); | |||||
| } | |||||
| } | |||||
| if (null != shopNumberMap) { | |||||
| String sn = shopNumberMap.get(at.getMerchantId()); | |||||
| at.setShopNumber(sn); | |||||
| } | |||||
| } | |||||
| } | |||||
| return page; | |||||
| } | |||||
| @Override | |||||
| public WxFinanceAdvance getAdvanceById(TenantEntity tenantEntity, Long id) { | |||||
| return wxFinanceAdvanceMapper.selectById(id, tenantEntity.getTenantId()); | |||||
| } | |||||
| @Override | |||||
| public void saveOrUpdateAdvance(WxFinanceAdvance record,MallUserInfo user) { | |||||
| Date date = new Date(); | |||||
| if (null == record.getMerchantId()) { | |||||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "请选择商户"); | |||||
| } | |||||
| if (null == record.getAdvanceTypeId()) { | |||||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "请选择商户"); | |||||
| } | |||||
| if (record.getId() == null) { | |||||
| final IdWorker idWorker = IdWorker.get(); | |||||
| record.setId(idWorker.nextId()); | |||||
| record.setCreateTime(date); | |||||
| record.setUpdateTime(date); | |||||
| record.setCreateBy(user.getId()); | |||||
| record.setCreateByName(user.getName()); | |||||
| record.setUpdateBy(user.getId()); | |||||
| record.setUpdateByName(user.getName()); | |||||
| try { | |||||
| wxFinanceAdvanceMapper.insert(record); | |||||
| } catch (Exception e) { | |||||
| logger.error("保存失败,e:" + e.getMessage()); | |||||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||||
| } | |||||
| } else { | |||||
| record.setUpdateBy(user.getId()); | |||||
| record.setUpdateByName(user.getName()); | |||||
| record.setUpdateTime(date); | |||||
| wxFinanceAdvanceMapper.updateById(record); | |||||
| } | |||||
| } | |||||
| @Override | |||||
| public void updateAdvanceIsDel(WxFinanceAdvance record) { | |||||
| // TODO Auto-generated method stub | |||||
| } | |||||
| @Override | |||||
| public PageInfo<WxFinanceReceive> receiveListAsPage(WxFinanceReceive record, Integer pageIndex, Integer pageSize) { | |||||
| PageInfo<WxFinanceReceive> page = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxFinanceReceiveMapper.findList(record)); | |||||
| return page; | |||||
| } | |||||
| } | } | ||||
| @@ -443,7 +443,6 @@ public class WxGameServiceImpl implements WxGameService { | |||||
| wxGameMapper.deleteById(id); | wxGameMapper.deleteById(id); | ||||
| } | } | ||||
| @Transactional(rollbackFor = Exception.class) | @Transactional(rollbackFor = Exception.class) | ||||
| @Override | @Override | ||||
| public ResultData luckDraw(Long gameId,Long userId,Integer userCredit){ | public ResultData luckDraw(Long gameId,Long userId,Integer userCredit){ | ||||
| @@ -1267,6 +1267,14 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| merchantIds.addAll(floorMerchantIds); | merchantIds.addAll(floorMerchantIds); | ||||
| } | } | ||||
| } | } | ||||
| if (StringUtils.isNotBlank(record.getShopNumber()) || null != record.getShopId()) { | |||||
| WxShop shop = new WxShop(); | |||||
| shop.updateTenantInfo(record); | |||||
| shop.setShopNumber(record.getShopNumber()); | |||||
| shop.setId(record.getShopId()); | |||||
| wxShopService.getMerchantIds(shop); | |||||
| } | |||||
| if (merchantIds.size() > 0 ) { | if (merchantIds.size() > 0 ) { | ||||
| record.setIds(merchantIds); | record.setIds(merchantIds); | ||||
| @@ -200,7 +200,7 @@ public class WxRaffleActivityServiceImpl implements WxRaffleActivityService { | |||||
| Map<Long,String> merchantShopNumberMap = null; | Map<Long,String> merchantShopNumberMap = null; | ||||
| if (null != midList && midList.size() > 0 ) { | if (null != midList && midList.size() > 0 ) { | ||||
| merchantShopNumberMap = wxShopService.getMerchantShopNumberMap(tenantEntity, midList); | |||||
| merchantShopNumberMap = wxShopService.getMerchantShopNumberMap(tenantEntity, midList,EnumYesOrNo.NO.getCode()); | |||||
| } | } | ||||
| for (WxRaffleActivityRecord _r : recordList) { | for (WxRaffleActivityRecord _r : recordList) { | ||||
| @@ -732,15 +732,16 @@ public class WxShopServiceImpl implements WxShopService { | |||||
| } | } | ||||
| @Override | @Override | ||||
| public Map<Long, String> getMerchantShopNumberMap(TenantEntity tenantEntity,List<Long> merchantIds) { | |||||
| public Map<Long, String> getMerchantShopNumberMap(TenantEntity tenantEntity,List<Long> merchantIds,Integer isDel) { | |||||
| WxMerchantShop merchantShopQ = new WxMerchantShop(); | WxMerchantShop merchantShopQ = new WxMerchantShop(); | ||||
| merchantShopQ.updateTenantInfo(tenantEntity); | merchantShopQ.updateTenantInfo(tenantEntity); | ||||
| merchantShopQ.setMerchantIds(merchantIds); | merchantShopQ.setMerchantIds(merchantIds); | ||||
| merchantShopQ.setIsDel(0); | |||||
| merchantShopQ.setIsDel(isDel); | |||||
| List<WxMerchantShop> merchantShopList = wxMerchantShopMapper.findList(merchantShopQ); | List<WxMerchantShop> merchantShopList = wxMerchantShopMapper.findList(merchantShopQ); | ||||
| WxShop sq = new WxShop(); | WxShop sq = new WxShop(); | ||||
| sq.updateTenantInfo(tenantEntity); | sq.updateTenantInfo(tenantEntity); | ||||
| sq.setIsDel(isDel); | |||||
| Map<Long,WxShop> shopMap = this.findShopMap(sq); | Map<Long,WxShop> shopMap = this.findShopMap(sq); | ||||
| if (null != merchantShopList && merchantShopList.size() > 0) { | if (null != merchantShopList && merchantShopList.size() > 0) { | ||||
| Map<Long, String> retMap = new HashMap<Long, String>(); | Map<Long, String> retMap = new HashMap<Long, String>(); | ||||
| @@ -784,4 +785,17 @@ public class WxShopServiceImpl implements WxShopService { | |||||
| } | } | ||||
| return null; | return null; | ||||
| } | } | ||||
| @Override | |||||
| public List<Long> getMerchantIds(WxShop wxShop) { | |||||
| List<Long> shopIds = this.getShopIds(wxShop); | |||||
| if (null == shopIds || shopIds.size() <= 0 ) { | |||||
| return null; | |||||
| } | |||||
| WxMerchantShop merchantShopQ = new WxMerchantShop(); | |||||
| merchantShopQ.updateTenantInfo(wxShop); | |||||
| merchantShopQ.setIsDel(wxShop.getIsDel()); | |||||
| merchantShopQ.setShopIdList(shopIds); | |||||
| return wxMerchantShopMapper.findMerchantIdList(merchantShopQ); | |||||
| } | |||||
| } | } | ||||
| @@ -0,0 +1,68 @@ | |||||
| <?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="com.iformall.mapper.WxFinanceAdvanceMapper"> | |||||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxFinanceAdvance"> | |||||
| <id column="id" jdbcType="BIGINT" property="id"/> | |||||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> | |||||
| <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" /> | |||||
| <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> | |||||
| <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> | |||||
| <result column="is_del" jdbcType="INTEGER" property="isDel"/> | |||||
| <result column="advance_type_id" jdbcType="BIGINT" property="advanceTypeId"/> | |||||
| <result column="merchant_id" jdbcType="BIGINT" property="merchantId"/> | |||||
| <result column="create_by" jdbcType="BIGINT" property="createBy"/> | |||||
| <result column="create_by_name" jdbcType="VARCHAR" property="createByName"/> | |||||
| <result column="update_by" jdbcType="BIGINT" property="updateBy"/> | |||||
| <result column="update_by_name" jdbcType="VARCHAR" property="updateByName"/> | |||||
| <result column="money" jdbcType="VARCHAR" property="money"/> | |||||
| <result column="remain_money" jdbcType="VARCHAR" property="remainMoney"/> | |||||
| </resultMap> | |||||
| <sql id="allColumns"> | |||||
| `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`is_del`,`advance_type_id`,`merchant_id`,`create_by`, | |||||
| `create_by_name`,`update_by`,`update_by_name`,`money`,`remain_money` | |||||
| </sql> | |||||
| <sql id="dynamicWhereConditions"> | |||||
| where 1=1 | |||||
| <if test=" null != id ">and `id` = #{id}</if> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test=" null != isDel ">and `is_del` = #{isDel}</if> | |||||
| <if test=" null != advanceTypeId ">and `advance_type_id` = #{advanceTypeId}</if> | |||||
| <if test=" null != merchantId ">and `merchant_id` = #{merchantId}</if> | |||||
| <if test=" null != createByName and '' != createByName ">and create_by_name like concat('%', #{createByName},'%')</if> | |||||
| <if test=" null != createBegin ">and `create_time` >= #{createBegin}</if> | |||||
| <if test=" null != createEnd ">and `create_time` <= #{createEnd}</if> | |||||
| <if test=" null != ids "> | |||||
| and id in | |||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||||
| #{idItem} | |||||
| </foreach> | |||||
| </if> | |||||
| <if test=" null != sortColumns">order by ${sortColumns}</if> | |||||
| </sql> | |||||
| <select id="findList" parameterType="com.iformall.domain.po.WxFinanceAdvance" resultMap="BaseResultMap"> | |||||
| select | |||||
| <include refid="allColumns"/> | |||||
| from wx_finance_advance | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </select> | |||||
| <select id="selectById" parameterType="HashMap" resultMap="BaseResultMap"> | |||||
| select | |||||
| <include refid="allColumns"/> | |||||
| from wx_finance_advance where id = #{id} and `tenant_id` = #{tenantId} | |||||
| </select> | |||||
| <update id = "setIsDel" parameterType="HashMap"> | |||||
| update wx_finance_advance set is_del = #{isDel} where id = #{id} and `tenant_id` = #{tenantId} | |||||
| </update> | |||||
| </mapper> | |||||
| @@ -0,0 +1,60 @@ | |||||
| <?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="com.iformall.mapper.WxFinanceReceiveBillMapper"> | |||||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxFinanceReceiveBill"> | |||||
| <id column="id" jdbcType="BIGINT" property="id"/> | |||||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> | |||||
| <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" /> | |||||
| <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> | |||||
| <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> | |||||
| <result column="bill_id" jdbcType="BIGINT" property="billId"/> | |||||
| <result column="bill_type" jdbcType="INTEGER" property="billType"/> | |||||
| <result column="fees_id" jdbcType="BIGINT" property="feesId"/> | |||||
| <result column="pay_way" jdbcType="BIGINT" property="payWay"/> | |||||
| <result column="receive_id" jdbcType="BIGINT" property="receiveId"/> | |||||
| </resultMap> | |||||
| <sql id="allColumns"> | |||||
| `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`bill_id`,`bill_type`,`fees_id`, | |||||
| `pay_way`,`receive_id` | |||||
| </sql> | |||||
| <sql id="dynamicWhereConditions"> | |||||
| where 1=1 | |||||
| <if test=" null != id ">and `id` = #{id}</if> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test=" null != billId ">and `bill_id` = #{billId}</if> | |||||
| <if test=" null != billType ">and `bill_type` = #{billType}</if> | |||||
| <if test=" null != feesId ">and `fees_id` = #{feesId}</if> | |||||
| <if test=" null != payWay ">and `pay_way` = #{payWay}</if> | |||||
| <if test=" null != receiveId ">and `receive_id` = #{receiveId}</if> | |||||
| <if test=" null != ids "> | |||||
| and id in | |||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||||
| #{idItem} | |||||
| </foreach> | |||||
| </if> | |||||
| <if test=" null != sortColumns">order by ${sortColumns}</if> | |||||
| </sql> | |||||
| <select id="findList" parameterType="com.iformall.domain.po.WxFinanceReceiveBill" resultMap="BaseResultMap"> | |||||
| select | |||||
| <include refid="allColumns"/> | |||||
| from wx_finance_receive_bill | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </select> | |||||
| <select id="selectById" parameterType="HashMap" resultMap="BaseResultMap"> | |||||
| select | |||||
| <include refid="allColumns"/> | |||||
| from wx_finance_receive_bill where id = #{id} and `tenant_id` = #{tenantId} | |||||
| </select> | |||||
| </mapper> | |||||
| @@ -0,0 +1,63 @@ | |||||
| <?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="com.iformall.mapper.WxFinanceReceiveMapper"> | |||||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxFinanceReceive"> | |||||
| <id column="id" jdbcType="BIGINT" property="id"/> | |||||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> | |||||
| <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" /> | |||||
| <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> | |||||
| <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> | |||||
| <result column="total_money" jdbcType="VARCHAR" property="totalMoney"/> | |||||
| <result column="status" jdbcType="INTEGER" property="status"/> | |||||
| <result column="money_detail" jdbcType="VARCHAR" property="moneyDetail"/> | |||||
| <result column="create_by" jdbcType="BIGINT" property="createBy"/> | |||||
| <result column="create_by_name" jdbcType="VARCHAR" property="createByName"/> | |||||
| <result column="update_by" jdbcType="BIGINT" property="updateBy"/> | |||||
| <result column="update_by_name" jdbcType="VARCHAR" property="updateByName"/> | |||||
| <result column="merchant_id" jdbcType="BIGINT" property="merchantId"/> | |||||
| </resultMap> | |||||
| <sql id="allColumns"> | |||||
| `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`total_money`,`status`,`money_detail`, | |||||
| `create_by`,`create_by_name`,`update_by`,`update_by_name`,`merchant_id` | |||||
| </sql> | |||||
| <sql id="dynamicWhereConditions"> | |||||
| where 1=1 | |||||
| <if test=" null != id ">and `id` = #{id}</if> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test=" null != status ">and `status` = #{status}</if> | |||||
| <if test=" null != merchantId ">and `merchantId` = #{merchant_id}</if> | |||||
| <if test=" null != ids "> | |||||
| and id in | |||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||||
| #{idItem} | |||||
| </foreach> | |||||
| </if> | |||||
| <if test=" null != sortColumns">order by ${sortColumns}</if> | |||||
| </sql> | |||||
| <select id="findList" parameterType="com.iformall.domain.po.WxFinanceReceive" resultMap="BaseResultMap"> | |||||
| select | |||||
| <include refid="allColumns"/> | |||||
| from wx_finance_receive | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </select> | |||||
| <select id="selectById" parameterType="HashMap" resultMap="BaseResultMap"> | |||||
| select | |||||
| <include refid="allColumns"/> | |||||
| from wx_finance_receive where id = #{id} and `tenant_id` = #{tenantId} | |||||
| </select> | |||||
| <update id = "setIsDel" parameterType="HashMap"> | |||||
| update wx_finance_receive set is_del = #{isDel} where id = #{id} and `tenant_id` = #{tenantId} | |||||
| </update> | |||||
| </mapper> | |||||