From 064c53b1f5da55d502340f5aa698bb21c245926f Mon Sep 17 00:00:00 2001 From: gongbiao Date: Fri, 27 Sep 2019 15:02:54 +0800 Subject: [PATCH 01/18] =?UTF-8?q?[=E4=BC=9A=E5=91=98=E7=A7=AF=E5=88=86?= =?UTF-8?q?=E5=BC=80=E5=85=B3][=E4=BF=AE=E6=94=B9][=E4=BC=9A=E5=91=98?= =?UTF-8?q?=E6=9D=83=E7=9B=8A=E5=8F=8A=E6=88=90=E9=95=BF=E5=80=BC=E7=9B=B8?= =?UTF-8?q?=E5=85=B3]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mem/WxScoreHistoryController.java | 23 +++++++ .../controller/WxOrderController.java | 8 ++- .../enums/EnumCUserBasicInfoStatus.java | 35 +++++++++++ .../impl/WxCUserBasicInfoServiceImpl.java | 16 ++--- .../service/impl/WxCouponSendServiceImpl.java | 6 ++ .../service/impl/WxScoreRulesServiceImpl.java | 62 +++++++++++++++---- .../mapper/WxCUserBasicInfoMapper.xml | 6 +- 7 files changed, 131 insertions(+), 25 deletions(-) create mode 100644 mallinkService/src/main/java/com/iformall/enums/EnumCUserBasicInfoStatus.java diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/mem/WxScoreHistoryController.java b/mallinkAdmin/src/main/java/com/iformall/controller/mem/WxScoreHistoryController.java index 17752c865..797eb070c 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/mem/WxScoreHistoryController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/mem/WxScoreHistoryController.java @@ -2,10 +2,14 @@ package com.iformall.controller.mem; import com.github.pagehelper.PageInfo; import com.iformall.annotation.SystemControllerLog; +import com.iformall.common.ErrorCode; import com.iformall.common.Result; import com.iformall.common.ResultData; import com.iformall.controller.base.BaseController; +import com.iformall.domain.po.WxCUserBasicInfo; import com.iformall.domain.po.WxScoreHistory; +import com.iformall.enums.EnumCUserBasicInfoStatus; +import com.iformall.service.WxCUserBasicInfoService; import com.iformall.service.WxScoreHistoryService; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -23,6 +27,10 @@ public class WxScoreHistoryController extends BaseController { @Autowired private WxScoreHistoryService wxScoreHistoryService; + @Autowired + private WxCUserBasicInfoService wxCUserBasicInfoService; + + @ApiOperation("分页列表接口") @GetMapping("list") @ApiImplicitParams({ @@ -43,6 +51,9 @@ public class WxScoreHistoryController extends BaseController { logger.debug("[" + getIpAddr() + "] WxScoreHistoryController::add"); //Assert.notNull(wxScoreHistory.getName(), "角色名不能为空"); //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); + if (checkMemberStatus(wxScoreHistory.getCUserId())) { + return new ResultData(ErrorCode.MEMBER_IS_LOCKED); + } wxScoreHistoryService.saveOrUpdate(wxScoreHistory); return new ResultData(); } @@ -52,10 +63,22 @@ public class WxScoreHistoryController extends BaseController { @SystemControllerLog(description = "成长值-更新") public ResultData update(@RequestBody WxScoreHistory wxScoreHistory) { logger.debug("[" + getIpAddr() + "] WxScoreHistoryController::update"); + if (checkMemberStatus(wxScoreHistory.getCUserId())) { + return new ResultData(ErrorCode.MEMBER_IS_LOCKED); + } wxScoreHistoryService.saveOrUpdate(wxScoreHistory); return new ResultData(); } + public boolean checkMemberStatus(Long userId) { + WxCUserBasicInfo wxCUserBasicInfo = wxCUserBasicInfoService.getById(userId); + if (wxCUserBasicInfo != null && wxCUserBasicInfo.getStatus().equals(EnumCUserBasicInfoStatus.LOCKED.getCode())) { + logger.info("会员权益被锁定:cUserId:" + userId); + return true; + } + return false; + } + @ApiOperation("根据id删除接口") @GetMapping("/del") @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) diff --git a/mallinkCApi/src/main/java/com/iformall/controller/WxOrderController.java b/mallinkCApi/src/main/java/com/iformall/controller/WxOrderController.java index cea078e18..977851b7a 100644 --- a/mallinkCApi/src/main/java/com/iformall/controller/WxOrderController.java +++ b/mallinkCApi/src/main/java/com/iformall/controller/WxOrderController.java @@ -28,8 +28,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.Date; -import java.util.HashMap; -import java.util.List; import java.util.Map; @RestController @@ -66,6 +64,12 @@ public class WxOrderController extends BaseController { if (resultData != null) return resultData; WxCUser user = getUser(); + WxCUserBasicInfo wxCUserBasicInfo = wxCUserBasicInfoService.getById(user.getId()); + if (wxCUserBasicInfo != null && wxCUserBasicInfo.getStatus().equals(EnumCUserBasicInfoStatus.LOCKED.getCode())) { + logger.info("会员权益被锁定:cUserId:" + user.getId()); + return new ResultData(ErrorCode.MEMBER_IS_LOCKED); + } + resultData = couponUserCheck(user, wxCouponChannelService.findDetailVo(orderSaveDto.getCouponChannelId())); if (resultData != null) return resultData; diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumCUserBasicInfoStatus.java b/mallinkService/src/main/java/com/iformall/enums/EnumCUserBasicInfoStatus.java new file mode 100644 index 000000000..40587314f --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/enums/EnumCUserBasicInfoStatus.java @@ -0,0 +1,35 @@ +package com.iformall.enums; + +/** + * Created by Stormeye on 2018/08/09. + */ +public enum EnumCUserBasicInfoStatus { + + NORMAL(0, "正常"), + LOCKED(1, "锁定"),; + + public static EnumCUserBasicInfoStatus getEnum(Integer code) { + for (EnumCUserBasicInfoStatus value : values()) { + if (value.getCode().equals(code)) { + return value; + } + } + return null; + } + + private Integer code; + private String message; + + EnumCUserBasicInfoStatus(Integer code, String message) { + this.code = code; + this.message = message; + } + + public Integer getCode() { + return code; + } + + public String getMessage() { + return message; + } +} diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java index c9f30c7d6..9508757a7 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java @@ -849,13 +849,15 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { Date createDate = oldUserBase.getCreateDate() == null ? new Date() : oldUserBase.getCreateDate(); oldUserBase.setUpdateDate(userBase.getUpdateDate() == null ? updateDate : userBase.getUpdateDate()); oldUserBase.setCreateDate(userBase.getCreateDate() == null ? createDate : userBase.getCreateDate()); - // 成长值 - if(points != null) { - oldUserBase.setPoins(points); - } - // 覆盖原积分 - if(credit != null) { - oldUserBase.setCredit(credit); + if (oldUserBase.getStatus().equals(EnumCUserBasicInfoStatus.NORMAL.getCode())) { + // 成长值 + if (points != null) { + oldUserBase.setPoins(points); + } + // 覆盖原积分 + if (credit != null) { + oldUserBase.setCredit(credit); + } } } else { userBase.setId(idWorker.nextId()); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java index 8a9fbaf4d..bd1efb798 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java @@ -310,6 +310,12 @@ public class WxCouponSendServiceImpl implements WxCouponSendService { return false; } + WxCUserBasicInfo wxCUserBasicInfo = wxCUserBasicInfoMapper.selectById(cUserId); + if (wxCUserBasicInfo != null && wxCUserBasicInfo.getStatus().equals(EnumCUserBasicInfoStatus.LOCKED.getCode())) { + logger.info("会员权益被锁定:cUserId:" + cUserId); + return false; + } + //查询开关是否打开 WxCouponSendConfig wxCouponSendConfig = new WxCouponSendConfig(); wxCouponSendConfig.setSendType(type.getCode()); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxScoreRulesServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxScoreRulesServiceImpl.java index b04daf8fe..3e2fbfa02 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxScoreRulesServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxScoreRulesServiceImpl.java @@ -6,6 +6,7 @@ import com.iformall.common.ErrorCode; import com.iformall.common.IdWorker; import com.iformall.domain.po.*; import com.iformall.enums.EnumBusiness; +import com.iformall.enums.EnumCUserBasicInfoStatus; import com.iformall.enums.EnumScoreRules; import com.iformall.enums.EnumScoreType; import com.iformall.exception.MallinkException; @@ -555,27 +556,42 @@ public class WxScoreRulesServiceImpl implements WxScoreRulesService { @Override public int addScore(EnumScoreType scoreType, Object param) { - + WxCUser wxCUser = null; + WxCUserCar userCar = null; + WxCUserBasicInfo userBasicInfo = null; + Long userId = null; + if (param instanceof WxCUser) { + wxCUser = (WxCUser) param; + userId = wxCUser.getId(); + } + if (param instanceof WxCUserCar) { + userCar = (WxCUserCar) param; + userId = userCar.getCUserId(); + } + if (param instanceof WxCUserBasicInfo) { + userBasicInfo = (WxCUserBasicInfo) param; + userId = userBasicInfo.getId(); + } + WxCUserBasicInfo wxCUserBasicInfo = wxCUserBasicInfoMapper.selectById(userId); + if (wxCUserBasicInfo != null && wxCUserBasicInfo.getStatus().equals(EnumCUserBasicInfoStatus.LOCKED.getCode())) { + logger.info("会员权益被锁定:cUserId:" + userId); + return 0; + } switch (scoreType){ case LOGIN: { - WxCUser user = (WxCUser) param; - return loginAddScore(user); + return loginAddScore(wxCUser); } case BIND_CAR:{ - WxCUserCar userCar = (WxCUserCar) param; return bindCarAddScore(userCar); } case WECHAT_PERSION:{ - WxCUser user = (WxCUser) param; - return personAddScore(user); + return personAddScore(wxCUser); } case WECHAT_PHONE:{ - WxCUser user = (WxCUser) param; - return phoneAddScore(user); + return phoneAddScore(wxCUser); } case COMPLETE_INFO:{ - WxCUserBasicInfo user = (WxCUserBasicInfo) param; - return infoAddScore(user); + return infoAddScore(userBasicInfo); } default: { @@ -587,14 +603,30 @@ public class WxScoreRulesServiceImpl implements WxScoreRulesService { @Override public int addScore2(EnumScoreType scoreType, Object param1, Object param2) { + WxOrder order = null; + WxCUserBasicInfo user = null; + Long userId = null; + if (param1 instanceof WxOrder) { + order = (WxOrder) param1; + userId = order.getCUserId(); + } + if (param1 instanceof WxCUserBasicInfo) { + user = (WxCUserBasicInfo) param1; + userId = user.getId(); + } + + WxCUserBasicInfo wxCUserBasicInfo = wxCUserBasicInfoMapper.selectById(userId); + if (wxCUserBasicInfo != null && wxCUserBasicInfo.getStatus().equals(EnumCUserBasicInfoStatus.LOCKED.getCode())) { + logger.info("会员权益被锁定:cUserId:" + userId); + return 0; + } + switch (scoreType){ case CONSUMPTION: { - WxOrder order = (WxOrder) param1; Integer bussinessId = (Integer) param2; return payAddScore(order, bussinessId); } case MEM_IMPORT: { - WxCUserBasicInfo user = (WxCUserBasicInfo) param1; boolean bHaveCUser = (boolean)(param2); return memResetScore(user, bHaveCUser); } @@ -606,9 +638,13 @@ public class WxScoreRulesServiceImpl implements WxScoreRulesService { @Override public int reduceScore(EnumScoreType scoreType, Object param1, Object param2, Object param3) { + WxCUserBasicInfo user = (WxCUserBasicInfo) param1; + if (user != null && user.getStatus().equals(EnumCUserBasicInfoStatus.LOCKED.getCode())) { + logger.info("会员权益被锁定:cUserId:" + user.getId()); + return 0; + } switch (scoreType){ case MEM_REDUCE: { - WxCUserBasicInfo user = (WxCUserBasicInfo)param1; String reason = (String)param2; Integer scoreNum = (Integer)param3; return memReduceScore(user, reason, scoreNum); diff --git a/mallinkService/src/main/resources/mapper/WxCUserBasicInfoMapper.xml b/mallinkService/src/main/resources/mapper/WxCUserBasicInfoMapper.xml index 66fd7e83f..62c50db9a 100644 --- a/mallinkService/src/main/resources/mapper/WxCUserBasicInfoMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCUserBasicInfoMapper.xml @@ -216,8 +216,8 @@ select from wx_c_user_basic_info cub inner join wx_c_user cu on cu.id = cub.id - - where 1=1 + + where 1=1 and cub.status=0 and cub.poins >= #{levelStartScore} @@ -241,7 +241,7 @@ select from wx_c_user_basic_info cub inner join wx_c_user cu on cu.id = cub.id - where cu.phone is not null + where cub.status = 0 and cu.phone is not null AND DATE_FORMAT(cub.birthdate,'%m-%d') >= #{begin} AND DATE_FORMAT(cub.birthdate,'%m-%d') <= #{end} From 930d356d383baf18282b08c1568cc6507273cf5d Mon Sep 17 00:00:00 2001 From: gongbiao Date: Fri, 27 Sep 2019 15:29:37 +0800 Subject: [PATCH 02/18] =?UTF-8?q?[=E4=BC=9A=E5=91=98=E7=A7=AF=E5=88=86?= =?UTF-8?q?=E5=BC=80=E5=85=B3][=E4=BF=AE=E6=94=B9][=E7=A7=AF=E5=88=86?= =?UTF-8?q?=E5=85=91=E6=8D=A2=E9=99=90=E5=88=B6]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/iformall/controller/WxUserGrantController.java | 1 + .../src/main/java/com/iformall/domain/vo/WxCUserVo.java | 3 +++ 2 files changed, 4 insertions(+) diff --git a/mallinkCApi/src/main/java/com/iformall/controller/WxUserGrantController.java b/mallinkCApi/src/main/java/com/iformall/controller/WxUserGrantController.java index 526a2be4a..381907dd7 100755 --- a/mallinkCApi/src/main/java/com/iformall/controller/WxUserGrantController.java +++ b/mallinkCApi/src/main/java/com/iformall/controller/WxUserGrantController.java @@ -668,6 +668,7 @@ public class WxUserGrantController extends BaseController { userVo.setBirthdate(wxCUserBasicInfo.getBirthdate()); userVo.setSex(wxCUserBasicInfo.getSex()); userVo.setAddress(wxCUserBasicInfo.getAddress()); + userVo.setStatus(wxCUserBasicInfo.getStatus()); } return new ResultData(userVo); diff --git a/mallinkService/src/main/java/com/iformall/domain/vo/WxCUserVo.java b/mallinkService/src/main/java/com/iformall/domain/vo/WxCUserVo.java index 0e168514f..0355736a2 100644 --- a/mallinkService/src/main/java/com/iformall/domain/vo/WxCUserVo.java +++ b/mallinkService/src/main/java/com/iformall/domain/vo/WxCUserVo.java @@ -36,4 +36,7 @@ public class WxCUserVo extends WxCUser { private Integer upgradePercent; @io.swagger.annotations.ApiModelProperty(value="升级分",name="upgradeScore") private Integer upgradeScore; + + @io.swagger.annotations.ApiModelProperty(value = "0正常1锁定", name = "status") + private Integer status; } From 96c707e42c7a263566cc299e76ab44ac014288f5 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Fri, 27 Sep 2019 15:35:57 +0800 Subject: [PATCH 03/18] =?UTF-8?q?[=E5=95=86=E5=9C=BA=E4=BF=A1=E6=81=AF][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9][=E7=AE=80=E4=BB=8B=E5=AD=97=E6=AE=B5sql]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/db/migration/V201909271530__G_MALL.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 mallinkAdmin/src/main/resources/db/migration/V201909271530__G_MALL.sql diff --git a/mallinkAdmin/src/main/resources/db/migration/V201909271530__G_MALL.sql b/mallinkAdmin/src/main/resources/db/migration/V201909271530__G_MALL.sql new file mode 100644 index 000000000..5ff899998 --- /dev/null +++ b/mallinkAdmin/src/main/resources/db/migration/V201909271530__G_MALL.sql @@ -0,0 +1,2 @@ +alter table wx_mall +change column `introduction` `introduction` varchar(1024) DEFAULT '' not null COMMENT '简介'; \ No newline at end of file From 6fbc114825b0046cf656feac2be887342533e64e Mon Sep 17 00:00:00 2001 From: gongbiao Date: Fri, 27 Sep 2019 15:45:01 +0800 Subject: [PATCH 04/18] =?UTF-8?q?[=E9=A6=96=E9=A1=B5=E6=B5=AE=E5=B1=82?= =?UTF-8?q?=E5=B9=BF=E5=91=8A][=E4=BF=AE=E6=94=B9][=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/WxFloatingLayerServiceImpl.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxFloatingLayerServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxFloatingLayerServiceImpl.java index 0161c88fd..ae4e83a1c 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxFloatingLayerServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxFloatingLayerServiceImpl.java @@ -27,16 +27,16 @@ public class WxFloatingLayerServiceImpl implements WxFloatingLayerService { private final Logger logger = LoggerFactory.getLogger(this.getClass()); @Autowired - WxFloatingLayerMapper WxFloatingLayerMapper; + WxFloatingLayerMapper wxFloatingLayerMapper; @Override public PageInfo listAsPage(WxFloatingLayer record, Integer pageIndex, Integer pageSize) { - return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> WxFloatingLayerMapper.findList(record)); + return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxFloatingLayerMapper.findList(record)); } @Override public WxFloatingLayer getById(Long id) { - return WxFloatingLayerMapper.selectById(id); + return wxFloatingLayerMapper.selectById(id); } @Transactional(propagation = Propagation.REQUIRED, rollbackFor = {Exception.class}) @@ -54,10 +54,10 @@ public class WxFloatingLayerServiceImpl implements WxFloatingLayerService { wxFloatingLayer.setId(idWorker.nextId()); wxFloatingLayer.setCreateTime(date); wxFloatingLayer.setUpdateTime(date); - WxFloatingLayerMapper.insert(wxFloatingLayer); + wxFloatingLayerMapper.insert(wxFloatingLayer); } else { wxFloatingLayer.setUpdateTime(date); - WxFloatingLayerMapper.updateById(wxFloatingLayer); + wxFloatingLayerMapper.updateById(wxFloatingLayer); } return new ResultData(Result.SUCCESS, "操作成功"); } From 15eaf43ec8ad17af02905f7953bb12e876e19b26 Mon Sep 17 00:00:00 2001 From: luozukai Date: Fri, 27 Sep 2019 15:46:45 +0800 Subject: [PATCH 05/18] =?UTF-8?q?[=E4=BF=AE=E6=94=B9][=E4=BC=9A=E5=91=98?= =?UTF-8?q?=E6=B6=88=E8=B4=B9][=E6=B7=BB=E5=8A=A0=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E5=8A=9F=E8=83=BD]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/iformall/domain/po/WxMerchant.java | 4 +-- .../domain/vo/WxMerchantTradeDetailVo.java | 2 +- .../service/impl/WxMerchantServiceImpl.java | 6 ++++ .../resources/mapper/WxMerchantMapper.xml | 31 +++++++++++++------ 4 files changed, 31 insertions(+), 12 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java b/mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java index 53c4c3efb..1be08ee07 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java @@ -126,10 +126,10 @@ public class WxMerchant extends BaseEntity { private String talkUserAux; @io.swagger.annotations.ApiModelProperty(value = "开始时间", name = "startTime") - private transient Date starttime; + private Date starttime; @io.swagger.annotations.ApiModelProperty(value = "结束时间", name = "endTime") - private transient Date endtime; + private Date endtime; @io.swagger.annotations.ApiModelProperty(value = "昵称", name = "userName") private transient String userName; diff --git a/mallinkService/src/main/java/com/iformall/domain/vo/WxMerchantTradeDetailVo.java b/mallinkService/src/main/java/com/iformall/domain/vo/WxMerchantTradeDetailVo.java index 522590acc..6bd2af802 100644 --- a/mallinkService/src/main/java/com/iformall/domain/vo/WxMerchantTradeDetailVo.java +++ b/mallinkService/src/main/java/com/iformall/domain/vo/WxMerchantTradeDetailVo.java @@ -40,6 +40,6 @@ public class WxMerchantTradeDetailVo extends BaseEntity { @Excel(name="交易时间",width = 20,orderNum = "7") @io.swagger.annotations.ApiModelProperty(value = "交易时间", name = "tradeDate") - private Date tradeDateStr; + private String tradeDateStr; } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java index cfe9f2610..2b701496e 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java @@ -19,6 +19,9 @@ import com.iformall.exception.MallinkException; import com.iformall.mapper.*; import com.iformall.service.*; import com.iformall.utils.BeanMapping; +import com.iformall.utils.DataUtil; +import com.iformall.utils.DateUtils; +import me.chanjar.weixin.common.util.DataUtils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -749,6 +752,9 @@ public class WxMerchantServiceImpl implements WxMerchantService { @Override public void exportUserTradeList(WxMerchant record,HttpServletRequest request, HttpServletResponse response) { List datalist = wxMerchantMapper.userTradeDetailList(record); + datalist.stream().forEach(e->{ + e.setTradeDateStr(DateUtils.formatDateTime(e.getTradeDate())); + }); excelService.exportExcel(datalist, null, "商户会员消费列表", WxMerchantTradeDetailVo.class, "商户会员消费列表.xlsx", response, false); } diff --git a/mallinkService/src/main/resources/mapper/WxMerchantMapper.xml b/mallinkService/src/main/resources/mapper/WxMerchantMapper.xml index 53dcdb3f9..05425c8c2 100644 --- a/mallinkService/src/main/resources/mapper/WxMerchantMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxMerchantMapper.xml @@ -428,11 +428,13 @@ (select count(*) from wx_coupon_order o left join wx_coupon co on(o.`coupon_id`=co.id) left join wx_coupon_merchant cm on(cm.product_id=co.id) - inner join wx_c_user_basic_info c on(o.c_user_id=c.id) where cm.`merchant_id`=m.id and o.coupon_order_status=1 - + inner join wx_c_user_basic_info c on(o.c_user_id=c.id) + left join wx_merchant_b_user mb on(mb.id=c.id) + where cm.`merchant_id`=m.id and o.coupon_order_status=1 and mb.merchant_id=m.id + and o.create_date >= #{starttime} - + and o.create_date <= #{endtime} ) consumeCount, @@ -440,11 +442,13 @@ (select count(distinct c.id) from wx_coupon_order o left join wx_coupon co on(o.`coupon_id`=co.id) left join wx_coupon_merchant cm on(cm.product_id=co.id) - inner join wx_c_user_basic_info c on(o.c_user_id=c.id) where cm.`merchant_id`=m.id and o.coupon_order_status=1 - + inner join wx_c_user_basic_info c on(o.c_user_id=c.id) + left join wx_merchant_b_user mb on(mb.id=c.id) + where cm.`merchant_id`=m.id and o.coupon_order_status=1 and mb.merchant_id=m.id + and o.create_date >= #{starttime} - + and o.create_date <= #{endtime} ) consumeCountP, @@ -452,13 +456,16 @@ IFNULL((select sum(co.price) from wx_coupon_order o left join wx_coupon co on(o.`coupon_id`=co.id) left join wx_coupon_merchant cm on(cm.product_id=co.id) - inner join wx_c_user_basic_info c on(o.c_user_id=c.id) where cm.`merchant_id`=m.id and o.coupon_order_status=1 - + inner join wx_c_user_basic_info c on(o.c_user_id=c.id) + left join wx_merchant_b_user mb on(mb.id=c.id) + where cm.`merchant_id`=m.id and o.coupon_order_status=1 and mb.merchant_id=m.id + and o.create_date >= #{starttime} - + and o.create_date <= #{endtime} + ),0) tradeAmt from wx_merchant m where 1=1 @@ -494,6 +501,12 @@ and co.`title` like concat('%', #{couponName},'%') + + and o.create_date >= #{starttime} + + + and o.create_date <= #{endtime} + order by o.create_date desc From 4fbcf5f09dd4a1f1ab529a823b4cee006d2ab8dc Mon Sep 17 00:00:00 2001 From: luozukai Date: Fri, 27 Sep 2019 15:48:00 +0800 Subject: [PATCH 06/18] =?UTF-8?q?[=E4=BF=AE=E6=94=B9][=E4=BC=9A=E5=91=98?= =?UTF-8?q?=E6=B6=88=E8=B4=B9][=E6=B7=BB=E5=8A=A0=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E5=8A=9F=E8=83=BD]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/WxMerchantMapper.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mallinkService/src/main/resources/mapper/WxMerchantMapper.xml b/mallinkService/src/main/resources/mapper/WxMerchantMapper.xml index 05425c8c2..7a5b001cc 100644 --- a/mallinkService/src/main/resources/mapper/WxMerchantMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxMerchantMapper.xml @@ -429,7 +429,7 @@ left join wx_coupon co on(o.`coupon_id`=co.id) left join wx_coupon_merchant cm on(cm.product_id=co.id) inner join wx_c_user_basic_info c on(o.c_user_id=c.id) - left join wx_merchant_b_user mb on(mb.id=c.id) + inner join wx_merchant_b_user mb on(mb.id=c.id) where cm.`merchant_id`=m.id and o.coupon_order_status=1 and mb.merchant_id=m.id and o.create_date >= #{starttime} @@ -443,7 +443,7 @@ left join wx_coupon co on(o.`coupon_id`=co.id) left join wx_coupon_merchant cm on(cm.product_id=co.id) inner join wx_c_user_basic_info c on(o.c_user_id=c.id) - left join wx_merchant_b_user mb on(mb.id=c.id) + inner join wx_merchant_b_user mb on(mb.id=c.id) where cm.`merchant_id`=m.id and o.coupon_order_status=1 and mb.merchant_id=m.id and o.create_date >= #{starttime} @@ -457,7 +457,7 @@ left join wx_coupon co on(o.`coupon_id`=co.id) left join wx_coupon_merchant cm on(cm.product_id=co.id) inner join wx_c_user_basic_info c on(o.c_user_id=c.id) - left join wx_merchant_b_user mb on(mb.id=c.id) + inner join wx_merchant_b_user mb on(mb.id=c.id) where cm.`merchant_id`=m.id and o.coupon_order_status=1 and mb.merchant_id=m.id and o.create_date >= #{starttime} From f156a6d372fa7963fd80e6e176fccdaa9d0e9876 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Fri, 27 Sep 2019 15:50:09 +0800 Subject: [PATCH 07/18] =?UTF-8?q?[=E9=A6=96=E9=A1=B5=E6=B5=AE=E5=B1=82?= =?UTF-8?q?=E5=B9=BF=E5=91=8A][=E4=BF=AE=E6=94=B9][=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=89=8D=E4=B8=80=E5=A4=A9=E5=BC=B9=E5=87=BA?= =?UTF-8?q?=E8=AE=B0=E5=BD=95]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/iformall/schedule/FloatingLayerSchedule.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mallinkSchedule/src/main/java/com/iformall/schedule/FloatingLayerSchedule.java b/mallinkSchedule/src/main/java/com/iformall/schedule/FloatingLayerSchedule.java index 31d56eed7..7a94396b7 100644 --- a/mallinkSchedule/src/main/java/com/iformall/schedule/FloatingLayerSchedule.java +++ b/mallinkSchedule/src/main/java/com/iformall/schedule/FloatingLayerSchedule.java @@ -1,6 +1,6 @@ package com.iformall.schedule; -import com.iformall.mapper.WxFloatingLayerMapper; +import com.iformall.mapper.WxCuserFloatingLayerMapper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -16,7 +16,7 @@ public class FloatingLayerSchedule { private final Logger logger = LoggerFactory.getLogger(this.getClass()); @Autowired - private WxFloatingLayerMapper wxFloatingLayerMapper; + private WxCuserFloatingLayerMapper wxCuserFloatingLayerMapper; /** @@ -25,7 +25,7 @@ public class FloatingLayerSchedule { @Scheduled(cron = "0 48 10 * * ?") public void sendMsg() { logger.info("删除前一天浮层用户数据开始"); - wxFloatingLayerMapper.delete(null); + wxCuserFloatingLayerMapper.delete(null); logger.info("删除前一天浮层用户数据结束"); } From 10beb6bc34773d6d49f7a7c8543170b73468e4b8 Mon Sep 17 00:00:00 2001 From: luozukai Date: Fri, 27 Sep 2019 16:20:56 +0800 Subject: [PATCH 08/18] =?UTF-8?q?[=E4=BF=AE=E6=94=B9][=E4=BC=9A=E5=91=98?= =?UTF-8?q?=E6=B6=88=E8=B4=B9][=E4=BF=AE=E5=A4=8Dbug]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/iformall/domain/vo/UserTradeRecordVo.java | 2 +- .../domain/vo/WxMerchantTradeDetailVo.java | 15 ++++++++++++--- .../service/impl/WxMerchantServiceImpl.java | 12 +++++++++++- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/domain/vo/UserTradeRecordVo.java b/mallinkService/src/main/java/com/iformall/domain/vo/UserTradeRecordVo.java index c23014fbc..76c7541c2 100644 --- a/mallinkService/src/main/java/com/iformall/domain/vo/UserTradeRecordVo.java +++ b/mallinkService/src/main/java/com/iformall/domain/vo/UserTradeRecordVo.java @@ -17,7 +17,7 @@ public class UserTradeRecordVo implements Serializable{ private String sale; @Excel(name="面额",width = 20,orderNum = "3") private String price; - @Excel(name="卷状态",width = 20,orderNum = "4") + @Excel(name="券状态",width = 20,orderNum = "4") private String status; @Excel(name="交易时间",width = 20,orderNum = "5") private String tradeTime; diff --git a/mallinkService/src/main/java/com/iformall/domain/vo/WxMerchantTradeDetailVo.java b/mallinkService/src/main/java/com/iformall/domain/vo/WxMerchantTradeDetailVo.java index 6bd2af802..23a95d95c 100644 --- a/mallinkService/src/main/java/com/iformall/domain/vo/WxMerchantTradeDetailVo.java +++ b/mallinkService/src/main/java/com/iformall/domain/vo/WxMerchantTradeDetailVo.java @@ -23,15 +23,12 @@ public class WxMerchantTradeDetailVo extends BaseEntity { @io.swagger.annotations.ApiModelProperty(value = "券名称", name = "couponName") private String couponName; - @Excel(name="券价格",width = 20,orderNum = "4") @io.swagger.annotations.ApiModelProperty(value = "券价格", name = "couponSale") private Integer couponSale; - @Excel(name="券面额",width = 20,orderNum = "5") @io.swagger.annotations.ApiModelProperty(value = "核销券面额", name = "couponPrice") private Integer couponPrice; - @Excel(name="消费金额",width = 20,orderNum = "6") @io.swagger.annotations.ApiModelProperty(value = "消费金额", name = "tradeAmt") private Integer tradeAmt; @@ -42,4 +39,16 @@ public class WxMerchantTradeDetailVo extends BaseEntity { @io.swagger.annotations.ApiModelProperty(value = "交易时间", name = "tradeDate") private String tradeDateStr; + + + @Excel(name="券价格",width = 20,orderNum = "4") + private String couponSaleStr; + + @Excel(name="券面额",width = 20,orderNum = "5") + private String couponPriceStr; + + @Excel(name="消费金额",width = 20,orderNum = "6") + private String tradeAmtStr; + + } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java index 2b701496e..7468228e3 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java @@ -33,6 +33,7 @@ import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import java.math.BigDecimal; import java.util.*; import java.util.stream.Collectors; @@ -753,7 +754,16 @@ public class WxMerchantServiceImpl implements WxMerchantService { public void exportUserTradeList(WxMerchant record,HttpServletRequest request, HttpServletResponse response) { List datalist = wxMerchantMapper.userTradeDetailList(record); datalist.stream().forEach(e->{ - e.setTradeDateStr(DateUtils.formatDateTime(e.getTradeDate())); + if(e.getTradeDate() != null) { + e.setTradeDateStr(DateUtils.formatDateTime(e.getTradeDate())); + } + BigDecimal bigDecimal = new BigDecimal(e.getCouponPrice()); + e.setCouponPriceStr(bigDecimal.divide(new BigDecimal(100),2,BigDecimal.ROUND_HALF_UP).toString()); + bigDecimal = new BigDecimal(e.getCouponSale()); + e.setCouponSaleStr(bigDecimal.divide(new BigDecimal(100),2,BigDecimal.ROUND_HALF_UP).toString()); + bigDecimal = new BigDecimal(e.getTradeAmt()); + e.setTradeAmtStr(bigDecimal.divide(new BigDecimal(100),2,BigDecimal.ROUND_HALF_UP).toString()); + }); excelService.exportExcel(datalist, null, "商户会员消费列表", WxMerchantTradeDetailVo.class, "商户会员消费列表.xlsx", response, false); } From 7ce34e156c8ea033395c67e2871a426f5ae8f6b3 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Fri, 27 Sep 2019 16:20:36 +0800 Subject: [PATCH 09/18] =?UTF-8?q?[=E9=A6=96=E9=A1=B5=E6=B5=AE=E5=B1=82?= =?UTF-8?q?=E5=B9=BF=E5=91=8A][=E4=BF=AE=E6=94=B9][=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E6=B3=A8=E5=85=A5]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../market/WxFloatingLayerController.java | 2 +- .../impl/WxCuserFloatingLayerServiceImpl.java | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxFloatingLayerController.java b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxFloatingLayerController.java index a94f32e74..9314c7f71 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxFloatingLayerController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxFloatingLayerController.java @@ -29,7 +29,7 @@ public class WxFloatingLayerController extends BaseController { private final Logger logger = LoggerFactory.getLogger(this.getClass()); @Autowired - private WxFloatingLayerService wxFloatingLayerService; + WxFloatingLayerService wxFloatingLayerService; @ApiOperation("分页列表接口") @GetMapping("/list") diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCuserFloatingLayerServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCuserFloatingLayerServiceImpl.java index 4b2e792cb..dd9ffbf7d 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCuserFloatingLayerServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCuserFloatingLayerServiceImpl.java @@ -25,13 +25,13 @@ public class WxCuserFloatingLayerServiceImpl implements WxCuserFloatingLayerServ private final Logger logger = LoggerFactory.getLogger(this.getClass()); @Autowired - WxCuserFloatingLayerMapper WxCuserFloatingLayerMapper; + WxCuserFloatingLayerMapper wxCuserFloatingLayerMapper; @Autowired - WxFloatingLayerMapper WxFloatingLayerMapper; + WxFloatingLayerMapper wxFloatingLayerMapper; @Autowired - WxCUserMapper WxCUserMapper; + WxCUserMapper wxCUserMapper; @Override @@ -39,14 +39,14 @@ public class WxCuserFloatingLayerServiceImpl implements WxCuserFloatingLayerServ //1 查看是否存在用户,用户不存在 直接返回浮层信息 WxCUser user = new WxCUser(); user.setOpenId(openId); - WxCUser byOpenId = WxCUserMapper.findByOpenId(user); + WxCUser byOpenId = wxCUserMapper.findByOpenId(user); if (byOpenId == null) { return getWxFloatingLayer(); } //2 用户存在 查看是否已有弹出记录 没有 保存记录后返回浮层信息 WxCuserFloatingLayer wxCuserFloatingLayerQuery = new WxCuserFloatingLayer(); wxCuserFloatingLayerQuery.setUserId(byOpenId.getId()); - WxCuserFloatingLayer wxCuserFloatingLayer = WxCuserFloatingLayerMapper.selectOne(new QueryWrapper<>(wxCuserFloatingLayerQuery)); + WxCuserFloatingLayer wxCuserFloatingLayer = wxCuserFloatingLayerMapper.selectOne(new QueryWrapper<>(wxCuserFloatingLayerQuery)); if (wxCuserFloatingLayer == null) { saveCuserFloatingLayer(byOpenId); return getWxFloatingLayer(); @@ -62,12 +62,12 @@ public class WxCuserFloatingLayerServiceImpl implements WxCuserFloatingLayerServ wxCuserFloatingLayer.setUserId(wxCUser.getId()); wxCuserFloatingLayer.setTenantId(wxCUser.getTenantId()); wxCuserFloatingLayer.setCreateTime(new Date()); - WxCuserFloatingLayerMapper.insert(wxCuserFloatingLayer); + wxCuserFloatingLayerMapper.insert(wxCuserFloatingLayer); } public WxFloatingLayer getWxFloatingLayer() { WxFloatingLayer wxFloatingLayer = new WxFloatingLayer(); wxFloatingLayer.setStatus(EnumFloatingLayerStatus.STATUS_THROW_IN.getCode()); - return WxFloatingLayerMapper.selectOne(new QueryWrapper<>(wxFloatingLayer)); + return wxFloatingLayerMapper.selectOne(new QueryWrapper<>(wxFloatingLayer)); } } From 710c628424b84c8ec1c92c55b37150538ed2bd5a Mon Sep 17 00:00:00 2001 From: gongbiao Date: Fri, 27 Sep 2019 16:32:40 +0800 Subject: [PATCH 10/18] =?UTF-8?q?[=E9=A6=96=E9=A1=B5=E6=B5=AE=E5=B1=82?= =?UTF-8?q?=E5=B9=BF=E5=91=8A][=E4=BF=AE=E6=94=B9][mapper=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=90=8D]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{WxCuserFloatingLayer.xml => WxCuserFloatingLayerMapper.xml} | 0 .../mapper/{WxFloatingLayer.xml => WxFloatingLayerMapper.xml} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename mallinkService/src/main/resources/mapper/{WxCuserFloatingLayer.xml => WxCuserFloatingLayerMapper.xml} (100%) rename mallinkService/src/main/resources/mapper/{WxFloatingLayer.xml => WxFloatingLayerMapper.xml} (100%) diff --git a/mallinkService/src/main/resources/mapper/WxCuserFloatingLayer.xml b/mallinkService/src/main/resources/mapper/WxCuserFloatingLayerMapper.xml similarity index 100% rename from mallinkService/src/main/resources/mapper/WxCuserFloatingLayer.xml rename to mallinkService/src/main/resources/mapper/WxCuserFloatingLayerMapper.xml diff --git a/mallinkService/src/main/resources/mapper/WxFloatingLayer.xml b/mallinkService/src/main/resources/mapper/WxFloatingLayerMapper.xml similarity index 100% rename from mallinkService/src/main/resources/mapper/WxFloatingLayer.xml rename to mallinkService/src/main/resources/mapper/WxFloatingLayerMapper.xml From 0b2026c9a5f70e73647826eb53d02b86e15c7e2e Mon Sep 17 00:00:00 2001 From: gongbiao Date: Fri, 27 Sep 2019 16:52:04 +0800 Subject: [PATCH 11/18] =?UTF-8?q?[=E5=95=86=E6=88=B7][=E4=BF=AE=E6=94=B9][?= =?UTF-8?q?=E4=B8=8D=E5=BA=8F=E5=88=97=E5=8C=96=E4=B8=8D=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E5=AD=97=E6=AE=B5]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/iformall/domain/po/WxMerchant.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java b/mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java index 1be08ee07..b8f0ca3c5 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java @@ -126,10 +126,10 @@ public class WxMerchant extends BaseEntity { private String talkUserAux; @io.swagger.annotations.ApiModelProperty(value = "开始时间", name = "startTime") - private Date starttime; + private transient Date starttime; @io.swagger.annotations.ApiModelProperty(value = "结束时间", name = "endTime") - private Date endtime; + private transient Date endtime; @io.swagger.annotations.ApiModelProperty(value = "昵称", name = "userName") private transient String userName; From 7a252fa1b084433bcd8c1525c97b43bcf3ddff85 Mon Sep 17 00:00:00 2001 From: Stormeye Wu Date: Fri, 27 Sep 2019 22:32:50 +0800 Subject: [PATCH 12/18] =?UTF-8?q?[=E5=BA=93=E5=AD=98][=E4=BF=AE=E6=94=B9]:?= =?UTF-8?q?=E5=BA=93=E5=AD=98=E4=BF=AE=E6=94=B9,=E9=98=B2=E6=AD=A2?= =?UTF-8?q?=E5=86=99=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/iformall/service/WxCouponService.java | 8 ++++---- .../iformall/service/impl/WxCouponSendServiceImpl.java | 4 ++-- .../com/iformall/service/impl/WxCouponServiceImpl.java | 4 ++-- .../com/iformall/service/impl/WxOrderServiceImpl.java | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/WxCouponService.java b/mallinkService/src/main/java/com/iformall/service/WxCouponService.java index 308922c7a..63c3b7d57 100644 --- a/mallinkService/src/main/java/com/iformall/service/WxCouponService.java +++ b/mallinkService/src/main/java/com/iformall/service/WxCouponService.java @@ -209,18 +209,18 @@ public interface WxCouponService { * 库存减少 * * @param id 券ID - * @param remainInventory 当前库存 * @param number 减少数量 + * @param remainInventory 当前库存 */ - void reduceRemainInventory(Long id, Integer remainInventory, Integer number); + void reduceRemainInventory(Long id, Integer number, Integer remainInventory); /** * 库存退回 * * @param id 券ID - * @param remainInventory 当前库存 * @param number 回退数量 + * @param remainInventory 当前库存 */ - void backRemainInventory(Long id, Integer remainInventory, Integer number); + void backRemainInventory(Long id, Integer number, Integer remainInventory); } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java index bd1efb798..a39e095b8 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java @@ -179,7 +179,7 @@ public class WxCouponSendServiceImpl implements WxCouponSendService { } //更新库存 - wxCouponService.reduceRemainInventory(wxCouponOfDb.getId(), wxCouponOfDb.getRemainInventory(), merchantLnventory); + wxCouponService.reduceRemainInventory(wxCouponOfDb.getId(), merchantLnventory, wxCouponOfDb.getRemainInventory()); } @Override @@ -208,7 +208,7 @@ public class WxCouponSendServiceImpl implements WxCouponSendService { } //退回coupon库存 if(merchantRemain!=0) { - wxCouponService.backRemainInventory(queryById.getId(), wxCouponOfDb.getRemainInventory(), merchantRemain); + wxCouponService.backRemainInventory(queryById.getId(), merchantRemain, wxCouponOfDb.getRemainInventory()); } } wxCouponSendMapper.updateById(record); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java index e260fa13c..dc7a41af3 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java @@ -668,7 +668,7 @@ import java.util.stream.Collectors; @Override @Transactional(isolation= Isolation.SERIALIZABLE, propagation = Propagation.REQUIRED, rollbackFor = {Exception.class}) - public void reduceRemainInventory(Long id, Integer remainInventory, Integer number) { + public void reduceRemainInventory(Long id, Integer number, Integer remainInventory) { int num = wxCouponMapper.reduceInventory(id, number, remainInventory); if (num == 0) { throw new MallinkException(ErrorCode.ORDER_SAVE_ERR); @@ -677,7 +677,7 @@ import java.util.stream.Collectors; @Override @Transactional(isolation= Isolation.SERIALIZABLE, propagation = Propagation.REQUIRED, rollbackFor = {Exception.class}) - public void backRemainInventory(Long id, Integer remainInventory, Integer number) { + public void backRemainInventory(Long id, Integer number, Integer remainInventory) { int num = wxCouponMapper.backInventory(id, number, remainInventory); if (num == 0) { throw new MallinkException(ErrorCode.REMAIN_BACK_FAIL); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java index f959550f7..b7b352d12 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java @@ -513,7 +513,7 @@ public class WxOrderServiceImpl implements WxOrderService { } try { - wxCouponMapper.backInventory(coupon.getId(), coupon.getRemainInventory(), 1); + wxCouponMapper.backInventory(coupon.getId(), 1, coupon.getRemainInventory()); } catch (Exception e) { logger.error("数据库更新失败,库存+1失败, e:" + e.getMessage()); throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "库存恢复失败"); From 2f159c015ece15e5e3a52db1648fc591a4be509d Mon Sep 17 00:00:00 2001 From: Stormeye Wu Date: Sat, 28 Sep 2019 07:51:13 +0800 Subject: [PATCH 13/18] =?UTF-8?q?[=E5=81=9C=E8=BD=A6][=E4=BF=AE=E6=94=B9]?= =?UTF-8?q?=E5=81=9C=E8=BD=A6=E6=94=AF=E6=8C=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/iformall/enums/EnumCarSupport.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumCarSupport.java b/mallinkService/src/main/java/com/iformall/enums/EnumCarSupport.java index aab316a4f..8ffc2efee 100644 --- a/mallinkService/src/main/java/com/iformall/enums/EnumCarSupport.java +++ b/mallinkService/src/main/java/com/iformall/enums/EnumCarSupport.java @@ -8,7 +8,7 @@ public enum EnumCarSupport { // 0-不支持 1-ETCP NOCAR(0, "暂未支持"), - ETCP(1, "ETCP"), + CAR(1, "停车支持"), ; public static EnumCarSupport getEnum(Integer code) { From 4b5012b5555d13cba6a5b5fc1b087e05f2bcbda5 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Fri, 27 Sep 2019 17:35:46 +0800 Subject: [PATCH 14/18] =?UTF-8?q?[=E7=A7=AF=E5=88=86=E8=A7=84=E5=88=99][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9][userId=E5=AD=97=E6=AE=B5SQL]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mallinkAdmin/src/main/resources/application-dev.yml | 2 +- .../db/migration/V201909271732__G_ALTER_CREDIT_HISTORY.sql | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 mallinkAdmin/src/main/resources/db/migration/V201909271732__G_ALTER_CREDIT_HISTORY.sql diff --git a/mallinkAdmin/src/main/resources/application-dev.yml b/mallinkAdmin/src/main/resources/application-dev.yml index 52cee84f5..62b116450 100644 --- a/mallinkAdmin/src/main/resources/application-dev.yml +++ b/mallinkAdmin/src/main/resources/application-dev.yml @@ -115,7 +115,7 @@ fm: exception_emails: houtaikaifa@iformall.com deploy: 1 open: true - upload_dir: /home/test/server/uploads/ + upload_dir: ./upload/ ueditor: config: config.json diff --git a/mallinkAdmin/src/main/resources/db/migration/V201909271732__G_ALTER_CREDIT_HISTORY.sql b/mallinkAdmin/src/main/resources/db/migration/V201909271732__G_ALTER_CREDIT_HISTORY.sql new file mode 100644 index 000000000..0afe00fdf --- /dev/null +++ b/mallinkAdmin/src/main/resources/db/migration/V201909271732__G_ALTER_CREDIT_HISTORY.sql @@ -0,0 +1 @@ +alter table wx_credit_history change column buserId buser_id bigint(20) default 0 not null comment 'B端微信用户ID'; From 453d0314d7407432ce1116dd061b070d75b5a8aa Mon Sep 17 00:00:00 2001 From: gongbiao Date: Sun, 29 Sep 2019 10:01:35 +0800 Subject: [PATCH 15/18] =?UTF-8?q?[=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9][=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E8=B7=AF=E5=BE=84]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mallinkAdmin/src/main/resources/application-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mallinkAdmin/src/main/resources/application-dev.yml b/mallinkAdmin/src/main/resources/application-dev.yml index 62b116450..52cee84f5 100644 --- a/mallinkAdmin/src/main/resources/application-dev.yml +++ b/mallinkAdmin/src/main/resources/application-dev.yml @@ -115,7 +115,7 @@ fm: exception_emails: houtaikaifa@iformall.com deploy: 1 open: true - upload_dir: ./upload/ + upload_dir: /home/test/server/uploads/ ueditor: config: config.json From 6b39fa04cfb27a3df456bcfee1e4701c82f0744c Mon Sep 17 00:00:00 2001 From: luozukai Date: Sun, 29 Sep 2019 11:27:52 +0800 Subject: [PATCH 16/18] =?UTF-8?q?[=E4=BF=AE=E6=94=B9][=E4=BC=9A=E5=91=98?= =?UTF-8?q?=E6=B6=88=E8=B4=B9][=E4=BF=AE=E5=A4=8Dbug]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/WxBillSettleBillMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mallinkService/src/main/resources/mapper/WxBillSettleBillMapper.xml b/mallinkService/src/main/resources/mapper/WxBillSettleBillMapper.xml index 716d2b013..1e4991fe8 100644 --- a/mallinkService/src/main/resources/mapper/WxBillSettleBillMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillSettleBillMapper.xml @@ -39,7 +39,7 @@ select from wx_floating_layer + + + + + + + + + + + + + + + + + and fl.`id` = #{id} + + + + and fl.`tenant_id` = #{tenantId} + + + + and fl.`status` = #{status} + + + + and fl.id in + + #{idItem} + + + order by ${sortColumns} + + + + + + update wx_floating_layer set status=1 where produce_id=#{value} +