| @@ -57,9 +57,11 @@ public class WxAppinfoController extends BaseController { | |||
| String param = merchant.getWeappScene(); | |||
| ResultData resultData = qrCodeService.exportQrcode(null, null, merchant.getTenantId(), 1, pageUrl, param, 0, "", "", "店铺详情", true); | |||
| Map<String, String> map = (Map) resultData.data; | |||
| String url = map.get("url"); | |||
| merchant.setQrCode(url); | |||
| wxMerchantMapper.updateByPrimaryKeySelective(merchant); | |||
| if(map!=null && map.get("url") !=null) { | |||
| String url = map.get("url"); | |||
| merchant.setQrCode(url); | |||
| wxMerchantMapper.updateByPrimaryKeySelective(merchant); | |||
| } | |||
| } | |||
| }); | |||
| } | |||
| @@ -81,9 +83,11 @@ public class WxAppinfoController extends BaseController { | |||
| String param = couponChannel.getWeappScene(); | |||
| ResultData resultData = qrCodeService.exportQrcode(null,null,couponChannel.getTenantId(),1,pageUrl,param,0,"","","卷",true); | |||
| Map<String,String> map = (Map)resultData.data; | |||
| String url = map.get("url"); | |||
| couponChannel.setQrCode(url); | |||
| wxCouponChannelMapper.updateByPrimaryKeySelective(couponChannel); | |||
| if(map!=null && map.get("url") !=null) { | |||
| String url = map.get("url"); | |||
| couponChannel.setQrCode(url); | |||
| wxCouponChannelMapper.updateByPrimaryKeySelective(couponChannel); | |||
| } | |||
| } | |||
| }); | |||
| } | |||
| @@ -108,9 +108,11 @@ public class WxMerchantController extends BaseController { | |||
| String param = "t:md:"+resultData.data; | |||
| ResultData resultQrCode = qrCodeService.exportQrcode(null,null,wxMerchant.getTenantId(),1,pageUrl,param,0,"","","店铺详情",true); | |||
| Map<String,String> map = (Map)resultQrCode.data; | |||
| String url = map.get("url"); | |||
| wxMerchant.setQrCode(url); | |||
| wxMerchantService.updateMerchant(wxMerchant); | |||
| if(map!=null && map.get("url") !=null) { | |||
| String url = map.get("url"); | |||
| wxMerchant.setQrCode(url); | |||
| wxMerchantService.updateMerchant(wxMerchant); | |||
| } | |||
| } | |||
| return resultData; | |||
| @@ -9,13 +9,20 @@ import com.iformall.controller.app.WxAppinfoController; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.dto.WxCouponChannelDto; | |||
| import com.iformall.domain.po.MallUserInfo; | |||
| import com.iformall.domain.po.WxCoupon; | |||
| import com.iformall.domain.po.WxCouponChannel; | |||
| import com.iformall.domain.po.WxRentContract; | |||
| import com.iformall.domain.vo.WxCouponChannelAddVo; | |||
| import com.iformall.domain.vo.WxCouponChannelVo; | |||
| import com.iformall.enums.EnumCouponChannelStatus; | |||
| import com.iformall.enums.EnumFlowRecordStatus; | |||
| import com.iformall.enums.EnumRentContractAppStatus; | |||
| import com.iformall.enums.EnumRentContractStatus; | |||
| import com.iformall.mapper.WxCouponChannelMapper; | |||
| import com.iformall.service.QrCodeService; | |||
| import com.iformall.service.WxCouponChannelService; | |||
| import com.iformall.service.WxCouponService; | |||
| import com.iformall.service.WxFlowService; | |||
| import io.swagger.annotations.Api; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @@ -45,6 +52,10 @@ public class WxCouponChannelController extends BaseController { | |||
| private WxCouponChannelMapper wxCouponChannelMapper; | |||
| @Autowired | |||
| private QrCodeService qrCodeService; | |||
| @Autowired | |||
| private WxFlowService wxFlowService; | |||
| @Autowired | |||
| private WxCouponService wxCouponService; | |||
| @ApiOperation("分页列表接口") | |||
| @GetMapping("list") | |||
| @@ -80,9 +91,11 @@ public class WxCouponChannelController extends BaseController { | |||
| String param = couponChannel.getWeappScene(); | |||
| ResultData resultDataQ = qrCodeService.exportQrcode(null,null,couponChannel.getTenantId(),1,pageUrl,param,0,"","","卷",true); | |||
| Map<String,String> map = (Map)resultDataQ.data; | |||
| String url = map.get("url"); | |||
| couponChannel.setQrCode(url); | |||
| wxCouponChannelMapper.updateByPrimaryKeySelective(couponChannel); | |||
| if(map!=null && map.get("url") !=null) { | |||
| String url = map.get("url"); | |||
| couponChannel.setQrCode(url); | |||
| wxCouponChannelMapper.updateByPrimaryKeySelective(couponChannel); | |||
| } | |||
| } | |||
| return resultData; | |||
| } | |||
| @@ -113,30 +126,28 @@ public class WxCouponChannelController extends BaseController { | |||
| logger.debug("[" + getIpAddr() + "] WxCouponChannelController::addbatch"); | |||
| String[] ids = wxCouponChannelDto.getCouponIds().split(","); | |||
| String[] channelId = wxCouponChannelDto.getChannelId().split(","); | |||
| ResultData resultData = wxCouponChannelService.addBatch(ids, channelId, getTenantId(), wxCouponChannelDto.getBeginTime(), wxCouponChannelDto.getEndTime()); | |||
| List<WxCouponChannelAddVo> list = (List<WxCouponChannelAddVo>)resultData.data; | |||
| //生成二维码 | |||
| if(CollectionUtils.isNotEmpty(list)){ | |||
| String pageUrl = "pages/index/index"; | |||
| for (WxCouponChannelAddVo vo:list) { | |||
| WxCouponChannel couponChannel = new WxCouponChannel(); | |||
| couponChannel.setId(vo.getId()); | |||
| couponChannel.setType(vo.getType()); | |||
| String param = couponChannel.getWeappScene(); | |||
| ResultData resultDataQ = qrCodeService.exportQrcode(null,null,couponChannel.getTenantId(),1,pageUrl,param,0,"","","卷",true); | |||
| Map<String,String> map = (Map)resultDataQ.data; | |||
| String url = map.get("url"); | |||
| couponChannel.setQrCode(url); | |||
| wxCouponChannelMapper.updateByPrimaryKeySelective(couponChannel); | |||
| if (org.springframework.util.CollectionUtils.isEmpty(wxCouponChannelDto.getFlowParams())) { | |||
| ResultData resultData = wxCouponChannelService.addBatch(ids, channelId, getTenantId(), wxCouponChannelDto.getBeginTime(), wxCouponChannelDto.getEndTime()); | |||
| return resultData; | |||
| }else{ | |||
| //走审批 | |||
| wxCouponChannelDto.getFlowParams().put("ids",wxCouponChannelDto.getCouponIds()); | |||
| wxCouponChannelDto.getFlowParams().put("channelId",wxCouponChannelDto.getChannelId()); | |||
| wxCouponChannelDto.getFlowParams().put("tenantId",getTenantId()); | |||
| wxCouponChannelDto.getFlowParams().put("beginTime",wxCouponChannelDto.getBeginTime()); | |||
| wxCouponChannelDto.getFlowParams().put("endTime",wxCouponChannelDto.getEndTime()); | |||
| wxFlowService.start(wxCouponChannelDto.getFlowParams(), getUserId(), getUser().getName(), getTenantId()); | |||
| //修改coupon applyStatus状态为审核中 | |||
| for (String id:ids) { | |||
| WxCoupon wxCoupon = new WxCoupon(); | |||
| wxCoupon.setId(Long.parseLong(id)); | |||
| wxCoupon.setPutApplyStatus(EnumRentContractAppStatus.APPLYING.getCode()); | |||
| wxCouponService.update(wxCoupon); | |||
| } | |||
| resultData.data = null; | |||
| } | |||
| return resultData; | |||
| return new ResultData(); | |||
| } | |||
| @ApiOperation("根据id查询接口") | |||
| @@ -9,12 +9,10 @@ import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.WxCoupon; | |||
| import com.iformall.domain.po.WxCouponChannel; | |||
| import com.iformall.domain.vo.WxCouponStatisVo; | |||
| import com.iformall.enums.EnumCouponChannelStatus; | |||
| import com.iformall.enums.EnumCouponType; | |||
| import com.iformall.enums.EnumCouponValidType; | |||
| import com.iformall.enums.EnumDelFlag; | |||
| import com.iformall.enums.*; | |||
| import com.iformall.mapper.WxCouponChannelMapper; | |||
| import com.iformall.service.WxCouponService; | |||
| import com.iformall.service.WxFlowService; | |||
| import com.iformall.utils.DateUtils; | |||
| import io.swagger.annotations.Api; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| @@ -38,6 +36,8 @@ public class WxCouponController extends BaseController { | |||
| private WxCouponService wxCouponService; | |||
| @Autowired | |||
| private WxCouponChannelMapper wxCouponChannelMapper; | |||
| @Autowired | |||
| private WxFlowService wxFlowService; | |||
| @ApiOperation("分页列表接口") | |||
| @GetMapping("list") | |||
| @@ -74,7 +74,6 @@ public class WxCouponController extends BaseController { | |||
| return wxCouponService.list(wxCoupon, pageNum, pageSize); //全列表 | |||
| } | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "券投放-新增") | |||
| @@ -100,8 +99,15 @@ public class WxCouponController extends BaseController { | |||
| return new ResultData(ResultData.ERROR, "有活动正在上架,请先下架。"); | |||
| } | |||
| } | |||
| wxCoupon.setTenantId(getTenantId()); | |||
| //作废走审批 | |||
| if (EnumCouponStatus.COUPON_STATUS_TAKE_OFFF.getCode().equals(wxCoupon.getStatus())) { | |||
| if (wxCoupon.getFlowParams() != null && wxCoupon.getFlowParams().size() > 0) { | |||
| wxFlowService.start(wxCoupon.getFlowParams(), getUserId(), getUser().getName(), getTenantId()); | |||
| return new ResultData(); | |||
| } | |||
| } | |||
| return wxCouponService.saveOrUpdate(wxCoupon); | |||
| } | |||
| @@ -147,7 +153,21 @@ public class WxCouponController extends BaseController { | |||
| return new ResultData(ErrorCode.COUPON_STOCK_DATE_NO_CAR); | |||
| } | |||
| wxCoupon.setTenantId(getTenantId()); | |||
| return wxCouponService.updateCouponStockAndEndTime(wxCoupon); | |||
| 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()); | |||
| wxFlowService.start(wxCoupon.getFlowParams(), getUserId(), getUser().getName(), getTenantId()); | |||
| }else{ | |||
| return wxCouponService.updateCouponStockAndEndTime(wxCoupon); | |||
| } | |||
| return new ResultData(); | |||
| } | |||
| @ApiOperation("根据id删除接口") | |||
| @@ -2,8 +2,10 @@ package com.iformall.domain.dto; | |||
| import lombok.Data; | |||
| import javax.persistence.Transient; | |||
| import java.io.Serializable; | |||
| import java.util.Date; | |||
| import java.util.Map; | |||
| @Data | |||
| @@ -14,4 +16,9 @@ public class WxCouponChannelDto implements Serializable { | |||
| private String channelId; | |||
| private Date beginTime; | |||
| private Date endTime; | |||
| @Transient | |||
| @io.swagger.annotations.ApiModelProperty(value = "审批流参数", name = "flowParams") | |||
| private Map<String, Object> flowParams; | |||
| } | |||
| @@ -13,6 +13,7 @@ import javax.persistence.Transient; | |||
| import java.math.BigDecimal; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| @Table(name = "wx_coupon") | |||
| @Data | |||
| @@ -171,6 +172,13 @@ public class WxCoupon extends BaseEntity { | |||
| //营销分析 | |||
| private WxCouponStatisVo wxCouponStatisVo; | |||
| @io.swagger.annotations.ApiModelProperty(value="投放审批状态",name="putApplyStatus") | |||
| private Integer putApplyStatus; | |||
| @io.swagger.annotations.ApiModelProperty(value="库存审批状态",name="stockApplyStatus") | |||
| private Integer stockApplyStatus; | |||
| @io.swagger.annotations.ApiModelProperty(value="作废审批状态",name="cancleApplyStatus") | |||
| private Integer cancleApplyStatus; | |||
| @Transient | |||
| @SortColumn(column = "press_count") | |||
| private Integer pressSendCount; | |||
| @@ -198,6 +206,10 @@ public class WxCoupon extends BaseEntity { | |||
| @Transient | |||
| private Integer pressSuccCount; | |||
| @Transient | |||
| @io.swagger.annotations.ApiModelProperty(value = "审批流参数", name = "flowParams") | |||
| private Map<String, Object> flowParams; | |||
| @io.swagger.annotations.ApiModelProperty(value = "是否删除1是0否", name = "isDel") | |||
| private Integer isDel; | |||
| @@ -61,6 +61,8 @@ public enum EnumChart { | |||
| INDEX_SALE_DATA(52, "营销数据"), | |||
| RENT_RATE_HISTORY(53, "商铺出租率走势"), | |||
| BUSINESS(54,"业态分析"), | |||
| ; | |||
| public static EnumChart getEnum(Integer code) { | |||
| @@ -0,0 +1,37 @@ | |||
| package com.iformall.enums; | |||
| /** | |||
| * Created by luozukai | |||
| */ | |||
| public enum EnumCouponAppType { | |||
| PUT(1, "投放"), | |||
| STOCK(2, "库存"), | |||
| CANCLE(3, "作废"), | |||
| ; | |||
| public static EnumCouponAppType getEnum(Integer code) { | |||
| for (EnumCouponAppType value : values()) { | |||
| if (value.getCode().equals(code)) { | |||
| return value; | |||
| } | |||
| } | |||
| return null; | |||
| } | |||
| private Integer code; | |||
| private String message; | |||
| EnumCouponAppType(Integer code, String message) { | |||
| this.code = code; | |||
| this.message = message; | |||
| } | |||
| public Integer getCode() { | |||
| return code; | |||
| } | |||
| public String getMessage() { | |||
| return message; | |||
| } | |||
| } | |||
| @@ -61,7 +61,12 @@ public interface WxCouponService { | |||
| * @param record | |||
| */ | |||
| ResultData saveOrUpdate(WxCoupon record); | |||
| /** | |||
| * 更新实体 | |||
| * | |||
| * @param record | |||
| */ | |||
| void update(WxCoupon record); | |||
| /** | |||
| * 根据Id删除实体 | |||
| * | |||
| @@ -276,9 +276,11 @@ public class WxCampaignServiceImpl implements WxCampaignService { | |||
| String param = couponChannel.getWeappScene(); | |||
| ResultData resultDataQ = qrCodeService.exportQrcode(null,null,couponChannel.getTenantId(),1,pageUrl,param,0,"","","卷",true); | |||
| Map<String,String> map = (Map)resultDataQ.data; | |||
| String url = map.get("url"); | |||
| couponChannel.setQrCode(url); | |||
| wxCouponChannelMapper.updateByPrimaryKeySelective(couponChannel); | |||
| if(map!=null && map.get("url") !=null) { | |||
| String url = map.get("url"); | |||
| couponChannel.setQrCode(url); | |||
| wxCouponChannelMapper.updateByPrimaryKeySelective(couponChannel); | |||
| } | |||
| } | |||
| } | |||
| @@ -312,6 +312,11 @@ public class WxChartServiceImpl implements WxChartDataService { | |||
| return getRentRateHistory(tenantId,paramsMap); | |||
| } | |||
| //业务分析 | |||
| if (chart.equals(EnumChart.BUSINESS.getCode())) { | |||
| return getRentRateHistory(tenantId,paramsMap); | |||
| } | |||
| return new ResultData(ErrorCode.REPORT_TYPE_UNKNOWN); | |||
| } | |||
| @@ -339,7 +344,7 @@ public class WxChartServiceImpl implements WxChartDataService { | |||
| List<String> days = DateUtils.getTjTimeList(startTime, endTime, 1==dateType.intValue()?"0":"1"); | |||
| Map<String,Long> map = getMap(days); | |||
| for (Map<String,Object> m : mapList) { | |||
| map.put((String)m.get("xTime"),(Long)m.get("xCount")); | |||
| map.put((String)m.get( "xTime"),(Long)m.get("xCount")); | |||
| } | |||
| double all = allList.size(); | |||
| @@ -16,10 +16,8 @@ import com.iformall.enums.*; | |||
| import com.iformall.mapper.WxCouponChannelMapper; | |||
| import com.iformall.mapper.WxCouponMerchantMapper; | |||
| import com.iformall.mapper.WxMerchantMapper; | |||
| import com.iformall.service.WxCouponChannelService; | |||
| import com.iformall.service.WxCouponService; | |||
| import com.iformall.service.WxOrderService; | |||
| import com.iformall.service.WxScreenAdService; | |||
| import com.iformall.service.*; | |||
| import org.checkerframework.checker.units.qual.A; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| @@ -43,6 +41,8 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { | |||
| WxScreenAdService wxScreenAdService; | |||
| @Autowired | |||
| WxOrderService wxOrderService; | |||
| @Autowired | |||
| QrCodeService qrCodeService; | |||
| /** | |||
| * B端业务端 | |||
| @@ -235,6 +235,19 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { | |||
| vo.setId(channel.getId()); | |||
| vo.setType(channel.getType()); | |||
| vo.setSuc(true); | |||
| String pageUrl = "pages/index/index"; | |||
| WxCouponChannel couponChannel = new WxCouponChannel(); | |||
| couponChannel.setId(vo.getId()); | |||
| couponChannel.setType(vo.getType()); | |||
| String param = couponChannel.getWeappScene(); | |||
| ResultData resultDataQ = qrCodeService.exportQrcode(null,null,couponChannel.getTenantId(),1,pageUrl,param,0,"","","卷",true); | |||
| Map<String,String> map = (Map)resultDataQ.data; | |||
| if(map!=null && map.get("url") !=null) { | |||
| String url = map.get("url"); | |||
| couponChannel.setQrCode(url); | |||
| wxCouponChannelMapper.updateByPrimaryKeySelective(couponChannel); | |||
| } | |||
| return vo; | |||
| } | |||
| @@ -576,4 +576,8 @@ public class WxCouponServiceImpl implements WxCouponService { | |||
| return new ResultData(); | |||
| } | |||
| @Override | |||
| public void update(WxCoupon record) { | |||
| wxCouponMapper.updateByPrimaryKeySelective(record); | |||
| } | |||
| } | |||
| @@ -14,10 +14,7 @@ import com.iformall.domain.vo.FlowUserVo; | |||
| import com.iformall.domain.vo.UserTaskVo; | |||
| import com.iformall.domain.vo.WxBillAll; | |||
| import com.iformall.enums.*; | |||
| import com.iformall.mapper.WxFlowConfigMapper; | |||
| import com.iformall.mapper.WxFlowModelMapper; | |||
| import com.iformall.mapper.WxFlowRecordMapper; | |||
| import com.iformall.mapper.WxPropertyContractMapper; | |||
| import com.iformall.mapper.*; | |||
| import com.iformall.mq.MqBaseProducer; | |||
| import com.iformall.service.*; | |||
| import com.iformall.utils.Constant; | |||
| @@ -84,6 +81,12 @@ public class WxFlowServiceImpl implements WxFlowService { | |||
| private WxFlowConfigMapper wxFlowConfigMapper; | |||
| @Autowired | |||
| private WxBillAllService wxBillAllService; | |||
| @Autowired | |||
| private WxCouponMapper wxCouponMapper; | |||
| @Autowired | |||
| private WxCouponService wxCouponService; | |||
| @Autowired | |||
| private WxCouponChannelService wxCouponChannelService; | |||
| /** | |||
| * 获取流程key | |||
| @@ -114,6 +117,7 @@ public class WxFlowServiceImpl implements WxFlowService { | |||
| Boolean supplement = (Boolean)mapInfo.get("supplement"); | |||
| Integer contractType = 0; | |||
| String str = (String)getVariableByKey(variables,"contractType"); | |||
| Integer operateType = (Integer)getVariableByKey(variables,"operateType"); | |||
| if(StringUtils.isNotBlank(str)){ | |||
| contractType = Integer.parseInt(str); | |||
| } | |||
| @@ -190,6 +194,60 @@ public class WxFlowServiceImpl implements WxFlowService { | |||
| wxBillAll.setNewPrice(newPrice); | |||
| wxBillAllService.updateReceivePay(wxBillAll, user); | |||
| } | |||
| } else if (EnumFlowKey.NEW_COUPON_UPLINE.getCode().equals(flowType) | |||
| || EnumFlowKey.NEW_CARD_UPLINE.getCode().equals(flowType) | |||
| || EnumFlowKey.NEW_GROUP_UPLINE.getCode().equals(flowType) | |||
| || EnumFlowKey.NEW_PRESS_UPLINE.getCode().equals(flowType)) { | |||
| WxCoupon wxCoupon = new WxCoupon(); | |||
| wxCoupon.setId(businessId); | |||
| wxCoupon.setUpdateDate(new Date()); | |||
| if(EnumCouponAppType.PUT.getCode().equals(operateType)){ | |||
| wxCoupon.setPutApplyStatus(applyStatus); | |||
| String idsV = (String)getVariableByKey(variables,"ids"); | |||
| String channelIdV = (String)getVariableByKey(variables,"channelId"); | |||
| String[] ids = idsV.split(","); | |||
| String[] channelId = channelIdV.split(","); | |||
| Date beginTime = (Date)getVariableByKey(variables,"beginTime"); | |||
| Date endTime = (Date)getVariableByKey(variables,"endTime"); | |||
| String tenantId = (String)getVariableByKey(variables,"tenantId"); | |||
| wxCouponChannelService.addBatch(ids, channelId, tenantId, beginTime,endTime); | |||
| }else if(EnumCouponAppType.STOCK.getCode().equals(operateType)){ | |||
| wxCoupon.setStockApplyStatus(applyStatus); | |||
| if(EnumRentContractAppStatus.FINISH.getCode().intValue() == applyStatus.intValue() | |||
| ||EnumFlowKey.NEW_CARD_UPLINE.getCode().equals(flowType)) { | |||
| //减库存 | |||
| if(EnumFlowKey.NEW_COUPON_UPLINE.getCode().equals(flowType)) { | |||
| Integer inventory = (Integer) getVariableByKey(variables, "inventory"); | |||
| Integer remainInventory = (Integer) getVariableByKey(variables, "remainInventory"); | |||
| Integer type = (Integer) getVariableByKey(variables, "type"); | |||
| String validDays = (String) getVariableByKey(variables, "validDays"); | |||
| Integer validType = (Integer) getVariableByKey(variables, "validType"); | |||
| wxCoupon.setInventory(inventory); | |||
| wxCoupon.setRemainInventory(remainInventory); | |||
| wxCoupon.setType(type); | |||
| wxCoupon.setValidDays(Integer.parseInt(validDays)); | |||
| wxCoupon.setValidType(validType); | |||
| wxCouponService.updateCouponStockAndEndTime(wxCoupon); | |||
| }else if(EnumFlowKey.NEW_GROUP_UPLINE.getCode().equals(flowType)){ | |||
| Integer remainInventory = (Integer) getVariableByKey(variables, "remainInventory"); | |||
| wxCoupon.setRemainInventory(remainInventory); | |||
| wxCouponMapper.updateByPrimaryKeySelective(wxCoupon); | |||
| }else if(EnumFlowKey.NEW_PRESS_UPLINE.getCode().equals(flowType)){ | |||
| Integer inventory = (Integer) getVariableByKey(variables, "inventory"); | |||
| wxCoupon.setInventory(inventory); | |||
| wxCouponMapper.updateByPrimaryKeySelective(wxCoupon); | |||
| } | |||
| } | |||
| }else if(EnumCouponAppType.CANCLE.getCode().equals(operateType)){ | |||
| wxCoupon.setCancleApplyStatus(applyStatus); | |||
| if(EnumRentContractAppStatus.FINISH.getCode().intValue() == applyStatus.intValue()) { | |||
| //作废 | |||
| wxCoupon.setStatus(EnumCouponStatus.COUPON_STATUS_TAKE_OFFF.getCode()); | |||
| } | |||
| } | |||
| wxCouponMapper.updateByPrimaryKeySelective(wxCoupon); | |||
| } | |||
| } | |||
| @@ -255,6 +313,7 @@ public class WxFlowServiceImpl implements WxFlowService { | |||
| map.put("supplement",supplement); | |||
| map.put("taskAssignee",flowModel.getFlow()); | |||
| setSignAssignee(map,flowModel.getFlow()); | |||
| map.put("tenantId",tenantId); | |||
| ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(flowModel.getFlowId(), map); | |||
| logger.debug("流程启动,流程id:{}",processInstance.getId()); | |||
| @@ -313,9 +313,11 @@ public class WxGameServiceImpl implements WxGameService { | |||
| String param = couponChannel.getWeappScene(); | |||
| ResultData resultDataQ = qrCodeService.exportQrcode(null,null,couponChannel.getTenantId(),1,pageUrl,param,0,"","","卷",true); | |||
| Map<String,String> map = (Map)resultDataQ.data; | |||
| String url = map.get("url"); | |||
| couponChannel.setQrCode(url); | |||
| wxCouponChannelMapper.updateByPrimaryKeySelective(couponChannel); | |||
| if(map!=null && map.get("url") !=null) { | |||
| String url = map.get("url"); | |||
| couponChannel.setQrCode(url); | |||
| wxCouponChannelMapper.updateByPrimaryKeySelective(couponChannel); | |||
| } | |||
| } | |||
| } | |||
| @@ -141,9 +141,11 @@ public class WxTopicServiceImpl implements WxTopicService { | |||
| String param = couponChannel.getWeappScene(); | |||
| ResultData resultDataQ = qrCodeService.exportQrcode(null,null,couponChannel.getTenantId(),1,pageUrl,param,0,"","","卷",true); | |||
| Map<String,String> map = (Map)resultDataQ.data; | |||
| String url = map.get("url"); | |||
| couponChannel.setQrCode(url); | |||
| wxCouponChannelMapper.updateByPrimaryKeySelective(couponChannel); | |||
| if(map!=null && map.get("url") !=null) { | |||
| String url = map.get("url"); | |||
| couponChannel.setQrCode(url); | |||
| wxCouponChannelMapper.updateByPrimaryKeySelective(couponChannel); | |||
| } | |||
| } | |||
| } | |||
| @@ -38,6 +38,9 @@ | |||
| <result column="credit_price" jdbcType="INTEGER" property="creditPrice"/> | |||
| <result column="credit_refund" jdbcType="INTEGER" property="creditRefund"/> | |||
| <result column="is_del" property="isDel"/> | |||
| <result column="put_apply_status" property="putApplyStatus"/> | |||
| <result column="stock_apply_status" property="stockApplyStatus"/> | |||
| <result column="cancle_apply_status" property="cancleApplyStatus"/> | |||
| <result column="conditions" jdbcType="VARCHAR" property="conditions"/> | |||
| </resultMap> | |||
| @@ -92,6 +95,7 @@ | |||
| `id`,`tenant_id`,`type`,`cover_img`,`cover_picture`,`detail_picture`,`title`,`sub_title`,`sale_price`,`use_price`,`use_limit_quantity`,`send_type`, | |||
| `valid_type`,`valid_start_date`,`valid_end_date`,`valid_days`,`detail`,`price`,`unit`,`remain_inventory`,`inventory`, | |||
| `remark`,`status`,`create_date`,`update_date`,`business`,`sub_business`,`support_transfer`,`subsidy_num`,`subsidy_type`, | |||
| `press_limit_num`, `press_limit_hours`, `auto_refund`,`credit_price`,`credit_refund`,put_apply_status,stock_apply_status,cancle_apply_status | |||
| `press_limit_num`, `press_limit_hours`, `auto_refund`,`credit_price`,`credit_refund`,`conditions` | |||
| </sql> | |||