| @@ -131,7 +131,7 @@ public class WxCouponController extends BaseController { | |||||
| } | } | ||||
| @ApiOperation("根据id更新库存及有效期接口") | @ApiOperation("根据id更新库存及有效期接口") | ||||
| @PostMapping("updateStokeAndValidDate") | |||||
| @PostMapping("updateStokeAndValidDate") | |||||
| @SystemControllerLog(description = "券投放-库存/有效期更新") | @SystemControllerLog(description = "券投放-库存/有效期更新") | ||||
| public ResultData updateStokeAndValidDate(@RequestBody WxCoupon wxCoupon) { | public ResultData updateStokeAndValidDate(@RequestBody WxCoupon wxCoupon) { | ||||
| logger.debug("[" + getIpAddr() + "] WxCouponController::updateStokeAndValidDate"); | logger.debug("[" + getIpAddr() + "] WxCouponController::updateStokeAndValidDate"); | ||||
| @@ -174,12 +174,13 @@ public class WxCouponController extends BaseController { | |||||
| wxCoupon.setTenantId(getTenantId()); | wxCoupon.setTenantId(getTenantId()); | ||||
| if(wxCoupon.getFlowParams() != null && wxCoupon.getFlowParams().size() >0){ | if(wxCoupon.getFlowParams() != null && wxCoupon.getFlowParams().size() >0){ | ||||
| // wxCoupon.getFlowParams().put("inventory",wxCoupon.getInventory()); | |||||
| // wxCoupon.getFlowParams().put("remainInventory",wxCoupon.getRemainInventory()); | |||||
| // wxCoupon.getFlowParams().put("type",wxCoupon.getType()); | |||||
| // wxCoupon.getFlowParams().put("validEndDate",wxCoupon.getValidEndDate()); | |||||
| // wxCoupon.getFlowParams().put("validStartDate",wxCoupon.getValidStartDate()); | |||||
| // wxCoupon.getFlowParams().put("validType",wxCoupon.getValidType()); | |||||
| wxCoupon.getFlowParams().put("businessId",wxCoupon.getId()); | |||||
| wxCoupon.getFlowParams().put("inventory",wxCoupon.getInventory()); | |||||
| wxCoupon.getFlowParams().put("remainInventory",wxCoupon.getRemainInventory()); | |||||
| wxCoupon.getFlowParams().put("type",wxCoupon.getType()); | |||||
| wxCoupon.getFlowParams().put("validEndDate",wxCoupon.getValidEndDate()); | |||||
| wxCoupon.getFlowParams().put("validStartDate",wxCoupon.getValidStartDate()); | |||||
| wxCoupon.getFlowParams().put("validType",wxCoupon.getValidType()); | |||||
| wxFlowService.start(wxCoupon.getFlowParams(), getUserId(), getUser().getName(), getTenantId()); | wxFlowService.start(wxCoupon.getFlowParams(), getUserId(), getUser().getName(), getTenantId()); | ||||
| wxCoupon.setStockApplyStatus(EnumRentContractAppStatus.APPLYING.getCode()); | wxCoupon.setStockApplyStatus(EnumRentContractAppStatus.APPLYING.getCode()); | ||||
| @@ -9,6 +9,8 @@ import com.iformall.domain.po.WxSubBusiness; | |||||
| import com.iformall.service.WxBusinessService; | import com.iformall.service.WxBusinessService; | ||||
| import com.iformall.service.WxSubBusinessService; | import com.iformall.service.WxSubBusinessService; | ||||
| import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||
| import io.swagger.annotations.ApiImplicitParam; | |||||
| import io.swagger.annotations.ApiImplicitParams; | |||||
| import io.swagger.annotations.ApiOperation; | import io.swagger.annotations.ApiOperation; | ||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||
| @@ -88,19 +90,22 @@ public class WxBusinessController extends BaseController { | |||||
| @ApiOperation("贡献率排行") | @ApiOperation("贡献率排行") | ||||
| @GetMapping("devoteList") | @GetMapping("devoteList") | ||||
| @SystemControllerLog(description = "业态分析接口") | @SystemControllerLog(description = "业态分析接口") | ||||
| @ApiImplicitParams({ | |||||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||||
| public ResultData devoteList(@ModelAttribute WxBusiness wxBusiness,Integer pageNum, Integer pageSize) { | public ResultData devoteList(@ModelAttribute WxBusiness wxBusiness,Integer pageNum, Integer pageSize) { | ||||
| logger.debug("[" + getIpAddr() + "] WxBusinessController::devoteList"); | logger.debug("[" + getIpAddr() + "] WxBusinessController::devoteList"); | ||||
| List<Map<String,String>> result = new ArrayList<>(); | List<Map<String,String>> result = new ArrayList<>(); | ||||
| Map<String,String> map = new HashMap<>(); | Map<String,String> map = new HashMap<>(); | ||||
| map.put("merchantName","西贝筱面"); | map.put("merchantName","西贝筱面"); | ||||
| map.put("sale","2323.23");//营业额 | map.put("sale","2323.23");//营业额 | ||||
| map.put("sale","32323.23");//商户销售坪效 | |||||
| map.put("saleRate","32323.23");//商户销售坪效 | |||||
| map.put("devoteRate","1.23");//贡献率 | map.put("devoteRate","1.23");//贡献率 | ||||
| result.add(map); | result.add(map); | ||||
| map = new HashMap<>(); | map = new HashMap<>(); | ||||
| map.put("merchantName","肯德基"); | map.put("merchantName","肯德基"); | ||||
| map.put("sale","2323.23");//营业额 | map.put("sale","2323.23");//营业额 | ||||
| map.put("sale","32323.23");//商户销售坪效 | |||||
| map.put("saleRate","32323.23");//商户销售坪效 | |||||
| map.put("devoteRate","1.23");//贡献率 | map.put("devoteRate","1.23");//贡献率 | ||||
| result.add(map); | result.add(map); | ||||
| PageInfo<Map<String,String>> page = new PageInfo<>(); | PageInfo<Map<String,String>> page = new PageInfo<>(); | ||||
| @@ -229,8 +229,7 @@ public class WxCouponServiceImpl implements WxCouponService { | |||||
| } | } | ||||
| if (flag) { | if (flag) { | ||||
| String message = sb.toString(); | String message = sb.toString(); | ||||
| //todo:测试 | |||||
| // return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "商户:" + message + "还未配置分账账户"); | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "商户:" + message + "还未配置分账账户"); | |||||
| } | } | ||||
| } | } | ||||
| @@ -277,12 +277,22 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| } | } | ||||
| } | } | ||||
| public Integer getBusinessType(Object businessType){ | |||||
| if(businessType == null) return null; | |||||
| if(businessType instanceof String){ | |||||
| return Integer.parseInt((String)businessType); | |||||
| }else if(businessType instanceof Integer){ | |||||
| return (Integer)businessType; | |||||
| } | |||||
| return null; | |||||
| } | |||||
| @Override | @Override | ||||
| @Transactional(propagation = Propagation.REQUIRED,rollbackFor = {Exception.class}) | @Transactional(propagation = Propagation.REQUIRED,rollbackFor = {Exception.class}) | ||||
| public ResultData start(Map<String, Object> params,Long userId,String userName,String tenantId) { | public ResultData start(Map<String, Object> params,Long userId,String userName,String tenantId) { | ||||
| String remark = (String)params.get("remark"); | String remark = (String)params.get("remark"); | ||||
| Long businessId = Long.parseLong(params.get("businessId").toString()); | Long businessId = Long.parseLong(params.get("businessId").toString()); | ||||
| Integer flowType = (Integer)params.get("businessType"); | |||||
| Integer flowType = getBusinessType(params.get("businessType")); | |||||
| List<Map<String,Object>> variables = (List)params.get("variables"); | List<Map<String,Object>> variables = (List)params.get("variables"); | ||||
| Boolean supplement = (Boolean)params.get("supplement"); | Boolean supplement = (Boolean)params.get("supplement"); | ||||