Просмотр исходного кода

Merge tag 'refs/tags/jenkins-back-end-2727' into release

develop
release_toaliyun_real
gongbiao 6 лет назад
Родитель
Сommit
a06352a06d
4 измененных файлов: 17 добавлений и 10 удалений
  1. +9
    -3
      mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponSendController.java
  2. +1
    -1
      mallinkSchedule/src/main/java/com/iformall/schedule/CouponSendSchedule.java
  3. +1
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxBusinessServiceImpl.java
  4. +6
    -5
      mallinkService/src/main/resources/mapper/WxBillSettleMapper.xml

+ 9
- 3
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), @ApiImplicitParam(name = "sendType", value = "注券类型(生日券=8)", dataType = "int", paramType = "query", required = true),
}) })
@SystemControllerLog(description = "注券-添加或更新配置") @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())) { if(!Objects.equals(sendType,EnumCouponSendSendType.BIRTHDAY.getCode())) {
return new ResultData(ErrorCode.COUPON_VALID_NOT_SUPPORTED); 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(); return new ResultData();
} }


@@ -90,7 +96,7 @@ public class WxCouponSendController extends BaseController {
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "sendType", value = "注券类型(生日券=8)", dataType = "int", paramType = "query", required = true)}) @ApiImplicitParam(name = "sendType", value = "注券类型(生日券=8)", dataType = "int", paramType = "query", required = true)})
@SystemControllerLog(description = "注券-获取配置") @SystemControllerLog(description = "注券-获取配置")
public ResultData getConfig(@NotNull Integer sendType) {
public ResultData getConfig(Integer sendType) {
WxCouponSend wxCouponSend = wxCouponSendService.getConfig(sendType, getTenantId()); WxCouponSend wxCouponSend = wxCouponSendService.getConfig(sendType, getTenantId());
return new ResultData(Objects.isNull(wxCouponSend) ? null : wxCouponSend.getConditions()); return new ResultData(Objects.isNull(wxCouponSend) ? null : wxCouponSend.getConditions());
} }


+ 1
- 1
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() { public void birthdayCouponSendSchedule() {
logger.info("生日发券: 任务开始"); logger.info("生日发券: 任务开始");
List<WxMall> mallList = wxMallMapper.findList(new WxMall()); List<WxMall> mallList = wxMallMapper.findList(new WxMall());


+ 1
- 1
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()); BigDecimal area = new BigDecimal(e.get("area").toString());
if (area.doubleValue() > 0) { if (area.doubleValue() > 0) {
BigDecimal areaRatio = businessSumMoney.divide(area, 2, BigDecimal.ROUND_HALF_UP).divide(new BigDecimal(100), 2, BigDecimal.ROUND_HALF_UP); 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());
} }
} }
}); });


+ 6
- 5
mallinkService/src/main/resources/mapper/WxBillSettleMapper.xml Просмотреть файл

@@ -18,8 +18,8 @@
</resultMap> </resultMap>


<sql id="allColumns"> <sql id="allColumns">
`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`
</sql> </sql>


<sql id="dynamicWhereConditions"> <sql id="dynamicWhereConditions">
@@ -98,12 +98,13 @@
) bill ) bill
on(bb.bill_id=bill.id) where bb.settle_id = s.id and bb.type=0 on(bb.bill_id=bill.id) where bb.settle_id = s.id and bb.type=0
) receiveMoney, ) receiveMoney,

(select IFNULL(sum(bill.owe),0) from wx_bill_settle_bill bb left join (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,'租金' (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 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 union all
select id,merchant_id,shop_id,tenant_id,2 bill_type_value,'租赁押金' 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 wx_bill_rent_deposit
union all union all
select id,merchant_id,shop_id,tenant_id,3 bill_type_value,'物业费' select id,merchant_id,shop_id,tenant_id,3 bill_type_value,'物业费'
@@ -111,7 +112,7 @@
wx_bill_property where is_preview = 0 wx_bill_property where is_preview = 0
union all union all
select id,merchant_id,shop_id,tenant_id,4 bill_type_value,'物业押金' 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 wx_bill_property_deposit
union all union all
select id,merchant_id,shop_id,tenant_id,5 bill_type_value,'水费' bill_type,0 as 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 need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_other
union all union all
select id,merchant_id,shop_id,tenant_id,8 bill_type_value,'其他押金' bill_type,0 as 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 union all
select id,id merchant_id,'' shop_id,tenant_id,10 bill_type_value,'补贴' bill_type,0 as 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 need_pay,subsidy receive_pay,0 pay,subsidy owe,'' receive_date,'' pay_date,'' expired_day,status,'' rent_shop_type from wx_merchant_subsidy


Загрузка…
Отмена
Сохранить