From 217d44093f6c4e908faa227073de74f2eb54f513 Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Mon, 28 Dec 2020 11:15:49 +0800 Subject: [PATCH] modify --- zq-erp/src/main/java/com/matrix/system/common/interceptor/ApiUserLoginInterceptor.java | 2 zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java | 42 ++++++++------ zq-erp/src/main/java/com/matrix/system/app/mapper/MoneyCardUseMapper.java | 15 +++++ zq-erp/src/main/java/com/matrix/system/app/vo/VipCardListVo.java | 74 ++++++++++++++++++++++++ zq-erp/src/main/java/com/matrix/system/app/action/ApiVipInfoAction.java | 10 +++ 5 files changed, 124 insertions(+), 19 deletions(-) diff --git a/zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java b/zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java index a2c7233..83a7b43 100644 --- a/zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java +++ b/zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java @@ -80,25 +80,31 @@ queryUse.setVipId(serviceVipProjDto.getVipId()); queryUse.setType(Dictionary.SHOPPING_GOODS_TYPE_XM); queryUse.setTaocanId(-1L); - switch (serviceVipProjDto.getType()) { - case "0" : - break; - case "1": - queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX); - queryUse.setIsOver(Dictionary.FLAG_NO_N); - break; - case "2": - queryUse.setStatus(Dictionary.TAOCAN_STATUS_WX); - queryUse.setIsOver(Dictionary.FLAG_YES_Y); - break; - case "3": - queryUse.setTargetFailTime(DateUtil.getDateAfterMonth(new Date(), 1)); - break; - default: - queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX); - queryUse.setIsOver(Dictionary.FLAG_NO_N); - break; + if (serviceVipProjDto.getType() != null) { + switch (serviceVipProjDto.getType()) { + case "0": + break; + case "1": + queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX); + queryUse.setIsOver(Dictionary.FLAG_NO_N); + break; + case "2": + queryUse.setStatus(Dictionary.TAOCAN_STATUS_WX); + queryUse.setIsOver(Dictionary.FLAG_YES_Y); + break; + case "3": + queryUse.setTargetFailTime(DateUtil.getDateAfterMonth(new Date(), 1)); + break; + default: + queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX); + queryUse.setIsOver(Dictionary.FLAG_NO_N); + break; + } + } else { + queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX); + queryUse.setIsOver(Dictionary.FLAG_NO_N); } + queryUse.setQueryKey(serviceVipProjDto.getQueryKey()); List<SysProjUse> projList = projUseService.findInPage(queryUse, null); List<ServiceProjVo> serviceProjVos = SysProjUseMapper.INSTANCE.entityListToProjVoList(projList); diff --git a/zq-erp/src/main/java/com/matrix/system/app/action/ApiVipInfoAction.java b/zq-erp/src/main/java/com/matrix/system/app/action/ApiVipInfoAction.java index 6de9138..6ef63fc 100644 --- a/zq-erp/src/main/java/com/matrix/system/app/action/ApiVipInfoAction.java +++ b/zq-erp/src/main/java/com/matrix/system/app/action/ApiVipInfoAction.java @@ -15,8 +15,11 @@ import com.matrix.system.common.dao.CustomerDataDictionaryDao; import com.matrix.system.common.tools.DataAuthUtil; import com.matrix.system.hive.action.BaseController; +import com.matrix.system.hive.bean.MoneyCardUse; import com.matrix.system.hive.bean.SysVipInfo; import com.matrix.system.hive.bean.SysVipLevel; +import com.matrix.system.hive.dao.MoneyCardUseDao; +import com.matrix.system.hive.service.MoneyCardUseService; import com.matrix.system.hive.service.SysVipInfoService; import com.matrix.system.hive.service.SysVipLevelService; import io.swagger.annotations.Api; @@ -46,6 +49,9 @@ @Autowired private CustomerDataDictionaryDao customerDataDictionaryDao; + + @Autowired + private MoneyCardUseService moneyCardUseService; @ApiOperation(value = "获取会员通讯录列表", notes = "获取会员通讯录列表") @ApiResponses({ @@ -145,8 +151,12 @@ return AjaxResult.buildSuccessInstance(sysVipInfoService.findAll(sysVipInfo)); } + @ApiOperation(value = "获取会员卡项列表") @GetMapping(value = "/findVipCardInfo/{vipId}") public AjaxResult findVipCardInfo(@PathVariable("vipId") Long vipId) { + MoneyCardUse moneyCardUse = new MoneyCardUse(); + moneyCardUse.setVipId(vipId); + List<MoneyCardUse> list = moneyCardUseService.findVipCardUseInPage(moneyCardUse, null); return null; } } diff --git a/zq-erp/src/main/java/com/matrix/system/app/mapper/MoneyCardUseMapper.java b/zq-erp/src/main/java/com/matrix/system/app/mapper/MoneyCardUseMapper.java new file mode 100644 index 0000000..cc3c102 --- /dev/null +++ b/zq-erp/src/main/java/com/matrix/system/app/mapper/MoneyCardUseMapper.java @@ -0,0 +1,15 @@ +package com.matrix.system.app.mapper; + +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +/** + * @author wzy + * @date 2020-12-28 + **/ +@Mapper +public abstract class MoneyCardUseMapper { + public static final MoneyCardUseMapper INSTANCE = Mappers.getMapper(MoneyCardUseMapper.class); + +// public abstract +} diff --git a/zq-erp/src/main/java/com/matrix/system/app/vo/VipCardListVo.java b/zq-erp/src/main/java/com/matrix/system/app/vo/VipCardListVo.java new file mode 100644 index 0000000..58007a1 --- /dev/null +++ b/zq-erp/src/main/java/com/matrix/system/app/vo/VipCardListVo.java @@ -0,0 +1,74 @@ +package com.matrix.system.app.vo; + +import io.swagger.annotations.ApiModel; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * @author wzy + * @date 2020-12-28 + **/ +@ApiModel(value = "VipCardListVo", description = "会员卡项列表") +public class VipCardListVo { + + private String cardName; + + private String vipNo; + + private BigDecimal realMoney; + + private BigDecimal giftMoney; + + private String status; + + private Date failTime; + + public String getCardName() { + return cardName; + } + + public void setCardName(String cardName) { + this.cardName = cardName; + } + + public String getVipNo() { + return vipNo; + } + + public void setVipNo(String vipNo) { + this.vipNo = vipNo; + } + + public BigDecimal getRealMoney() { + return realMoney; + } + + public void setRealMoney(BigDecimal realMoney) { + this.realMoney = realMoney; + } + + public BigDecimal getGiftMoney() { + return giftMoney; + } + + public void setGiftMoney(BigDecimal giftMoney) { + this.giftMoney = giftMoney; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public Date getFailTime() { + return failTime; + } + + public void setFailTime(Date failTime) { + this.failTime = failTime; + } +} diff --git a/zq-erp/src/main/java/com/matrix/system/common/interceptor/ApiUserLoginInterceptor.java b/zq-erp/src/main/java/com/matrix/system/common/interceptor/ApiUserLoginInterceptor.java index 4fe5642..91f758b 100644 --- a/zq-erp/src/main/java/com/matrix/system/common/interceptor/ApiUserLoginInterceptor.java +++ b/zq-erp/src/main/java/com/matrix/system/common/interceptor/ApiUserLoginInterceptor.java @@ -47,7 +47,7 @@ @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { if ("dev".equals(evn)) { - SysUsers sysUsers = sysUsersDao.selectById(1012L); + SysUsers sysUsers = sysUsersDao.selectById(14L); request.getSession().setAttribute(MatrixConstance.LOGIN_KEY, sysUsers); return true; } -- Gitblit v1.9.1