diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponSendController.java b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponSendController.java index 14f835b34..581116528 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponSendController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponSendController.java @@ -77,11 +77,17 @@ public class WxCouponSendController extends BaseController { @ApiImplicitParam(name = "sendType", value = "注券类型(生日券=8)", dataType = "int", paramType = "query", required = true), }) @SystemControllerLog(description = "注券-添加或更新配置") - public ResultData addConfig(@NotNull Integer beforeDays, @NotNull Integer sendType) { + public ResultData addConfig(Integer beforeDays, Integer sendType) { if(!Objects.equals(sendType,EnumCouponSendSendType.BIRTHDAY.getCode())) { return new ResultData(ErrorCode.COUPON_VALID_NOT_SUPPORTED); } - wxCouponSendService.saveOrUpdateConfig(beforeDays, sendType, getTenantId()); + try { + wxCouponSendService.saveOrUpdateConfig(beforeDays, sendType, getTenantId()); + } catch (MallinkException e) { + return new ResultData(e.getErrorCode(), e.getMessage()); + } catch (Exception e) { + return new ResultData(ErrorCode.SYS_PARAMETER_ERROR, e.getMessage()); + } return new ResultData(); } @@ -90,7 +96,7 @@ public class WxCouponSendController extends BaseController { @ApiImplicitParams({ @ApiImplicitParam(name = "sendType", value = "注券类型(生日券=8)", dataType = "int", paramType = "query", required = true)}) @SystemControllerLog(description = "注券-获取配置") - public ResultData getConfig(@NotNull Integer sendType) { + public ResultData getConfig(Integer sendType) { WxCouponSend wxCouponSend = wxCouponSendService.getConfig(sendType, getTenantId()); return new ResultData(Objects.isNull(wxCouponSend) ? null : wxCouponSend.getConditions()); } diff --git a/mallinkSchedule/src/main/java/com/iformall/schedule/CouponSendSchedule.java b/mallinkSchedule/src/main/java/com/iformall/schedule/CouponSendSchedule.java index 05c4ee3c4..2a5c0a9ff 100644 --- a/mallinkSchedule/src/main/java/com/iformall/schedule/CouponSendSchedule.java +++ b/mallinkSchedule/src/main/java/com/iformall/schedule/CouponSendSchedule.java @@ -211,7 +211,7 @@ public class CouponSendSchedule { /** * 生日券发放 */ - @Scheduled(cron = "0 30 14 * * ?") // 测试每天8:30点发券 + @Scheduled(cron = "0 30 15 * * ?") // 测试每天8:30点发券 public void birthdayCouponSendSchedule() { logger.info("生日发券: 任务开始"); List mallList = wxMallMapper.findList(new WxMall()); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBusinessServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBusinessServiceImpl.java index 94a826de0..88c78cdef 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBusinessServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBusinessServiceImpl.java @@ -117,7 +117,7 @@ public class WxBusinessServiceImpl implements WxBusinessService { BigDecimal area = new BigDecimal(e.get("area").toString()); if (area.doubleValue() > 0) { BigDecimal areaRatio = businessSumMoney.divide(area, 2, BigDecimal.ROUND_HALF_UP).divide(new BigDecimal(100), 2, BigDecimal.ROUND_HALF_UP); - e.put("rent", areaRatio.toBigInteger()); + e.put("rent", areaRatio.toPlainString()); } } }); diff --git a/mallinkService/src/main/resources/mapper/WxBillSettleMapper.xml b/mallinkService/src/main/resources/mapper/WxBillSettleMapper.xml index 02a8d5c28..a6961c773 100644 --- a/mallinkService/src/main/resources/mapper/WxBillSettleMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillSettleMapper.xml @@ -18,8 +18,8 @@ - `id`,`tenant_id`,`settle_number`,`merchant_id`,`status`,`apply_status`, - `receive_money`,`pay_money`,`settletime`,`createtime`,`updatetime` + `id`,`tenant_id`,`settle_number`,`merchant_id`,`status`,`apply_status`, + `receive_money`,`pay_money`,`settletime`,`createtime`,`updatetime` @@ -98,12 +98,13 @@ ) bill on(bb.bill_id=bill.id) where bb.settle_id = s.id and bb.type=0 ) receiveMoney, + (select IFNULL(sum(bill.owe),0) from wx_bill_settle_bill bb left join (select id,merchant_id,shop_id,tenant_id,1 bill_type_value,'租金' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_rent where is_preview = 0 union all select id,merchant_id,shop_id,tenant_id,2 bill_type_value,'租赁押金' - bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from + bill_type,need_pay,receive_pay,pay,receive_pay owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_rent_deposit union all select id,merchant_id,shop_id,tenant_id,3 bill_type_value,'物业费' @@ -111,7 +112,7 @@ wx_bill_property where is_preview = 0 union all select id,merchant_id,shop_id,tenant_id,4 bill_type_value,'物业押金' - bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from + bill_type,need_pay,receive_pay,pay,receive_pay owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_property_deposit union all select id,merchant_id,shop_id,tenant_id,5 bill_type_value,'水费' bill_type,0 as @@ -130,7 +131,7 @@ need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_other union all select id,merchant_id,shop_id,tenant_id,8 bill_type_value,'其他押金' bill_type,0 as - need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_other_deposit + need_pay,receive_pay,pay,receive_pay owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_other_deposit union all select id,id merchant_id,'' shop_id,tenant_id,10 bill_type_value,'补贴' bill_type,0 as need_pay,subsidy receive_pay,0 pay,subsidy owe,'' receive_date,'' pay_date,'' expired_day,status,'' rent_shop_type from wx_merchant_subsidy