| @@ -76,6 +76,9 @@ public class WxOfflineActivityRecordController extends BaseController { | |||||
| @ApiOperation("审核通过") | @ApiOperation("审核通过") | ||||
| @PostMapping("audiPass") | @PostMapping("audiPass") | ||||
| public ResultData audiPass(@RequestBody WxOfflineActivityRecord wxOfflineActivityRecord) { | public ResultData audiPass(@RequestBody WxOfflineActivityRecord wxOfflineActivityRecord) { | ||||
| if(wxOfflineActivityRecord == null){ | |||||
| return new ResultData(Result.ERROR,"id 不能为空"); | |||||
| } | |||||
| TenantEntity tenantEntity = getTenantInfo(); | TenantEntity tenantEntity = getTenantInfo(); | ||||
| wxOfflineActivityRecord.updateTenantInfo(tenantEntity); | wxOfflineActivityRecord.updateTenantInfo(tenantEntity); | ||||
| wxOfflineActivityRecord.setAuditStatus(EnumOfflineActivityRecordStatus.AUDI_SUCCESS.getCode()); | wxOfflineActivityRecord.setAuditStatus(EnumOfflineActivityRecordStatus.AUDI_SUCCESS.getCode()); | ||||
| @@ -86,7 +89,9 @@ public class WxOfflineActivityRecordController extends BaseController { | |||||
| @ApiOperation("审核驳回") | @ApiOperation("审核驳回") | ||||
| @PostMapping("audtFail") | @PostMapping("audtFail") | ||||
| public ResultData audtFail(@RequestBody WxOfflineActivityRecord wxOfflineActivityRecord) { | public ResultData audtFail(@RequestBody WxOfflineActivityRecord wxOfflineActivityRecord) { | ||||
| if(wxOfflineActivityRecord == null){ | |||||
| return new ResultData(Result.ERROR,"id 不能为空"); | |||||
| } | |||||
| if(StringUtil.isBlank(wxOfflineActivityRecord.getAuditRemark())){ | if(StringUtil.isBlank(wxOfflineActivityRecord.getAuditRemark())){ | ||||
| return new ResultData(Result.ERROR,"驳回意见不能为空"); | return new ResultData(Result.ERROR,"驳回意见不能为空"); | ||||
| } | } | ||||
| @@ -96,6 +101,19 @@ public class WxOfflineActivityRecordController extends BaseController { | |||||
| wxOfflineActivityRecordService.auditRecord(wxOfflineActivityRecord,getUserId()); | wxOfflineActivityRecordService.auditRecord(wxOfflineActivityRecord,getUserId()); | ||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @ApiOperation("失效") | |||||
| @PostMapping("invalid") | |||||
| public ResultData invalid(@RequestBody WxOfflineActivityRecord wxOfflineActivityRecord) { | |||||
| if(wxOfflineActivityRecord == null){ | |||||
| return new ResultData(Result.ERROR,"id 不能为空"); | |||||
| } | |||||
| TenantEntity tenantEntity = getTenantInfo(); | |||||
| wxOfflineActivityRecord.updateTenantInfo(tenantEntity); | |||||
| wxOfflineActivityRecord.setAuditStatus(EnumOfflineActivityRecordStatus.INVALID.getCode()); | |||||
| wxOfflineActivityRecordService.auditRecord(wxOfflineActivityRecord,getUserId()); | |||||
| return new ResultData(); | |||||
| } | |||||
| @ApiOperation("查询详情") | @ApiOperation("查询详情") | ||||
| @GetMapping("getInfoById") | @GetMapping("getInfoById") | ||||
| @@ -165,7 +165,7 @@ public class WxOfflineActivityRecord extends TenantEntity { | |||||
| /** | /** | ||||
| * 审批状态 | * 审批状态 | ||||
| */ | */ | ||||
| @Excel(name = "审核状态", width = 20, orderNum = "9", replace = {"审核中_0", "已审批_1", "已驳回_2", "已发奖_10"}) | |||||
| @Excel(name = "审核状态", width = 20, orderNum = "9", replace = {"审核中_0", "已审批_1", "已驳回_2", "已失效_3", "已发奖_10"}) | |||||
| @TableField(value = "audit_status") | @TableField(value = "audit_status") | ||||
| private Integer auditStatus; | private Integer auditStatus; | ||||
| @@ -9,6 +9,7 @@ public enum EnumOfflineActivityRecordStatus { | |||||
| AUDTING(0, "审核中"), | AUDTING(0, "审核中"), | ||||
| AUDI_SUCCESS(1, "审批通过"), | AUDI_SUCCESS(1, "审批通过"), | ||||
| AUDT_FAIL(2, "审批拒绝"), | AUDT_FAIL(2, "审批拒绝"), | ||||
| INVALID(3, "失效"), | |||||
| IS_GRANT(10, "已发奖"),; | IS_GRANT(10, "已发奖"),; | ||||
| public static EnumOfflineActivityRecordStatus getEnum(Integer code) { | public static EnumOfflineActivityRecordStatus getEnum(Integer code) { | ||||
| @@ -36,4 +36,5 @@ public interface WxOfflineActivityRecordService { | |||||
| void exportData(HttpServletRequest request, HttpServletResponse response, WxOfflineActivityRecord wxOfflineActivityRecord); | void exportData(HttpServletRequest request, HttpServletResponse response, WxOfflineActivityRecord wxOfflineActivityRecord); | ||||
| Integer getWaitAudiCount(TenantEntity tenantInfo); | Integer getWaitAudiCount(TenantEntity tenantInfo); | ||||
| } | } | ||||
| @@ -314,7 +314,7 @@ public class WxOfflineActivityGrantAwardServiceImpl implements WxOfflineActivity | |||||
| List<String> anniversaryLotteryNumList = new ArrayList<>(); | List<String> anniversaryLotteryNumList = new ArrayList<>(); | ||||
| for (WxOfflineActivityRecord record : wxOfflineActivityRecords) { | for (WxOfflineActivityRecord record : wxOfflineActivityRecords) { | ||||
| if(!EnumOfflineActivityRecordStatus.AUDI_SUCCESS.getCode().equals(record.getAuditStatus())){ | if(!EnumOfflineActivityRecordStatus.AUDI_SUCCESS.getCode().equals(record.getAuditStatus())){ | ||||
| throw new MallinkException(Result.ERROR, "请检查活动订单审核状态"); | |||||
| throw new MallinkException(Result.ERROR, "请检查活动订单状态"); | |||||
| } | } | ||||
| if(record.getCreateDate().before(activity.getStartTime()) || record.getCreateDate().after(activity.getEndTime())){ | if(record.getCreateDate().before(activity.getStartTime()) || record.getCreateDate().after(activity.getEndTime())){ | ||||
| throw new MallinkException(Result.ERROR, "请检查活动时间"); | throw new MallinkException(Result.ERROR, "请检查活动时间"); | ||||
| @@ -164,7 +164,7 @@ | |||||
| `audit_by` = #{auditBy}, | `audit_by` = #{auditBy}, | ||||
| </if> | </if> | ||||
| `update_date` = #{updateDate} | `update_date` = #{updateDate} | ||||
| where id=#{id} | |||||
| where id = #{id} | |||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and `tenant_id` = #{tenantId} | and `tenant_id` = #{tenantId} | ||||
| </if> | </if> | ||||