|
|
|
@ -1,6 +1,7 @@ |
|
|
|
|
package com.bweb.controller; |
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
|
import com.bweb.config.SysConst; |
|
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
@ -202,4 +203,31 @@ public class HighDiscountAgentRelController { |
|
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/getDiscountStatus",method = RequestMethod.POST) |
|
|
|
|
@ResponseBody |
|
|
|
|
@ApiOperation(value = "修改状态") |
|
|
|
|
public ResponseData getDiscountStatus(@RequestBody JSONObject jsonObject) { |
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
Integer status = jsonObject.getInteger("status"); |
|
|
|
|
Long minNumber = jsonObject.getLong("minNumber"); |
|
|
|
|
Long maxNumber = jsonObject.getLong("maxNumber"); |
|
|
|
|
|
|
|
|
|
for (Long i = minNumber; i <= maxNumber; i++) { |
|
|
|
|
HighDiscountAgentCode highDiscountAgentCode = highDiscountAgentCodeService.getCodeById(i); |
|
|
|
|
if (highDiscountAgentCode.getStatus() == 1 || highDiscountAgentCode.getStatus() == 4 ) { |
|
|
|
|
highDiscountAgentCode.setStatus(status); |
|
|
|
|
highDiscountAgentCodeService.updateCode(highDiscountAgentCode); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return ResponseMsgUtil.success("成功"); |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("HighDiscountController -> getDiscountCodeById() error!",e); |
|
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|