xhxu 5 лет назад
Родитель
Сommit
2019ed1fdd
2 измененных файлов: 29 добавлений и 6 удалений
  1. +28
    -5
      mallinkTTAdmin/src/main/java/com/iformall/controller/tt/TtCouponController.java
  2. +1
    -1
      mallinkTTAdmin/src/main/java/com/iformall/controller/tt/TtOrderController.java

+ 28
- 5
mallinkTTAdmin/src/main/java/com/iformall/controller/tt/TtCouponController.java Просмотреть файл

@@ -12,6 +12,7 @@ import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.po.tt.TtCoupon; import com.iformall.domain.po.tt.TtCoupon;
import com.iformall.domain.po.tt.TtVideoLibrary; import com.iformall.domain.po.tt.TtVideoLibrary;
import com.iformall.enums.*; import com.iformall.enums.*;
import com.iformall.exception.MallinkException;
import com.iformall.service.WxBusinessService; import com.iformall.service.WxBusinessService;
import com.iformall.service.WxFlowService; import com.iformall.service.WxFlowService;
import com.iformall.service.WxMerchantService; import com.iformall.service.WxMerchantService;
@@ -69,7 +70,7 @@ public class TtCouponController extends BaseController {
public ResultData list(@ModelAttribute TtCoupon record, Integer pageNum, Integer pageSize, Integer dataType) { public ResultData list(@ModelAttribute TtCoupon record, Integer pageNum, Integer pageSize, Integer dataType) {
logger.debug("[" + getIpAddr() + "] TtCouponController::list"); logger.debug("[" + getIpAddr() + "] TtCouponController::list");
if (record == null) record = new TtCoupon(); if (record == null) record = new TtCoupon();
record.updateTenantInfo(ifParentUpdateTenantInfo());
record.updateTenantInfo(getTenantInfo());
// if(record.getType() == null || record.getType().equals(EnumTtCouponType.COUPON_SINGLE.getCode())){ // if(record.getType() == null || record.getType().equals(EnumTtCouponType.COUPON_SINGLE.getCode())){
// record.setType(EnumTtCouponType.COUPON_SINGLE.getCode()); // record.setType(EnumTtCouponType.COUPON_SINGLE.getCode());
// }else{ // }else{
@@ -93,7 +94,13 @@ public class TtCouponController extends BaseController {
if(record == null){ if(record == null){
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); return new ResultData(ErrorCode.SYS_PARAMETER_ERROR);
} }
TenantEntity tenantEntity = ifParentUpdateAloneTenantInfo();
TenantEntity tenantEntity;
try {
tenantEntity = ifParentUpdateAloneTenantInfo();
} catch (MallinkException e) {
logger.error(e.getMessage());
return new ResultData(e.getErrorCode(), e.getMessage());
}
record.updateTenantInfo(tenantEntity); record.updateTenantInfo(tenantEntity);


if(record.getId() != null){ if(record.getId() != null){
@@ -198,7 +205,13 @@ public class TtCouponController extends BaseController {
if (record.getId() == null) { if (record.getId() == null) {
return new ResultData(ResultData.ERROR, "缺少id"); return new ResultData(ResultData.ERROR, "缺少id");
} }
TenantEntity tenantEntity = ifParentUpdateAloneTenantInfo();
TenantEntity tenantEntity;
try {
tenantEntity = ifParentUpdateAloneTenantInfo();
} catch (MallinkException e) {
logger.error(e.getMessage());
return new ResultData(e.getErrorCode(), e.getMessage());
}
record.updateTenantInfo(tenantEntity); record.updateTenantInfo(tenantEntity);


TtCoupon coupon = ttCouponService.getById(record.getId()); TtCoupon coupon = ttCouponService.getById(record.getId());
@@ -317,7 +330,12 @@ public class TtCouponController extends BaseController {
if (id == null) { if (id == null) {
return new ResultData(ResultData.ERROR, "缺少id"); return new ResultData(ResultData.ERROR, "缺少id");
} }
ifParentTenantInfoAlone();
try {
ifParentTenantInfoAlone();
} catch (MallinkException e) {
logger.error(e.getMessage());
return new ResultData(e.getErrorCode(), e.getMessage());
}
return ttCouponService.auditPass(id); return ttCouponService.auditPass(id);
} }


@@ -330,7 +348,12 @@ public class TtCouponController extends BaseController {
if (record.getId() == null) { if (record.getId() == null) {
return new ResultData(ResultData.ERROR, "缺少id"); return new ResultData(ResultData.ERROR, "缺少id");
} }
ifParentTenantInfoAlone();
try {
ifParentTenantInfoAlone();
} catch (MallinkException e) {
logger.error(e.getMessage());
return new ResultData(e.getErrorCode(), e.getMessage());
}
return ttCouponService.auditRejected(record.getId()); return ttCouponService.auditRejected(record.getId());
} }




+ 1
- 1
mallinkTTAdmin/src/main/java/com/iformall/controller/tt/TtOrderController.java Просмотреть файл

@@ -51,7 +51,7 @@ public class TtOrderController extends BaseController {
if (order == null){ if (order == null){
order = new TtOrder(); order = new TtOrder();
} }
order.updateTenantInfo(ifParentUpdateTenantInfo());
order.updateTenantInfo(getTenantInfo());
return new ResultData(ttOrderService.listAsPage(order, pageNum, pageSize)); return new ResultData(ttOrderService.listAsPage(order, pageNum, pageSize));
} }




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