| @@ -93,7 +93,7 @@ public class SwaggerConfiguration { | |||
| .apis(RequestHandlerSelectors.basePackage(swaggerProperties.getBasePackage())) | |||
| .apis(input -> { | |||
| ApiVersion apiVersion = input.getHandlerMethod().getMethodAnnotation(ApiVersion.class); | |||
| return apiVersion != null && Arrays.asList(apiVersion.group()).contains(SwaggerConstant.V_1_0_0); | |||
| return apiVersion != null && Arrays.asList(apiVersion.group()).contains(SwaggerConstant.V_A_2_0); | |||
| }) | |||
| .paths( | |||
| Predicates.and( | |||
| @@ -3,4 +3,5 @@ package com.iformall.constant; | |||
| public interface SwaggerConstant { | |||
| String V_1_0_0 = "v1.0.0"; | |||
| String V_2_0_0 = "v2.0.0"; | |||
| String V_A_2_0 = "a.v.2.0"; | |||
| } | |||
| @@ -0,0 +1,138 @@ | |||
| package com.iformall.controller.market; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.ApiVersion; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.constant.SwaggerConstant; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.WxVtwoActivityAward; | |||
| import com.iformall.domain.po.WxVtwoAmountGiftActivity; | |||
| import com.iformall.domain.po.WxVtwoPrizeDrawActivity; | |||
| import com.iformall.domain.po.base.BaseEntity.SortField; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.enums.EnumOfflineActivityAwardsMoneyRule; | |||
| import com.iformall.enums.EnumOfflineActivityMerchantType; | |||
| import com.iformall.enums.EnumOfflineActivityStatus; | |||
| import com.iformall.service.WxVtwoAmountGiftActivityService; | |||
| import com.iformall.service.WxVtwoPrizeDrawActivityService; | |||
| import io.swagger.annotations.Api; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| import io.swagger.annotations.ApiOperation; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import java.math.BigDecimal; | |||
| /** | |||
| * @author alascor | |||
| * | |||
| */ | |||
| @RestController | |||
| @RequestMapping("/amountGift") | |||
| @Api(description = "线下赠礼活动相关接口") | |||
| public class WxVtwoAmountGiftActivityController extends BaseController { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| private WxVtwoAmountGiftActivityService wxVtwoAmountGiftActivityService; | |||
| @ApiVersion(group = SwaggerConstant.V_A_2_0) | |||
| @ApiOperation("分页列表接口") | |||
| @GetMapping("list") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| public ResultData list(@ModelAttribute WxVtwoAmountGiftActivity amountGiftActivity, Integer pageNum, Integer pageSize) { | |||
| if (null == amountGiftActivity) amountGiftActivity = new WxVtwoAmountGiftActivity(); | |||
| TenantEntity tenantInfo = getTenantInfo(); | |||
| amountGiftActivity.updateTenantInfo(tenantInfo); | |||
| amountGiftActivity.setSortColumns(SortField.CreateDate_DESC); | |||
| final PageInfo<WxVtwoAmountGiftActivity> page = wxVtwoAmountGiftActivityService.listAsPage(amountGiftActivity, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @ApiVersion(group = SwaggerConstant.V_A_2_0) | |||
| @ApiOperation("新增修改接口") | |||
| @PostMapping("saveOrUpdate") | |||
| public ResultData saveOrUpdate(@RequestBody WxVtwoAmountGiftActivity amountGiftActivity) { | |||
| TenantEntity tenantEntity = getTenantInfo(); | |||
| amountGiftActivity.updateTenantInfo(tenantEntity); | |||
| if(amountGiftActivity.getStartTime() == null || amountGiftActivity.getEndTime() == null){ | |||
| return new ResultData(Result.ERROR,"活动时间为空"); | |||
| } | |||
| if(amountGiftActivity.getAwardList() == null || amountGiftActivity.getAwardList().isEmpty()){ | |||
| return new ResultData(Result.ERROR,"活动奖项不能为空"); | |||
| } | |||
| for (WxVtwoActivityAward award :amountGiftActivity.getAwardList()){ | |||
| if(EnumOfflineActivityAwardsMoneyRule.MALL_ONLY.getCode().equals(award.getShareRule())){ | |||
| award.setMallShareRate(new BigDecimal(100)); | |||
| award.setMerchantShareRate(new BigDecimal(0)); | |||
| } | |||
| else if (EnumOfflineActivityAwardsMoneyRule.MERCHANT_ONLY.getCode().equals(award.getShareRule())){ | |||
| award.setMallShareRate(new BigDecimal(0)); | |||
| award.setMerchantShareRate(new BigDecimal(100)); | |||
| } | |||
| else if (EnumOfflineActivityAwardsMoneyRule.SHARE.getCode().equals(award.getShareRule())) { | |||
| if (award.getMallShareRate().add(award.getMerchantShareRate()).intValue() != 100) { | |||
| return new ResultData(Result.ERROR,"分担规则下,商户和商管的比例总和需要为100%"); | |||
| } | |||
| } | |||
| } | |||
| if(EnumOfflineActivityMerchantType.ADD.getCode().equals(amountGiftActivity.getMerchantRule())){ | |||
| if(amountGiftActivity.getMerchantIdList() == null || amountGiftActivity.getMerchantIdList().isEmpty()){ | |||
| return new ResultData(Result.ERROR,"活动参加商户不能为空"); | |||
| } | |||
| } | |||
| else if (EnumOfflineActivityMerchantType.UN_ADD.getCode().equals(amountGiftActivity.getMerchantRule())) { | |||
| if(amountGiftActivity.getMerchantIdList() == null || amountGiftActivity.getMerchantIdList().isEmpty()){ | |||
| return new ResultData(Result.ERROR,"活动不参加商户不能为空"); | |||
| } | |||
| } | |||
| wxVtwoAmountGiftActivityService.saveOrUpdate(amountGiftActivity); | |||
| return new ResultData(); | |||
| } | |||
| @ApiVersion(group = SwaggerConstant.V_A_2_0) | |||
| @ApiOperation("上架") | |||
| @PostMapping("online") | |||
| public ResultData online(@RequestBody WxVtwoAmountGiftActivity amountGiftActivity) { | |||
| if(amountGiftActivity.getId() == null){ | |||
| return new ResultData(Result.ERROR,"ID为空"); | |||
| } | |||
| TenantEntity tenantEntity = getTenantInfo(); | |||
| amountGiftActivity.updateTenantInfo(tenantEntity); | |||
| amountGiftActivity.setStatus(EnumOfflineActivityStatus.ON_LINE.getCode()); | |||
| wxVtwoAmountGiftActivityService.updateById(amountGiftActivity); | |||
| return new ResultData(); | |||
| } | |||
| @ApiVersion(group = SwaggerConstant.V_A_2_0) | |||
| @ApiOperation("下架") | |||
| @PostMapping("offline") | |||
| public ResultData offline(@RequestBody WxVtwoAmountGiftActivity amountGiftActivity) { | |||
| if(amountGiftActivity.getId() == null){ | |||
| return new ResultData(Result.ERROR,"ID为空"); | |||
| } | |||
| TenantEntity tenantEntity = getTenantInfo(); | |||
| amountGiftActivity.updateTenantInfo(tenantEntity); | |||
| amountGiftActivity.setStatus(EnumOfflineActivityStatus.OFF_LINE.getCode()); | |||
| wxVtwoAmountGiftActivityService.updateById(amountGiftActivity); | |||
| return new ResultData(); | |||
| } | |||
| @ApiVersion(group = SwaggerConstant.V_A_2_0) | |||
| @ApiOperation("查询详情") | |||
| @GetMapping("getInfoById") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "id", value = "主键id", dataType = "Long", paramType = "query", required = true)}) | |||
| public ResultData getInfoById(Long id) { | |||
| TenantEntity tenantInfo = getTenantInfo(); | |||
| WxVtwoAmountGiftActivity amountGiftActivity = wxVtwoAmountGiftActivityService.getInfoById(id, tenantInfo.getTenantId()); | |||
| return new ResultData(amountGiftActivity); | |||
| } | |||
| } | |||
| @@ -0,0 +1,161 @@ | |||
| package com.iformall.controller.market; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.ApiVersion; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.constant.SwaggerConstant; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.WxVtwoActivityAward; | |||
| import com.iformall.domain.po.WxVtwoAmountGiftActivity; | |||
| import com.iformall.domain.po.WxVtwoCashBackActivity; | |||
| import com.iformall.domain.po.WxVtwoCashBackAward; | |||
| import com.iformall.domain.po.base.BaseEntity.SortField; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.enums.EnumOfflineActivityAwardsMoneyRule; | |||
| import com.iformall.enums.EnumOfflineActivityMerchantType; | |||
| import com.iformall.enums.EnumOfflineActivityStatus; | |||
| import com.iformall.service.WxVtwoAmountGiftActivityService; | |||
| import com.iformall.service.WxVtwoCashBackActivityService; | |||
| import io.swagger.annotations.Api; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| import io.swagger.annotations.ApiOperation; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import java.math.BigDecimal; | |||
| /** | |||
| * @author alascor | |||
| * | |||
| */ | |||
| @RestController | |||
| @RequestMapping("/amountGift") | |||
| @Api(description = "线下返现活动相关接口") | |||
| public class WxVtwoCashBackActivityController extends BaseController { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| private WxVtwoCashBackActivityService wxVtwoCashBackActivityService; | |||
| @ApiVersion(group = SwaggerConstant.V_A_2_0) | |||
| @ApiOperation("分页列表接口") | |||
| @GetMapping("list") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| public ResultData list(@ModelAttribute WxVtwoCashBackActivity cashBackActivity, Integer pageNum, Integer pageSize) { | |||
| if (null == cashBackActivity) cashBackActivity = new WxVtwoCashBackActivity(); | |||
| TenantEntity tenantInfo = getTenantInfo(); | |||
| cashBackActivity.updateTenantInfo(tenantInfo); | |||
| cashBackActivity.setSortColumns(SortField.CreateDate_DESC); | |||
| final PageInfo<WxVtwoCashBackActivity> page = wxVtwoCashBackActivityService.listAsPage(cashBackActivity, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @ApiVersion(group = SwaggerConstant.V_A_2_0) | |||
| @ApiOperation("新增修改接口") | |||
| @PostMapping("saveOrUpdate") | |||
| public ResultData saveOrUpdate(@RequestBody WxVtwoCashBackActivity cashBackActivity) { | |||
| TenantEntity tenantEntity = getTenantInfo(); | |||
| cashBackActivity.updateTenantInfo(tenantEntity); | |||
| if(cashBackActivity.getStartTime() == null || cashBackActivity.getEndTime() == null){ | |||
| return new ResultData(Result.ERROR,"活动时间为空"); | |||
| } | |||
| if((cashBackActivity.getAmountRulesObject() == null || cashBackActivity.getAmountRulesObject().isEmpty()) | |||
| && (cashBackActivity.getRelatedRulesObject() == null || cashBackActivity.getRelatedRulesObject().isEmpty())){ | |||
| return new ResultData(Result.ERROR,"活动奖项不能为空"); | |||
| } | |||
| if(cashBackActivity.getAmountRulesObject()!=null && !cashBackActivity.getAmountRulesObject().isEmpty()){ | |||
| for (WxVtwoCashBackAward award :cashBackActivity.getAmountRulesObject()){ | |||
| if(EnumOfflineActivityAwardsMoneyRule.MALL_ONLY.getCode().equals(award.getShareRule())){ | |||
| award.setMallShareRate(new BigDecimal(100)); | |||
| award.setMerchantShareRate(new BigDecimal(0)); | |||
| } | |||
| else if (EnumOfflineActivityAwardsMoneyRule.MERCHANT_ONLY.getCode().equals(award.getShareRule())){ | |||
| award.setMallShareRate(new BigDecimal(0)); | |||
| award.setMerchantShareRate(new BigDecimal(100)); | |||
| } | |||
| else if (EnumOfflineActivityAwardsMoneyRule.SHARE.getCode().equals(award.getShareRule())) { | |||
| if (award.getMallShareRate().add(award.getMerchantShareRate()).intValue() != 100) { | |||
| return new ResultData(Result.ERROR,"分担规则下,商户和商管的比例总和需要为100%"); | |||
| } | |||
| } | |||
| } | |||
| } | |||
| if(cashBackActivity.getRelatedRulesObject()!=null && !cashBackActivity.getRelatedRulesObject().isEmpty()){ | |||
| for (WxVtwoCashBackAward award :cashBackActivity.getRelatedRulesObject()){ | |||
| if(EnumOfflineActivityAwardsMoneyRule.MALL_ONLY.getCode().equals(award.getShareRule())){ | |||
| award.setMallShareRate(new BigDecimal(100)); | |||
| award.setMerchantShareRate(new BigDecimal(0)); | |||
| } | |||
| else if (EnumOfflineActivityAwardsMoneyRule.MERCHANT_ONLY.getCode().equals(award.getShareRule())){ | |||
| award.setMallShareRate(new BigDecimal(0)); | |||
| award.setMerchantShareRate(new BigDecimal(100)); | |||
| } | |||
| else if (EnumOfflineActivityAwardsMoneyRule.SHARE.getCode().equals(award.getShareRule())) { | |||
| if (award.getMallShareRate().add(award.getMerchantShareRate()).intValue() != 100) { | |||
| return new ResultData(Result.ERROR,"分担规则下,商户和商管的比例总和需要为100%"); | |||
| } | |||
| } | |||
| } | |||
| } | |||
| if(EnumOfflineActivityMerchantType.ADD.getCode().equals(cashBackActivity.getMerchantRule())){ | |||
| if(cashBackActivity.getMerchantIdList() == null || cashBackActivity.getMerchantIdList().isEmpty()){ | |||
| return new ResultData(Result.ERROR,"活动参加商户不能为空"); | |||
| } | |||
| } | |||
| else if (EnumOfflineActivityMerchantType.UN_ADD.getCode().equals(cashBackActivity.getMerchantRule())) { | |||
| if(cashBackActivity.getMerchantIdList() == null || cashBackActivity.getMerchantIdList().isEmpty()){ | |||
| return new ResultData(Result.ERROR,"活动不参加商户不能为空"); | |||
| } | |||
| } | |||
| wxVtwoCashBackActivityService.saveOrUpdate(cashBackActivity); | |||
| return new ResultData(); | |||
| } | |||
| @ApiVersion(group = SwaggerConstant.V_A_2_0) | |||
| @ApiOperation("上架") | |||
| @PostMapping("online") | |||
| public ResultData online(@RequestBody WxVtwoCashBackActivity cashBackActivity) { | |||
| if(cashBackActivity.getId() == null){ | |||
| return new ResultData(Result.ERROR,"ID为空"); | |||
| } | |||
| TenantEntity tenantEntity = getTenantInfo(); | |||
| cashBackActivity.updateTenantInfo(tenantEntity); | |||
| cashBackActivity.setStatus(EnumOfflineActivityStatus.ON_LINE.getCode()); | |||
| wxVtwoCashBackActivityService.updateById(cashBackActivity); | |||
| return new ResultData(); | |||
| } | |||
| @ApiVersion(group = SwaggerConstant.V_A_2_0) | |||
| @ApiOperation("下架") | |||
| @PostMapping("offline") | |||
| public ResultData offline(@RequestBody WxVtwoCashBackActivity cashBackActivity) { | |||
| if(cashBackActivity.getId() == null){ | |||
| return new ResultData(Result.ERROR,"ID为空"); | |||
| } | |||
| TenantEntity tenantEntity = getTenantInfo(); | |||
| cashBackActivity.updateTenantInfo(tenantEntity); | |||
| cashBackActivity.setStatus(EnumOfflineActivityStatus.OFF_LINE.getCode()); | |||
| wxVtwoCashBackActivityService.updateById(cashBackActivity); | |||
| return new ResultData(); | |||
| } | |||
| @ApiVersion(group = SwaggerConstant.V_A_2_0) | |||
| @ApiOperation("查询详情") | |||
| @GetMapping("getInfoById") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "id", value = "主键id", dataType = "Long", paramType = "query", required = true)}) | |||
| public ResultData getInfoById(Long id) { | |||
| TenantEntity tenantInfo = getTenantInfo(); | |||
| WxVtwoCashBackActivity cashBackActivity = wxVtwoCashBackActivityService.getInfoById(id, tenantInfo.getTenantId()); | |||
| return new ResultData(cashBackActivity); | |||
| } | |||
| } | |||
| @@ -0,0 +1,140 @@ | |||
| package com.iformall.controller.market; | |||
| import com.alibaba.fastjson.JSONObject; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.ApiVersion; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.constant.SwaggerConstant; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.domain.po.base.BaseEntity.SortField; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.vo.OfflineActivityAwardsItemVo; | |||
| import com.iformall.enums.*; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.service.WxOfflineActivityGrantAwardService; | |||
| import com.iformall.service.WxOfflineActivityService; | |||
| import com.iformall.service.WxVtwoPrizeDrawActivityService; | |||
| import io.swagger.annotations.Api; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| import io.swagger.annotations.ApiOperation; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| import java.math.BigDecimal; | |||
| /** | |||
| * @author alascor | |||
| * | |||
| */ | |||
| @RestController | |||
| @RequestMapping("/prizeDraw") | |||
| @Api(description = "线下抽奖活动相关接口") | |||
| public class WxVtwoPrizeDrawActivityController extends BaseController { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| private WxVtwoPrizeDrawActivityService wxVtwoPrizeDrawActivityService; | |||
| @ApiVersion(group = SwaggerConstant.V_A_2_0) | |||
| @ApiOperation("分页列表接口") | |||
| @GetMapping("list") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| public ResultData list(@ModelAttribute WxVtwoPrizeDrawActivity prizeDrawActivity, Integer pageNum, Integer pageSize) { | |||
| if (null == prizeDrawActivity) prizeDrawActivity = new WxVtwoPrizeDrawActivity(); | |||
| TenantEntity tenantInfo = getTenantInfo(); | |||
| prizeDrawActivity.updateTenantInfo(tenantInfo); | |||
| prizeDrawActivity.setSortColumns(SortField.CreateDate_DESC); | |||
| final PageInfo<WxVtwoPrizeDrawActivity> page = wxVtwoPrizeDrawActivityService.listAsPage(prizeDrawActivity, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @ApiVersion(group = SwaggerConstant.V_A_2_0) | |||
| @ApiOperation("新增修改接口") | |||
| @PostMapping("saveOrUpdate") | |||
| public ResultData saveOrUpdate(@RequestBody WxVtwoPrizeDrawActivity prizeDrawActivity) { | |||
| TenantEntity tenantEntity = getTenantInfo(); | |||
| prizeDrawActivity.updateTenantInfo(tenantEntity); | |||
| if(prizeDrawActivity.getStartTime() == null || prizeDrawActivity.getEndTime() == null){ | |||
| return new ResultData(Result.ERROR,"活动时间为空"); | |||
| } | |||
| if(prizeDrawActivity.getAwardList() == null || prizeDrawActivity.getAwardList().isEmpty()){ | |||
| return new ResultData(Result.ERROR,"活动奖项不能为空"); | |||
| } | |||
| for (WxVtwoActivityAward award :prizeDrawActivity.getAwardList()){ | |||
| if(EnumOfflineActivityAwardsMoneyRule.MALL_ONLY.getCode().equals(award.getShareRule())){ | |||
| award.setMallShareRate(new BigDecimal(100)); | |||
| award.setMerchantShareRate(new BigDecimal(0)); | |||
| } | |||
| else if (EnumOfflineActivityAwardsMoneyRule.MERCHANT_ONLY.getCode().equals(award.getShareRule())){ | |||
| award.setMallShareRate(new BigDecimal(0)); | |||
| award.setMerchantShareRate(new BigDecimal(100)); | |||
| } | |||
| else if (EnumOfflineActivityAwardsMoneyRule.SHARE.getCode().equals(award.getShareRule())) { | |||
| if (award.getMallShareRate().add(award.getMerchantShareRate()).intValue() != 100) { | |||
| return new ResultData(Result.ERROR,"分担规则下,商户和商管的比例总和需要为100%"); | |||
| } | |||
| } | |||
| } | |||
| if(EnumOfflineActivityMerchantType.ADD.getCode().equals(prizeDrawActivity.getMerchantRule())){ | |||
| if(prizeDrawActivity.getMerchantIdList() == null || prizeDrawActivity.getMerchantIdList().isEmpty()){ | |||
| return new ResultData(Result.ERROR,"活动参加商户不能为空"); | |||
| } | |||
| } | |||
| else if (EnumOfflineActivityMerchantType.UN_ADD.getCode().equals(prizeDrawActivity.getMerchantRule())) { | |||
| if(prizeDrawActivity.getMerchantIdList() == null || prizeDrawActivity.getMerchantIdList().isEmpty()){ | |||
| return new ResultData(Result.ERROR,"活动不参加商户不能为空"); | |||
| } | |||
| } | |||
| wxVtwoPrizeDrawActivityService.saveOrUpdate(prizeDrawActivity); | |||
| return new ResultData(); | |||
| } | |||
| @ApiVersion(group = SwaggerConstant.V_A_2_0) | |||
| @ApiOperation("上架") | |||
| @PostMapping("online") | |||
| public ResultData online(@RequestBody WxVtwoPrizeDrawActivity prizeDrawActivity) { | |||
| if(prizeDrawActivity.getId() == null){ | |||
| return new ResultData(Result.ERROR,"ID为空"); | |||
| } | |||
| TenantEntity tenantEntity = getTenantInfo(); | |||
| prizeDrawActivity.updateTenantInfo(tenantEntity); | |||
| prizeDrawActivity.setStatus(EnumOfflineActivityStatus.ON_LINE.getCode()); | |||
| wxVtwoPrizeDrawActivityService.updateById(prizeDrawActivity); | |||
| return new ResultData(); | |||
| } | |||
| @ApiVersion(group = SwaggerConstant.V_A_2_0) | |||
| @ApiOperation("下架") | |||
| @PostMapping("offline") | |||
| public ResultData offline(@RequestBody WxVtwoPrizeDrawActivity prizeDrawActivity) { | |||
| if(prizeDrawActivity.getId() == null){ | |||
| return new ResultData(Result.ERROR,"ID为空"); | |||
| } | |||
| TenantEntity tenantEntity = getTenantInfo(); | |||
| prizeDrawActivity.updateTenantInfo(tenantEntity); | |||
| prizeDrawActivity.setStatus(EnumOfflineActivityStatus.OFF_LINE.getCode()); | |||
| wxVtwoPrizeDrawActivityService.updateById(prizeDrawActivity); | |||
| return new ResultData(); | |||
| } | |||
| @ApiVersion(group = SwaggerConstant.V_A_2_0) | |||
| @ApiOperation("查询详情") | |||
| @GetMapping("getInfoById") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "id", value = "主键id", dataType = "Long", paramType = "query", required = true)}) | |||
| public ResultData getInfoById(Long id) { | |||
| TenantEntity tenantInfo = getTenantInfo(); | |||
| WxVtwoPrizeDrawActivity prizeDrawActivity = wxVtwoPrizeDrawActivityService.getInfoById(id, tenantInfo.getTenantId()); | |||
| return new ResultData(prizeDrawActivity); | |||
| } | |||
| } | |||
| @@ -0,0 +1,12 @@ | |||
| INSERT INTO `mallink`.`mall_permission` (`id`, `name`, `parent_id`, `available`, `permission`, `resource_type`, `module_color`, `module_color_num`, `url`, `icon`, `version_type`, `sort`) VALUES (1604, '线下活动', 6, 'Y', NULL, 0, NULL, NULL, NULL, 'icon-kanjia', 0, 604); | |||
| INSERT INTO `mallink`.`mall_permission` (`id`, `name`, `parent_id`, `available`, `permission`, `resource_type`, `module_color`, `module_color_num`, `url`, `icon`, `version_type`, `sort`) VALUES (16041, '活动主题', 1604, 'Y', NULL, 1, NULL, NULL, 'specialTopicList', NULL, 0, 16041); | |||
| INSERT INTO `mallink`.`mall_permission` (`id`, `name`, `parent_id`, `available`, `permission`, `resource_type`, `module_color`, `module_color_num`, `url`, `icon`, `version_type`, `sort`) VALUES (16042, '抽奖活动', 1604, 'Y', NULL, 1, NULL, NULL, 'prizeDrawList', NULL, 0, 16042); | |||
| INSERT INTO `mallink`.`mall_permission` (`id`, `name`, `parent_id`, `available`, `permission`, `resource_type`, `module_color`, `module_color_num`, `url`, `icon`, `version_type`, `sort`) VALUES (16043, '赠礼活动', 1604, 'Y', NULL, 1, NULL, NULL, 'amountGiftList', NULL, 0, 16043); | |||
| INSERT INTO `mallink`.`mall_permission` (`id`, `name`, `parent_id`, `available`, `permission`, `resource_type`, `module_color`, `module_color_num`, `url`, `icon`, `version_type`, `sort`) VALUES (16044, '返现活动', 1604, 'Y', NULL, 1, NULL, NULL, 'cashBackList', NULL, 0, 16044); | |||
| UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 3, 4, 5, 6, 7, 8, 81, 82, 83, 84, 85, 86, 87, 9, 10, 11, 50, 101, 102, 103, 104, 105, 106, 107, 108, 109, 201, 202, 203, 204, 205, 206, 209, 210, 211, 212, 213, 221, 222, 224, 225, 228, 251, 261, 299, 300, 301, 302, 303, 304, 305, 306, 309, 30901, 30902, 310, 31001, 31002, 31003, 311, 312, 313, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 41901, 41902, 41903, 41904, 41905, 41906, 41907, 41908, 41909, 41910, 420, 421, 422, 423, 425, 426, 431, 432, 433, 434, 435, 436, 437, 438, 439, 43901, 43902, 43903, 43904, 43905, 43906, 43907, 440, 44001, 44002, 44003, 44004, 44005, 44006, 44007, 44008, 44009, 44010, 44011, 502, 503, 504, 505, 506, 507, 508, 509, 511, 512, 513, 514, 521, 522, 523, 531, 532, 533, 591, 592, 595, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 616, 617, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 651, 652, 653, 661, 662, 663, 664, 665, 666, 667, 668, 671, 672, 673, 674, 675, 681, 682, 683, 684, 685, 687, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 713, 714, 715, 901, 902, 903, 904, 905, 906, 907, 908, 910, 931, 932, 951, 952, 961, 962, 963, 965, 966, 967, 968, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1604, 16041, 16042, 16043, 16044, 5502, 6610, 6611, 41701, 41702, 41703, 60701, 60702, 61201, 71102]' WHERE `id` = 1; | |||
| UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 3, 4, 5, 6, 7, 8, 81, 82, 83, 84, 85, 86, 87, 9, 10, 11, 50, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 201, 202, 203, 204, 205, 206, 209, 210, 211, 212, 213, 221, 222, 223, 224, 225, 228, 251, 261, 299, 300, 301, 302, 303, 304, 305, 306, 309, 30901, 30902, 310, 31001, 31002, 31003, 311, 312, 313, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 41901, 41902, 41903, 41904, 41905, 41906, 41907, 41908, 41909, 41910, 420, 421, 422, 423, 425, 426, 431, 432, 433, 434, 435, 436, 437, 438, 439, 43901, 43902, 43903, 43904, 43905, 43906, 43907, 440, 44001, 44002, 44003, 44004, 44005, 44006, 44007, 44008, 44009, 44010, 44011, 502, 503, 504, 505, 506, 507, 508, 509, 511, 512, 513, 514, 521, 522, 523, 531, 532, 533, 591, 592, 595, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 615, 616, 617, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 647, 651, 652, 653, 661, 662, 663, 664, 665, 666, 667, 668, 671, 672, 673, 674, 675, 676, 680, 681, 682, 683, 684, 685, 687, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 713, 714, 715, 901, 902, 903, 904, 905, 906, 907, 908, 910, 931, 932, 951, 952, 961, 962, 963, 965, 966, 967, 968, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1604, 16041, 16042, 16043, 16044, 5502, 6610, 6611, 41701, 41702, 41703, 60701, 60702, 61201, 61202, 61501, 61502, 71102]' WHERE `id` = 12; | |||
| @@ -0,0 +1,78 @@ | |||
| package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.IdType; | |||
| import com.baomidou.mybatisplus.annotation.TableField; | |||
| import com.baomidou.mybatisplus.annotation.TableId; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import java.math.BigDecimal; | |||
| import java.util.Date; | |||
| import lombok.Data; | |||
| /** | |||
| * 线下活动奖项 | |||
| * @TableName wx_vtwo_activity_award | |||
| */ | |||
| @TableName(value ="wx_vtwo_activity_award") | |||
| @Data | |||
| public class WxVtwoActivityAward extends TenantEntity { | |||
| /** | |||
| * 主键ID | |||
| */ | |||
| @TableId(value = "id") | |||
| private Long id; | |||
| /** | |||
| * 活动id | |||
| */ | |||
| @TableField(value = "activity_id") | |||
| private Long activityId; | |||
| /** | |||
| * 奖项等级 | |||
| */ | |||
| @TableField(value = "grade") | |||
| private Integer grade; | |||
| /** | |||
| * 奖项名称 | |||
| */ | |||
| @TableField(value = "name") | |||
| private String name; | |||
| /** | |||
| * 奖项价值 | |||
| */ | |||
| @TableField(value = "price") | |||
| private BigDecimal price; | |||
| /** | |||
| * 分担规则(0-商管 1-商户 2-分担) | |||
| */ | |||
| @TableField(value = "share_rule") | |||
| private Integer shareRule; | |||
| /** | |||
| * 商管分担比例 | |||
| */ | |||
| @TableField(value = "mall_share_rate") | |||
| private BigDecimal mallShareRate; | |||
| /** | |||
| * 商户分担比例 | |||
| */ | |||
| @TableField(value = "merchant_share_rate") | |||
| private BigDecimal merchantShareRate; | |||
| /** | |||
| * 创建时间 | |||
| */ | |||
| @TableField(value = "create_date") | |||
| private Date createDate; | |||
| /** | |||
| * 更新时间 | |||
| */ | |||
| @TableField(value = "update_date") | |||
| private Date updateDate; | |||
| } | |||
| @@ -0,0 +1,126 @@ | |||
| package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.IdType; | |||
| import com.baomidou.mybatisplus.annotation.TableField; | |||
| import com.baomidou.mybatisplus.annotation.TableId; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import java.math.BigDecimal; | |||
| import java.util.Date; | |||
| import lombok.Data; | |||
| /** | |||
| * 线下活动发奖 | |||
| * @TableName wx_vtwo_activity_grant | |||
| */ | |||
| @TableName(value ="wx_vtwo_activity_grant") | |||
| @Data | |||
| public class WxVtwoActivityGrant extends TenantEntity { | |||
| /** | |||
| * 主键ID | |||
| */ | |||
| @TableId(value = "id") | |||
| private Long id; | |||
| /** | |||
| * 活动ID | |||
| */ | |||
| @TableField(value = "activity_id") | |||
| private Long activityId; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(value = "activity_name") | |||
| private String activityName; | |||
| /** | |||
| * 订单总金额 | |||
| */ | |||
| @TableField(value = "order_money_sum") | |||
| private BigDecimal orderMoneySum; | |||
| /** | |||
| * 订单数量 | |||
| */ | |||
| @TableField(value = "order_count") | |||
| private Integer orderCount; | |||
| /** | |||
| * 客户姓名 | |||
| */ | |||
| @TableField(value = "cus_name") | |||
| private String cusName; | |||
| /** | |||
| * 客户电话 | |||
| */ | |||
| @TableField(value = "cus_phone") | |||
| private String cusPhone; | |||
| /** | |||
| * 抽奖券编码 | |||
| */ | |||
| @TableField(value = "lottery_num") | |||
| private String lotteryNum; | |||
| /** | |||
| * 抽奖券数量 | |||
| */ | |||
| @TableField(value = "lottery_count") | |||
| private Integer lotteryCount; | |||
| /** | |||
| * 周年庆抽奖编码 | |||
| */ | |||
| @TableField(value = "anniversary_lottery_num") | |||
| private String anniversaryLotteryNum; | |||
| /** | |||
| * 实际领奖人 | |||
| */ | |||
| @TableField(value = "real_name") | |||
| private String realName; | |||
| /** | |||
| * 实际领奖人身份证号 | |||
| */ | |||
| @TableField(value = "real_card") | |||
| private String realCard; | |||
| /** | |||
| * 备注 | |||
| */ | |||
| @TableField(value = "remark") | |||
| private String remark; | |||
| /** | |||
| * 签名图片 | |||
| */ | |||
| @TableField(value = "sign_img") | |||
| private String signImg; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(value = "status") | |||
| private Integer status; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(value = "create_by") | |||
| private Long createBy; | |||
| /** | |||
| * 创建时间 | |||
| */ | |||
| @TableField(value = "create_date") | |||
| private Date createDate; | |||
| /** | |||
| * 更新时间 | |||
| */ | |||
| @TableField(value = "update_date") | |||
| private Date updateDate; | |||
| } | |||
| @@ -0,0 +1,150 @@ | |||
| package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.IdType; | |||
| import com.baomidou.mybatisplus.annotation.TableField; | |||
| import com.baomidou.mybatisplus.annotation.TableId; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import java.math.BigDecimal; | |||
| import java.util.Date; | |||
| import lombok.Data; | |||
| /** | |||
| * 线下活动发放奖励 | |||
| * @TableName wx_vtwo_activity_grant_award | |||
| */ | |||
| @TableName(value ="wx_vtwo_activity_grant_award") | |||
| @Data | |||
| public class WxVtwoActivityGrantAward extends TenantEntity { | |||
| /** | |||
| * | |||
| */ | |||
| @TableId(value = "id") | |||
| private Long id; | |||
| /** | |||
| * 活动id | |||
| */ | |||
| @TableField(value = "activity_id") | |||
| private Long activityId; | |||
| /** | |||
| * 活动名称 | |||
| */ | |||
| @TableField(value = "activity_name") | |||
| private String activityName; | |||
| /** | |||
| * 发放id | |||
| */ | |||
| @TableField(value = "grant_id") | |||
| private Long grantId; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(value = "order_id") | |||
| private Long orderId; | |||
| /** | |||
| * 订单金额/总金额 | |||
| */ | |||
| @TableField(value = "order_amount") | |||
| private BigDecimal orderAmount; | |||
| /** | |||
| * 金额/联单 | |||
| */ | |||
| @TableField(value = "mode_type") | |||
| private Integer modeType; | |||
| /** | |||
| * 奖项限制最小金额 | |||
| */ | |||
| @TableField(value = "min_amount") | |||
| private BigDecimal minAmount; | |||
| /** | |||
| * 奖项限制最大金额 | |||
| */ | |||
| @TableField(value = "max_amount") | |||
| private BigDecimal maxAmount; | |||
| /** | |||
| * 联单笔数 | |||
| */ | |||
| @TableField(value = "related_count") | |||
| private Integer relatedCount; | |||
| /** | |||
| * 奖项id | |||
| */ | |||
| @TableField(value = "award_id") | |||
| private Long awardId; | |||
| /** | |||
| * 奖项等级 | |||
| */ | |||
| @TableField(value = "award_grade") | |||
| private Integer awardGrade; | |||
| /** | |||
| * 奖项名称 | |||
| */ | |||
| @TableField(value = "award_name") | |||
| private String awardName; | |||
| /** | |||
| * 奖项价值 | |||
| */ | |||
| @TableField(value = "award_price") | |||
| private BigDecimal awardPrice; | |||
| /** | |||
| * 奖项数量 | |||
| */ | |||
| @TableField(value = "award_count") | |||
| private Integer awardCount; | |||
| /** | |||
| * 实际发放价值 | |||
| */ | |||
| @TableField(value = "grant_price") | |||
| private BigDecimal grantPrice; | |||
| /** | |||
| * 分担规则(0-商管 1-商户 2-分担) | |||
| */ | |||
| @TableField(value = "money_rule") | |||
| private Integer moneyRule; | |||
| /** | |||
| * 商管分担比例 | |||
| */ | |||
| @TableField(value = "mall_share_rate") | |||
| private BigDecimal mallShareRate; | |||
| /** | |||
| * 商户分担比例 | |||
| */ | |||
| @TableField(value = "merchant_share_rate") | |||
| private BigDecimal merchantShareRate; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(value = "status") | |||
| private Integer status; | |||
| /** | |||
| * 创建时间 | |||
| */ | |||
| @TableField(value = "create_date") | |||
| private Date createDate; | |||
| /** | |||
| * 更新时间 | |||
| */ | |||
| @TableField(value = "update_date") | |||
| private Date updateDate; | |||
| } | |||
| @@ -0,0 +1,282 @@ | |||
| package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.IdType; | |||
| import com.baomidou.mybatisplus.annotation.TableField; | |||
| import com.baomidou.mybatisplus.annotation.TableId; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import java.math.BigDecimal; | |||
| import java.util.Date; | |||
| import lombok.Data; | |||
| /** | |||
| * 线下活动发放奖励导出 | |||
| * @TableName wx_vtwo_activity_grant_export | |||
| */ | |||
| @TableName(value ="wx_vtwo_activity_grant_export") | |||
| @Data | |||
| public class WxVtwoActivityGrantExport extends TenantEntity { | |||
| /** | |||
| * | |||
| */ | |||
| @TableId(value = "id") | |||
| private Long id; | |||
| /** | |||
| * 活动id | |||
| */ | |||
| @TableField(value = "activity_id") | |||
| private Long activityId; | |||
| /** | |||
| * 订单id | |||
| */ | |||
| @TableField(value = "order_id") | |||
| private Long orderId; | |||
| /** | |||
| * 订单号 | |||
| */ | |||
| @TableField(value = "order_no") | |||
| private String orderNo; | |||
| /** | |||
| * 订单金额 | |||
| */ | |||
| @TableField(value = "order_amount") | |||
| private BigDecimal orderAmount; | |||
| /** | |||
| * 商户编号 | |||
| */ | |||
| @TableField(value = "merchant_id") | |||
| private Long merchantId; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(value = "merchant_name") | |||
| private String merchantName; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(value = "merchant_shop_num") | |||
| private String merchantShopNum; | |||
| /** | |||
| * 业态 | |||
| */ | |||
| @TableField(value = "business_id") | |||
| private Integer businessId; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(value = "business_name") | |||
| private String businessName; | |||
| /** | |||
| * 抽奖券编码 | |||
| */ | |||
| @TableField(value = "lottery_num") | |||
| private String lotteryNum; | |||
| /** | |||
| * 抽奖券数量 | |||
| */ | |||
| @TableField(value = "lottery_count") | |||
| private Integer lotteryCount; | |||
| /** | |||
| * 周年庆抽奖编码 | |||
| */ | |||
| @TableField(value = "anniversary_lottery_num") | |||
| private String anniversaryLotteryNum; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(value = "order_create_time") | |||
| private Date orderCreateTime; | |||
| /** | |||
| * 审批状态 | |||
| */ | |||
| @TableField(value = "order_audit_status") | |||
| private Integer orderAuditStatus; | |||
| /** | |||
| * 审核人 | |||
| */ | |||
| @TableField(value = "order_audit_by") | |||
| private Long orderAuditBy; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(value = "order_audit_name") | |||
| private String orderAuditName; | |||
| /** | |||
| * 审批意见 | |||
| */ | |||
| @TableField(value = "order_audit_remark") | |||
| private String orderAuditRemark; | |||
| /** | |||
| * 审核时间 | |||
| */ | |||
| @TableField(value = "order_audit_time") | |||
| private Date orderAuditTime; | |||
| /** | |||
| * 会员卡号 | |||
| */ | |||
| @TableField(value = "vip_num") | |||
| private String vipNum; | |||
| /** | |||
| * 客户姓名 | |||
| */ | |||
| @TableField(value = "cus_name") | |||
| private String cusName; | |||
| /** | |||
| * 客户电话 | |||
| */ | |||
| @TableField(value = "cus_phone") | |||
| private String cusPhone; | |||
| /** | |||
| * 身份证号 | |||
| */ | |||
| @TableField(value = "cus_card") | |||
| private String cusCard; | |||
| /** | |||
| * 客户地址 | |||
| */ | |||
| @TableField(value = "cus_address") | |||
| private String cusAddress; | |||
| /** | |||
| * 所属军团 | |||
| */ | |||
| @TableField(value = "legion_id") | |||
| private Long legionId; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(value = "legion_name") | |||
| private String legionName; | |||
| /** | |||
| * 所属联盟 | |||
| */ | |||
| @TableField(value = "union_id") | |||
| private Long unionId; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(value = "union_name") | |||
| private String unionName; | |||
| /** | |||
| * 发奖id | |||
| */ | |||
| @TableField(value = "grant_id") | |||
| private Long grantId; | |||
| /** | |||
| * 实际领奖人 | |||
| */ | |||
| @TableField(value = "grant_user_name") | |||
| private String grantUserName; | |||
| /** | |||
| * 实际领奖人身份证号 | |||
| */ | |||
| @TableField(value = "grant_user_card") | |||
| private String grantUserCard; | |||
| /** | |||
| * 发奖人 | |||
| */ | |||
| @TableField(value = "grant_by") | |||
| private Long grantBy; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(value = "grant_by_name") | |||
| private String grantByName; | |||
| /** | |||
| * 发奖时间 | |||
| */ | |||
| @TableField(value = "grant_time") | |||
| private Date grantTime; | |||
| /** | |||
| * 备注 | |||
| */ | |||
| @TableField(value = "grant_remark") | |||
| private String grantRemark; | |||
| /** | |||
| * 签名图片 | |||
| */ | |||
| @TableField(value = "sign_img") | |||
| private String signImg; | |||
| /** | |||
| * 发放结算详情 | |||
| */ | |||
| @TableField(value = "grant_detail") | |||
| private String grantDetail; | |||
| /** | |||
| * 发放总价值 | |||
| */ | |||
| @TableField(value = "grant_price") | |||
| private BigDecimal grantPrice; | |||
| /** | |||
| * 订单商管承担总金额 | |||
| */ | |||
| @TableField(value = "mall_share_price") | |||
| private BigDecimal mallSharePrice; | |||
| /** | |||
| * 订单商户承担总金额 | |||
| */ | |||
| @TableField(value = "merchant_share_price") | |||
| private BigDecimal merchantSharePrice; | |||
| /** | |||
| * 商管承担比率 | |||
| */ | |||
| @TableField(value = "mall_share_rate") | |||
| private BigDecimal mallShareRate; | |||
| /** | |||
| * 商户承担比率 | |||
| */ | |||
| @TableField(value = "merchant_share_rate") | |||
| private BigDecimal merchantShareRate; | |||
| /** | |||
| * 税点金额 | |||
| */ | |||
| @TableField(value = "tax_amount") | |||
| private BigDecimal taxAmount; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(value = "status") | |||
| private Integer status; | |||
| } | |||
| @@ -0,0 +1,46 @@ | |||
| package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.IdType; | |||
| import com.baomidou.mybatisplus.annotation.TableField; | |||
| import com.baomidou.mybatisplus.annotation.TableId; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import lombok.Data; | |||
| /** | |||
| * 线下活动发奖订单 | |||
| * @TableName wx_vtwo_activity_grant_order | |||
| */ | |||
| @TableName(value ="wx_vtwo_activity_grant_order") | |||
| @Data | |||
| public class WxVtwoActivityGrantOrder extends TenantEntity { | |||
| /** | |||
| * | |||
| */ | |||
| @TableId(value = "id") | |||
| private Long id; | |||
| /** | |||
| * 发放id | |||
| */ | |||
| @TableField(value = "grant_id") | |||
| private Long grantId; | |||
| /** | |||
| * 订单id | |||
| */ | |||
| @TableField(value = "order_id") | |||
| private Long orderId; | |||
| /** | |||
| * 是否参与总金额计算 | |||
| */ | |||
| @TableField(value = "is_amount") | |||
| private Integer isAmount; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(value = "status") | |||
| private Integer status; | |||
| } | |||
| @@ -0,0 +1,138 @@ | |||
| package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.IdType; | |||
| import com.baomidou.mybatisplus.annotation.TableField; | |||
| import com.baomidou.mybatisplus.annotation.TableId; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import java.math.BigDecimal; | |||
| import java.util.Date; | |||
| import lombok.Data; | |||
| /** | |||
| * 线下活动发放奖励结算 | |||
| * @TableName wx_vtwo_activity_grant_settlement | |||
| */ | |||
| @TableName(value ="wx_vtwo_activity_grant_settlement") | |||
| @Data | |||
| public class WxVtwoActivityGrantSettlement extends TenantEntity { | |||
| /** | |||
| * | |||
| */ | |||
| @TableId(value = "id") | |||
| private Long id; | |||
| /** | |||
| * 活动id | |||
| */ | |||
| @TableField(value = "activity_id") | |||
| private Long activityId; | |||
| /** | |||
| * 发奖id | |||
| */ | |||
| @TableField(value = "grant_id") | |||
| private Long grantId; | |||
| /** | |||
| * 发放奖励记录id | |||
| */ | |||
| @TableField(value = "grant_award_id") | |||
| private Long grantAwardId; | |||
| /** | |||
| * 奖项id | |||
| */ | |||
| @TableField(value = "award_id") | |||
| private Long awardId; | |||
| /** | |||
| * 发放总价值 | |||
| */ | |||
| @TableField(value = "grant_price") | |||
| private BigDecimal grantPrice; | |||
| /** | |||
| * 订单id | |||
| */ | |||
| @TableField(value = "order_id") | |||
| private Long orderId; | |||
| /** | |||
| * 订单编号 | |||
| */ | |||
| @TableField(value = "order_no") | |||
| private String orderNo; | |||
| /** | |||
| * 订单金额 | |||
| */ | |||
| @TableField(value = "order_amount") | |||
| private BigDecimal orderAmount; | |||
| /** | |||
| * 商户id | |||
| */ | |||
| @TableField(value = "merchant_id") | |||
| private Long merchantId; | |||
| /** | |||
| * 订单占比 | |||
| */ | |||
| @TableField(value = "order_ratio") | |||
| private BigDecimal orderRatio; | |||
| /** | |||
| * 订单发放总价值 | |||
| */ | |||
| @TableField(value = "order_grant_price") | |||
| private BigDecimal orderGrantPrice; | |||
| /** | |||
| * 商管承担比率 | |||
| */ | |||
| @TableField(value = "mall_share_rate") | |||
| private BigDecimal mallShareRate; | |||
| /** | |||
| * 商户承担比率 | |||
| */ | |||
| @TableField(value = "merchant_share_rate") | |||
| private BigDecimal merchantShareRate; | |||
| /** | |||
| * 订单商管承担总金额 | |||
| */ | |||
| @TableField(value = "order_mall_share_price") | |||
| private BigDecimal orderMallSharePrice; | |||
| /** | |||
| * 订单商户承担总金额 | |||
| */ | |||
| @TableField(value = "order_merchant_share_price") | |||
| private BigDecimal orderMerchantSharePrice; | |||
| /** | |||
| * 税点金额 | |||
| */ | |||
| @TableField(value = "tax_amount") | |||
| private BigDecimal taxAmount; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(value = "status") | |||
| private Integer status; | |||
| /** | |||
| * 创建时间 | |||
| */ | |||
| @TableField(value = "create_date") | |||
| private Date createDate; | |||
| /** | |||
| * 更新时间 | |||
| */ | |||
| @TableField(value = "update_date") | |||
| private Date updateDate; | |||
| } | |||
| @@ -0,0 +1,37 @@ | |||
| package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.IdType; | |||
| import com.baomidou.mybatisplus.annotation.TableField; | |||
| import com.baomidou.mybatisplus.annotation.TableId; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import lombok.Data; | |||
| /** | |||
| * 线下活动商户 | |||
| * @TableName wx_vtwo_activity_merchant | |||
| */ | |||
| @TableName(value ="wx_vtwo_activity_merchant") | |||
| @Data | |||
| public class WxVtwoActivityMerchant extends TenantEntity { | |||
| /** | |||
| * 主键ID | |||
| */ | |||
| @TableId(value = "id") | |||
| private Long id; | |||
| /** | |||
| * 活动ID | |||
| */ | |||
| @TableField(value = "activity_id") | |||
| private Long activityId; | |||
| /** | |||
| * 商户ID | |||
| */ | |||
| @TableField(value = "merchant_id") | |||
| private Long merchantId; | |||
| @TableField(exist = false) | |||
| private WxMerchant merchant; | |||
| } | |||
| @@ -0,0 +1,211 @@ | |||
| package com.iformall.domain.po; | |||
| import cn.afterturn.easypoi.excel.annotation.Excel; | |||
| import com.baomidou.mybatisplus.annotation.IdType; | |||
| import com.baomidou.mybatisplus.annotation.TableField; | |||
| import com.baomidou.mybatisplus.annotation.TableId; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import java.math.BigDecimal; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| import lombok.Data; | |||
| /** | |||
| * 线下活动参与登记 | |||
| * @TableName wx_vtwo_activity_order | |||
| */ | |||
| @TableName(value ="wx_vtwo_activity_order") | |||
| @Data | |||
| public class WxVtwoActivityOrder extends TenantEntity { | |||
| /** | |||
| * 主键ID | |||
| */ | |||
| @TableId(value = "id") | |||
| private Long id; | |||
| /** | |||
| * 来源用户ID | |||
| */ | |||
| @TableField(value = "from_user_id") | |||
| private Long fromUserId; | |||
| /** | |||
| * 会员卡号 | |||
| */ | |||
| @TableField(value = "vip_num") | |||
| private String vipNum; | |||
| /** | |||
| * 客户姓名 | |||
| */ | |||
| @TableField(value = "cus_name") | |||
| private String cusName; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(value = "real_cus_name") | |||
| private String realCusName; | |||
| /** | |||
| * 客户电话 | |||
| */ | |||
| @TableField(value = "cus_phone") | |||
| private String cusPhone; | |||
| /** | |||
| * 身份证号 | |||
| */ | |||
| @TableField(value = "cus_card") | |||
| private String cusCard; | |||
| /** | |||
| * 客户地址 | |||
| */ | |||
| @TableField(value = "cus_address") | |||
| private String cusAddress; | |||
| /** | |||
| * 所属军团 | |||
| */ | |||
| @TableField(value = "legion_id") | |||
| private Long legionId; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(value = "legion_name") | |||
| private String legionName; | |||
| /** | |||
| * 所属联盟 | |||
| */ | |||
| @TableField(value = "union_id") | |||
| private Long unionId; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(value = "union_name") | |||
| private String unionName; | |||
| /** | |||
| * 来源订单ID | |||
| */ | |||
| @TableField(value = "from_order_id") | |||
| private Long fromOrderId; | |||
| /** | |||
| * 订单号 | |||
| */ | |||
| @TableField(value = "order_no") | |||
| private String orderNo; | |||
| /** | |||
| * 订单金额 | |||
| */ | |||
| @TableField(value = "order_amount") | |||
| private BigDecimal orderAmount; | |||
| /** | |||
| * 商户编号 | |||
| */ | |||
| @TableField(value = "merchant_id") | |||
| private Long merchantId; | |||
| // @Excel(name = "商户名称", width = 20, orderNum = "6") | |||
| @TableField(exist = false) | |||
| private String merchantName; | |||
| // @Excel(name="商铺号",width = 20,orderNum = "7") | |||
| @TableField(exist = false) | |||
| private String shopNumber; | |||
| @TableField(exist = false) | |||
| private List<Long> merchantIdList; | |||
| @TableField(exist = false) | |||
| private List<Long> notMerchantIdList; | |||
| /** | |||
| * 业态 | |||
| */ | |||
| @TableField(value = "business_id") | |||
| private Integer businessId; | |||
| @TableField(exist = false) | |||
| private String businessName; | |||
| /** | |||
| * 抽奖券编码 | |||
| */ | |||
| @TableField(value = "lottery_num") | |||
| private String lotteryNum; | |||
| /** | |||
| * 抽奖券数量 | |||
| */ | |||
| @TableField(value = "lottery_count") | |||
| private Integer lotteryCount; | |||
| /** | |||
| * 周年庆抽奖编码 | |||
| */ | |||
| @TableField(value = "anniversary_lottery_num") | |||
| private String anniversaryLotteryNum; | |||
| /** | |||
| * 审批状态 | |||
| */ | |||
| @TableField(value = "audit_status") | |||
| private Integer auditStatus; | |||
| /** | |||
| * 审批意见 | |||
| */ | |||
| @TableField(value = "audit_remark") | |||
| private String auditRemark; | |||
| /** | |||
| * 审核人 | |||
| */ | |||
| @TableField(value = "audit_by") | |||
| private Long auditBy; | |||
| /** | |||
| * 审核时间 | |||
| */ | |||
| @TableField(value = "audit_time") | |||
| private Date auditTime; | |||
| /** | |||
| * 积分变动值 | |||
| */ | |||
| @TableField(value = "increased_points") | |||
| private Integer increasedPoints; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(value = "create_by") | |||
| private Long createBy; | |||
| @Excel(name = "审核人", width = 20, orderNum = "14") | |||
| @TableField(exist = false) | |||
| private String auditByName; | |||
| /** | |||
| * 创建时间 | |||
| */ | |||
| @TableField(value = "create_date") | |||
| private Date createDate; | |||
| @TableField(exist = false) | |||
| private Date createDateBegin; | |||
| @TableField(exist = false) | |||
| private Date createDateEnd; | |||
| /** | |||
| * 更新时间 | |||
| */ | |||
| @TableField(value = "update_date") | |||
| private Date updateDate; | |||
| } | |||
| @@ -0,0 +1,71 @@ | |||
| package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.IdType; | |||
| import com.baomidou.mybatisplus.annotation.TableField; | |||
| import com.baomidou.mybatisplus.annotation.TableId; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import java.util.Date; | |||
| import lombok.Data; | |||
| /** | |||
| * 线下活动专题 | |||
| * @TableName wx_vtwo_activity_special_topic | |||
| */ | |||
| @TableName(value ="wx_vtwo_activity_special_topic") | |||
| @Data | |||
| public class WxVtwoActivitySpecialTopic extends TenantEntity { | |||
| /** | |||
| * 主键ID | |||
| */ | |||
| @TableId(value = "id") | |||
| private Long id; | |||
| /** | |||
| * 专题名称 | |||
| */ | |||
| @TableField(value = "name") | |||
| private String name; | |||
| /** | |||
| * 开始时间 | |||
| */ | |||
| @TableField(value = "start_time") | |||
| private Date startTime; | |||
| /** | |||
| * 结束时间 | |||
| */ | |||
| @TableField(value = "end_time") | |||
| private Date endTime; | |||
| /** | |||
| * 积分开关 | |||
| */ | |||
| @TableField(value = "credit_on_off") | |||
| private Integer creditOnOff; | |||
| /** | |||
| * 积分配置 | |||
| */ | |||
| @TableField(value = "credit_config") | |||
| private String creditConfig; | |||
| /** | |||
| * 状态 | |||
| */ | |||
| @TableField(value = "status") | |||
| private Integer status; | |||
| /** | |||
| * 创建时间 | |||
| */ | |||
| @TableField(value = "create_date") | |||
| private Date createDate; | |||
| /** | |||
| * 更新时间 | |||
| */ | |||
| @TableField(value = "update_date") | |||
| private Date updateDate; | |||
| } | |||
| @@ -0,0 +1,164 @@ | |||
| package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.IdType; | |||
| import com.baomidou.mybatisplus.annotation.TableField; | |||
| import com.baomidou.mybatisplus.annotation.TableId; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| import com.iformall.domain.vo.WxVtwoActivityRule; | |||
| import com.iformall.domain.vo.WxVtwoActivityRuleDetail; | |||
| import lombok.Data; | |||
| /** | |||
| * 线下满额赠礼活动 | |||
| * @TableName wx_vtwo_amount_gift_activity | |||
| */ | |||
| @TableName(value ="wx_vtwo_amount_gift_activity") | |||
| @Data | |||
| public class WxVtwoAmountGiftActivity extends TenantEntity { | |||
| /** | |||
| * 主键ID | |||
| */ | |||
| @TableId(value = "id") | |||
| private Long id; | |||
| /** | |||
| * 活动名称 | |||
| */ | |||
| @TableField(value = "name") | |||
| private String name; | |||
| /** | |||
| * 开始时间 | |||
| */ | |||
| @TableField(value = "start_time") | |||
| private Date startTime; | |||
| /** | |||
| * 结束时间 | |||
| */ | |||
| @TableField(value = "end_time") | |||
| private Date endTime; | |||
| /** | |||
| * 计算模式 | |||
| */ | |||
| @TableField(value = "amount_model") | |||
| private Integer amountModel; | |||
| /** | |||
| * 业态订单数量限制 | |||
| */ | |||
| @TableField(value = "business_order_limit") | |||
| private Integer businessOrderLimit; | |||
| /** | |||
| * 计算模式中奖规则 | |||
| */ | |||
| @TableField(value = "amount_rules") | |||
| private String amountRules; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(exist = false) | |||
| private List<WxVtwoActivityRuleDetail> amountRulesObject; | |||
| /** | |||
| * 联单模式 | |||
| */ | |||
| @TableField(value = "related_model") | |||
| private Integer relatedModel; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(value = "related_rules") | |||
| private String relatedRules; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(exist = false) | |||
| private List<WxVtwoActivityRuleDetail> relatedRulesObject; | |||
| /** | |||
| * 礼品总数量 | |||
| */ | |||
| @TableField(value = "awards_count") | |||
| private Integer awardsCount; | |||
| /** | |||
| * 商户规则 | |||
| */ | |||
| @TableField(value = "merchant_rule") | |||
| private Integer merchantRule; | |||
| @TableField(exist = false) | |||
| private List<Long> merchantIdList; | |||
| @TableField(exist = false) | |||
| private List<WxVtwoActivityMerchant> merchanList; | |||
| /** | |||
| * 活动状态 | |||
| */ | |||
| @TableField(value = "status") | |||
| private Integer status; | |||
| /** | |||
| * 创建时间 | |||
| */ | |||
| @TableField(value = "create_date") | |||
| private Date createDate; | |||
| /** | |||
| * 更新时间 | |||
| */ | |||
| @TableField(value = "update_date") | |||
| private Date updateDate; | |||
| @TableField(exist = false) | |||
| private List<WxVtwoActivityAward> awardList; | |||
| @TableField(exist = false) | |||
| private Date begin; | |||
| @TableField(exist = false) | |||
| private Date end; | |||
| /** | |||
| * 是否过期 | |||
| */ | |||
| @TableField(exist = false) | |||
| private Integer validStatus; | |||
| /** | |||
| * 参与订单数量 | |||
| */ | |||
| @TableField(exist = false) | |||
| private Integer orderCount; | |||
| /** | |||
| * 参与待审核订单数量 | |||
| */ | |||
| @TableField(exist = false) | |||
| private Integer waitOrderCount; | |||
| /** | |||
| * 参与已审核订单数量 | |||
| */ | |||
| @TableField(exist = false) | |||
| private Integer successOrderCount; | |||
| /** | |||
| * 参与商户数量 | |||
| */ | |||
| @TableField(exist = false) | |||
| private Integer mershantCount; | |||
| /** | |||
| * 发放订单数 | |||
| */ | |||
| @TableField(exist = false) | |||
| private Integer grantOrderCount; | |||
| } | |||
| @@ -0,0 +1,160 @@ | |||
| package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.IdType; | |||
| import com.baomidou.mybatisplus.annotation.TableField; | |||
| import com.baomidou.mybatisplus.annotation.TableId; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| import com.iformall.domain.vo.WxVtwoActivityTaxDeductionRule; | |||
| import lombok.Data; | |||
| /** | |||
| * 线下返现活动 | |||
| * @TableName wx_vtwo_cash_back_activity | |||
| */ | |||
| @TableName(value ="wx_vtwo_cash_back_activity") | |||
| @Data | |||
| public class WxVtwoCashBackActivity extends TenantEntity { | |||
| /** | |||
| * 主键ID | |||
| */ | |||
| @TableId(value = "id") | |||
| private Long id; | |||
| /** | |||
| * 活动名称 | |||
| */ | |||
| @TableField(value = "name") | |||
| private String name; | |||
| /** | |||
| * 开始时间 | |||
| */ | |||
| @TableField(value = "start_time") | |||
| private Date startTime; | |||
| /** | |||
| * 结束时间 | |||
| */ | |||
| @TableField(value = "end_time") | |||
| private Date endTime; | |||
| /** | |||
| * 计算模式 | |||
| */ | |||
| @TableField(value = "amount_model") | |||
| private Integer amountModel; | |||
| /** | |||
| * 业态订单数量限制 | |||
| */ | |||
| @TableField(value = "business_order_limit") | |||
| private Integer businessOrderLimit; | |||
| @TableField(exist = false) | |||
| private List<WxVtwoCashBackAward> amountRulesObject; | |||
| /** | |||
| * 联单模式 | |||
| */ | |||
| @TableField(value = "related_model") | |||
| private Integer relatedModel; | |||
| @TableField(exist = false) | |||
| private List<WxVtwoCashBackAward> relatedRulesObject; | |||
| /** | |||
| * 返现总金额限制 | |||
| */ | |||
| @TableField(value = "cash_back_limit") | |||
| private Integer cashBackLimit; | |||
| /** | |||
| * 返现计算规则 | |||
| */ | |||
| @TableField(value = "cash_back_rule") | |||
| private Integer cashBackRule; | |||
| /** | |||
| * 扣税规则 | |||
| */ | |||
| @TableField(value = "tax_deduction_rules") | |||
| private String taxDeductionRules; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(exist = false) | |||
| private WxVtwoActivityTaxDeductionRule taxDeductionRulesObject; | |||
| /** | |||
| * 商户规则 | |||
| */ | |||
| @TableField(value = "merchant_rule") | |||
| private Integer merchantRule; | |||
| @TableField(exist = false) | |||
| private List<Long> merchantIdList; | |||
| @TableField(exist = false) | |||
| private List<WxVtwoActivityMerchant> merchanList; | |||
| /** | |||
| * 活动状态 | |||
| */ | |||
| @TableField(value = "status") | |||
| private Integer status; | |||
| /** | |||
| * 创建时间 | |||
| */ | |||
| @TableField(value = "create_date") | |||
| private Date createDate; | |||
| /** | |||
| * 更新时间 | |||
| */ | |||
| @TableField(value = "update_date") | |||
| private Date updateDate; | |||
| @TableField(exist = false) | |||
| private Date begin; | |||
| @TableField(exist = false) | |||
| private Date end; | |||
| /** | |||
| * 是否过期 | |||
| */ | |||
| @TableField(exist = false) | |||
| private Integer validStatus; | |||
| /** | |||
| * 参与订单数量 | |||
| */ | |||
| @TableField(exist = false) | |||
| private Integer orderCount; | |||
| /** | |||
| * 参与待审核订单数量 | |||
| */ | |||
| @TableField(exist = false) | |||
| private Integer waitOrderCount; | |||
| /** | |||
| * 参与已审核订单数量 | |||
| */ | |||
| @TableField(exist = false) | |||
| private Integer successOrderCount; | |||
| /** | |||
| * 参与商户数量 | |||
| */ | |||
| @TableField(exist = false) | |||
| private Integer mershantCount; | |||
| /** | |||
| * 发放订单数 | |||
| */ | |||
| @TableField(exist = false) | |||
| private Integer grantOrderCount; | |||
| } | |||
| @@ -0,0 +1,102 @@ | |||
| package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.IdType; | |||
| import com.baomidou.mybatisplus.annotation.TableField; | |||
| import com.baomidou.mybatisplus.annotation.TableId; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import java.math.BigDecimal; | |||
| import java.util.Date; | |||
| import lombok.Data; | |||
| /** | |||
| * 线下返现活动奖项 | |||
| * @TableName wx_vtwo_cash_back_award | |||
| */ | |||
| @TableName(value ="wx_vtwo_cash_back_award") | |||
| @Data | |||
| public class WxVtwoCashBackAward extends TenantEntity { | |||
| /** | |||
| * 主键ID | |||
| */ | |||
| @TableId(value = "id") | |||
| private Long id; | |||
| /** | |||
| * 活动id | |||
| */ | |||
| @TableField(value = "activity_id") | |||
| private Long activityId; | |||
| /** | |||
| * 金额/联单 | |||
| */ | |||
| @TableField(value = "model_type") | |||
| private Integer modelType; | |||
| /** | |||
| * 限制最小金额 | |||
| */ | |||
| @TableField(value = "min_amount") | |||
| private BigDecimal minAmount; | |||
| /** | |||
| * 限制最大金额 | |||
| */ | |||
| @TableField(value = "max_amount") | |||
| private BigDecimal maxAmount; | |||
| /** | |||
| * 联单笔数 | |||
| */ | |||
| @TableField(value = "related_count") | |||
| private Integer relatedCount; | |||
| /** | |||
| * 奖品名称 | |||
| */ | |||
| @TableField(value = "name") | |||
| private String name; | |||
| /** | |||
| * 返现比例 | |||
| */ | |||
| @TableField(value = "cash_back_ratio") | |||
| private BigDecimal cashBackRatio; | |||
| /** | |||
| * 返现金额限制 | |||
| */ | |||
| @TableField(value = "cash_back_limit") | |||
| private Integer cashBackLimit; | |||
| /** | |||
| * 分担规则(0-商管 1-商户 2-分担) | |||
| */ | |||
| @TableField(value = "share_rule") | |||
| private Integer shareRule; | |||
| /** | |||
| * 商管分担比例 | |||
| */ | |||
| @TableField(value = "mall_share_rate") | |||
| private BigDecimal mallShareRate; | |||
| /** | |||
| * 商户分担比例 | |||
| */ | |||
| @TableField(value = "merchant_share_rate") | |||
| private BigDecimal merchantShareRate; | |||
| /** | |||
| * 创建时间 | |||
| */ | |||
| @TableField(value = "create_date") | |||
| private Date createDate; | |||
| /** | |||
| * 更新时间 | |||
| */ | |||
| @TableField(value = "update_date") | |||
| private Date updateDate; | |||
| } | |||
| @@ -0,0 +1,162 @@ | |||
| package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.IdType; | |||
| import com.baomidou.mybatisplus.annotation.TableField; | |||
| import com.baomidou.mybatisplus.annotation.TableId; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import java.math.BigDecimal; | |||
| import java.util.Date; | |||
| import lombok.Data; | |||
| /** | |||
| * 线下返现活动发奖 | |||
| * @TableName wx_vtwo_cash_back_grant | |||
| */ | |||
| @TableName(value ="wx_vtwo_cash_back_grant") | |||
| @Data | |||
| public class WxVtwoCashBackGrant extends TenantEntity { | |||
| /** | |||
| * 主键ID | |||
| */ | |||
| @TableId(value = "id") | |||
| private Long id; | |||
| /** | |||
| * 活动ID | |||
| */ | |||
| @TableField(value = "activity_id") | |||
| private Long activityId; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(value = "activity_name") | |||
| private String activityName; | |||
| /** | |||
| * 订单总金额 | |||
| */ | |||
| @TableField(value = "order_money_sum") | |||
| private BigDecimal orderMoneySum; | |||
| /** | |||
| * 订单数量 | |||
| */ | |||
| @TableField(value = "order_count") | |||
| private Integer orderCount; | |||
| /** | |||
| * 客户姓名 | |||
| */ | |||
| @TableField(value = "cus_name") | |||
| private String cusName; | |||
| /** | |||
| * 客户电话 | |||
| */ | |||
| @TableField(value = "cus_phone") | |||
| private String cusPhone; | |||
| /** | |||
| * 抽奖券编码 | |||
| */ | |||
| @TableField(value = "lottery_num") | |||
| private String lotteryNum; | |||
| /** | |||
| * 抽奖券数量 | |||
| */ | |||
| @TableField(value = "lottery_count") | |||
| private Integer lotteryCount; | |||
| /** | |||
| * 周年庆抽奖编码 | |||
| */ | |||
| @TableField(value = "anniversary_lottery_num") | |||
| private String anniversaryLotteryNum; | |||
| /** | |||
| * 实际领奖人 | |||
| */ | |||
| @TableField(value = "real_name") | |||
| private String realName; | |||
| /** | |||
| * 实际领奖人身份证号 | |||
| */ | |||
| @TableField(value = "real_card") | |||
| private String realCard; | |||
| /** | |||
| * 返现金额限制 | |||
| */ | |||
| @TableField(value = "cash_back_limit") | |||
| private BigDecimal cashBackLimit; | |||
| /** | |||
| * 返现金额计算规则 | |||
| */ | |||
| @TableField(value = "cash_back_rule") | |||
| private Integer cashBackRule; | |||
| /** | |||
| * 返现金额 | |||
| */ | |||
| @TableField(value = "cash_back") | |||
| private BigDecimal cashBack; | |||
| /** | |||
| * 扣税规则 | |||
| */ | |||
| @TableField(value = "tax_deduction_rules") | |||
| private String taxDeductionRules; | |||
| /** | |||
| * 税点金额 | |||
| */ | |||
| @TableField(value = "tax_amount") | |||
| private BigDecimal taxAmount; | |||
| /** | |||
| * 实际返现金额 | |||
| */ | |||
| @TableField(value = "real_cash_back") | |||
| private BigDecimal realCashBack; | |||
| /** | |||
| * 备注 | |||
| */ | |||
| @TableField(value = "remark") | |||
| private String remark; | |||
| /** | |||
| * 签名图片 | |||
| */ | |||
| @TableField(value = "sign_img") | |||
| private String signImg; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(value = "status") | |||
| private Integer status; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(value = "create_by") | |||
| private Long createBy; | |||
| /** | |||
| * 创建时间 | |||
| */ | |||
| @TableField(value = "create_date") | |||
| private Date createDate; | |||
| /** | |||
| * 更新时间 | |||
| */ | |||
| @TableField(value = "update_date") | |||
| private Date updateDate; | |||
| } | |||
| @@ -0,0 +1,156 @@ | |||
| package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.IdType; | |||
| import com.baomidou.mybatisplus.annotation.TableField; | |||
| import com.baomidou.mybatisplus.annotation.TableId; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import java.math.BigDecimal; | |||
| import java.util.Date; | |||
| import lombok.Data; | |||
| /** | |||
| * 线下返现活动发放奖励 | |||
| * @TableName wx_vtwo_cash_back_grant_award | |||
| */ | |||
| @TableName(value ="wx_vtwo_cash_back_grant_award") | |||
| @Data | |||
| public class WxVtwoCashBackGrantAward extends TenantEntity { | |||
| /** | |||
| * | |||
| */ | |||
| @TableId(value = "id") | |||
| private Long id; | |||
| /** | |||
| * 活动id | |||
| */ | |||
| @TableField(value = "activity_id") | |||
| private Long activityId; | |||
| /** | |||
| * 活动名称 | |||
| */ | |||
| @TableField(value = "activity_name") | |||
| private String activityName; | |||
| /** | |||
| * 发放id | |||
| */ | |||
| @TableField(value = "grant_id") | |||
| private Long grantId; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(value = "record_id") | |||
| private Long recordId; | |||
| /** | |||
| * 订单金额/总金额 | |||
| */ | |||
| @TableField(value = "order_amount") | |||
| private BigDecimal orderAmount; | |||
| /** | |||
| * 金额/联单 | |||
| */ | |||
| @TableField(value = "mode_type") | |||
| private Integer modeType; | |||
| /** | |||
| * 奖项限制最小金额 | |||
| */ | |||
| @TableField(value = "min_amount") | |||
| private BigDecimal minAmount; | |||
| /** | |||
| * 奖项限制最大金额 | |||
| */ | |||
| @TableField(value = "max_amount") | |||
| private BigDecimal maxAmount; | |||
| /** | |||
| * 联单笔数 | |||
| */ | |||
| @TableField(value = "related_count") | |||
| private Integer relatedCount; | |||
| /** | |||
| * 奖项id | |||
| */ | |||
| @TableField(value = "award_id") | |||
| private Long awardId; | |||
| /** | |||
| * 奖项名称 | |||
| */ | |||
| @TableField(value = "award_name") | |||
| private String awardName; | |||
| /** | |||
| * 返现比例 | |||
| */ | |||
| @TableField(value = "cash_back_ratio") | |||
| private BigDecimal cashBackRatio; | |||
| /** | |||
| * 返现计算规则 | |||
| */ | |||
| @TableField(value = "cash_back_rule") | |||
| private Integer cashBackRule; | |||
| /** | |||
| * 返现金额 | |||
| */ | |||
| @TableField(value = "cash_back") | |||
| private BigDecimal cashBack; | |||
| /** | |||
| * 分担规则(0-商管 1-商户 2-分担) | |||
| */ | |||
| @TableField(value = "money_rule") | |||
| private Integer moneyRule; | |||
| /** | |||
| * 商管分担比例 | |||
| */ | |||
| @TableField(value = "mall_share_rate") | |||
| private BigDecimal mallShareRate; | |||
| /** | |||
| * 商户分担比例 | |||
| */ | |||
| @TableField(value = "merchant_share_rate") | |||
| private BigDecimal merchantShareRate; | |||
| /** | |||
| * 扣税规则 | |||
| */ | |||
| @TableField(value = "tax_deduction_rules") | |||
| private String taxDeductionRules; | |||
| /** | |||
| * 税点金额 | |||
| */ | |||
| @TableField(value = "tax_amount") | |||
| private BigDecimal taxAmount; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(value = "status") | |||
| private Integer status; | |||
| /** | |||
| * 创建时间 | |||
| */ | |||
| @TableField(value = "create_date") | |||
| private Date createDate; | |||
| /** | |||
| * 更新时间 | |||
| */ | |||
| @TableField(value = "update_date") | |||
| private Date updateDate; | |||
| } | |||
| @@ -0,0 +1,171 @@ | |||
| package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.IdType; | |||
| import com.baomidou.mybatisplus.annotation.TableField; | |||
| import com.baomidou.mybatisplus.annotation.TableId; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| import com.iformall.domain.vo.WxVtwoActivityRule; | |||
| import com.iformall.domain.vo.WxVtwoActivityRuleDetail; | |||
| import lombok.Data; | |||
| /** | |||
| * 线下抽奖活动 | |||
| * @TableName wx_vtwo_prize_draw_activity | |||
| */ | |||
| @TableName(value ="wx_vtwo_prize_draw_activity") | |||
| @Data | |||
| public class WxVtwoPrizeDrawActivity extends TenantEntity { | |||
| /** | |||
| * 主键ID | |||
| */ | |||
| @TableId(value = "id") | |||
| private Long id; | |||
| /** | |||
| * 活动名称 | |||
| */ | |||
| @TableField(value = "name") | |||
| private String name; | |||
| /** | |||
| * 开始时间 | |||
| */ | |||
| @TableField(value = "start_time") | |||
| private Date startTime; | |||
| /** | |||
| * 结束时间 | |||
| */ | |||
| @TableField(value = "end_time") | |||
| private Date endTime; | |||
| /** | |||
| * 计算模式 | |||
| */ | |||
| @TableField(value = "amount_model") | |||
| private Integer amountModel; | |||
| /** | |||
| * 业态订单数量限制 | |||
| */ | |||
| @TableField(value = "business_order_limit") | |||
| private Integer businessOrderLimit; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(value = "amount_rules") | |||
| private String amountRules; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(exist = false) | |||
| private WxVtwoActivityRule amountRulesObject; | |||
| /** | |||
| * 联单模式 | |||
| */ | |||
| @TableField(value = "related_model") | |||
| private Integer relatedModel; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(value = "related_rules") | |||
| private String relatedRules; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(exist = false) | |||
| private List<WxVtwoActivityRuleDetail> relatedRulesObject; | |||
| /** | |||
| * 奖项数量限制 | |||
| */ | |||
| @TableField(value = "awards_limit") | |||
| private Integer awardsLimit; | |||
| /** | |||
| * 奖项总数量 | |||
| */ | |||
| @TableField(value = "awards_count") | |||
| private Integer awardsCount; | |||
| /** | |||
| * 商户规则 | |||
| */ | |||
| @TableField(value = "merchant_rule") | |||
| private Integer merchantRule; | |||
| @TableField(exist = false) | |||
| private List<Long> merchantIdList; | |||
| @TableField(exist = false) | |||
| private List<WxVtwoActivityMerchant> merchanList; | |||
| /** | |||
| * 活动状态 | |||
| */ | |||
| @TableField(value = "status") | |||
| private Integer status; | |||
| /** | |||
| * 创建时间 | |||
| */ | |||
| @TableField(value = "create_date") | |||
| private Date createDate; | |||
| /** | |||
| * 更新时间 | |||
| */ | |||
| @TableField(value = "update_date") | |||
| private Date updateDate; | |||
| @TableField(exist = false) | |||
| private List<WxVtwoActivityAward> awardList; | |||
| @TableField(exist = false) | |||
| private Date begin; | |||
| @TableField(exist = false) | |||
| private Date end; | |||
| /** | |||
| * 是否过期 | |||
| */ | |||
| @TableField(exist = false) | |||
| private Integer validStatus; | |||
| /** | |||
| * 参与订单数量 | |||
| */ | |||
| @TableField(exist = false) | |||
| private Integer orderCount; | |||
| /** | |||
| * 参与待审核订单数量 | |||
| */ | |||
| @TableField(exist = false) | |||
| private Integer waitOrderCount; | |||
| /** | |||
| * 参与已审核订单数量 | |||
| */ | |||
| @TableField(exist = false) | |||
| private Integer successOrderCount; | |||
| /** | |||
| * 参与商户数量 | |||
| */ | |||
| @TableField(exist = false) | |||
| private Integer mershantCount; | |||
| /** | |||
| * 发放订单数 | |||
| */ | |||
| @TableField(exist = false) | |||
| private Integer grantOrderCount; | |||
| } | |||
| @@ -0,0 +1,83 @@ | |||
| package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.IdType; | |||
| import com.baomidou.mybatisplus.annotation.TableField; | |||
| import com.baomidou.mybatisplus.annotation.TableId; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import java.util.Date; | |||
| import lombok.Data; | |||
| /** | |||
| * 线下专题下的活动 | |||
| * @TableName wx_vtwo_special_topic_activity | |||
| */ | |||
| @TableName(value ="wx_vtwo_special_topic_activity") | |||
| @Data | |||
| public class WxVtwoSpecialTopicActivity extends TenantEntity { | |||
| /** | |||
| * 主键ID | |||
| */ | |||
| @TableId(value = "id") | |||
| private Long id; | |||
| /** | |||
| * 专题ID | |||
| */ | |||
| @TableField(value = "special_topic_id") | |||
| private Long specialTopicId; | |||
| /** | |||
| * 活动ID | |||
| */ | |||
| @TableField(value = "activity_id") | |||
| private Long activityId; | |||
| /** | |||
| * 活动类型 | |||
| */ | |||
| @TableField(value = "activity_type") | |||
| private Integer activityType; | |||
| /** | |||
| * 活动名称 | |||
| */ | |||
| @TableField(value = "activity_name") | |||
| private String activityName; | |||
| /** | |||
| * | |||
| */ | |||
| @TableField(value = "activity_create_date") | |||
| private Date activityCreateDate; | |||
| /** | |||
| * 开始时间 | |||
| */ | |||
| @TableField(value = "activity_start_time") | |||
| private Date activityStartTime; | |||
| /** | |||
| * 结束时间 | |||
| */ | |||
| @TableField(value = "activity_end_time") | |||
| private Date activityEndTime; | |||
| /** | |||
| * 活动状态 | |||
| */ | |||
| @TableField(value = "activity_status") | |||
| private Integer activityStatus; | |||
| /** | |||
| * 创建时间 | |||
| */ | |||
| @TableField(value = "create_date") | |||
| private Date createDate; | |||
| /** | |||
| * 更新时间 | |||
| */ | |||
| @TableField(value = "update_date") | |||
| private Date updateDate; | |||
| } | |||
| @@ -0,0 +1,16 @@ | |||
| package com.iformall.domain.vo; | |||
| import lombok.Data; | |||
| import java.io.Serializable; | |||
| import java.math.BigDecimal; | |||
| @Data | |||
| public class WxVtwoActivityOrderStatistics implements Serializable { | |||
| private static final long serialVersionUID = 1L; | |||
| private Integer auditStatus; | |||
| private Integer count; | |||
| private BigDecimal sumAmount; | |||
| } | |||
| @@ -0,0 +1,37 @@ | |||
| package com.iformall.domain.vo; | |||
| import com.baomidou.mybatisplus.annotation.TableField; | |||
| import com.baomidou.mybatisplus.annotation.TableId; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import lombok.Data; | |||
| import java.io.Serializable; | |||
| import java.math.BigDecimal; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| /** | |||
| * 线下活动中奖规则 | |||
| */ | |||
| @Data | |||
| public class WxVtwoActivityRule implements Serializable { | |||
| private static final long serialVersionUID = 1L; | |||
| /** | |||
| * 规则数组 | |||
| */ | |||
| private List<WxVtwoActivityRuleDetail> ruleList; | |||
| /** | |||
| * 金额限制 | |||
| */ | |||
| private BigDecimal limitAmount; | |||
| /** | |||
| * 奖项单价(用来计算奖项数量) | |||
| */ | |||
| private BigDecimal awardAmount; | |||
| } | |||
| @@ -0,0 +1,44 @@ | |||
| package com.iformall.domain.vo; | |||
| import com.baomidou.mybatisplus.annotation.TableField; | |||
| import com.baomidou.mybatisplus.annotation.TableId; | |||
| import lombok.Data; | |||
| import java.io.Serializable; | |||
| import java.math.BigDecimal; | |||
| import java.util.Date; | |||
| /** | |||
| * 线下活动中奖规则 | |||
| */ | |||
| @Data | |||
| public class WxVtwoActivityRuleDetail implements Serializable { | |||
| private static final long serialVersionUID = 1L; | |||
| /** | |||
| * 限制最小金额 | |||
| */ | |||
| private BigDecimal minAmount; | |||
| /** | |||
| * 限制最大金额 | |||
| */ | |||
| private BigDecimal maxAmount; | |||
| /** | |||
| * 联单笔数 | |||
| */ | |||
| private Integer relatedCount; | |||
| /** | |||
| * 获得的奖券数量 | |||
| */ | |||
| private Integer awardCount; | |||
| /** | |||
| * 获得的奖项等级 | |||
| */ | |||
| private Integer awardGrade; | |||
| } | |||
| @@ -0,0 +1,26 @@ | |||
| package com.iformall.domain.vo; | |||
| import lombok.Data; | |||
| import java.io.Serializable; | |||
| import java.math.BigDecimal; | |||
| /** | |||
| * 线下活动中奖规则 | |||
| */ | |||
| @Data | |||
| public class WxVtwoActivityTaxDeductionRule implements Serializable { | |||
| private static final long serialVersionUID = 1L; | |||
| /** | |||
| * 税点起征金额 | |||
| */ | |||
| private BigDecimal startingTax; | |||
| /** | |||
| * 税点比例 | |||
| */ | |||
| private BigDecimal taxPoints; | |||
| } | |||
| @@ -0,0 +1,21 @@ | |||
| package com.iformall.domain.vo; | |||
| import lombok.Data; | |||
| import java.io.Serializable; | |||
| import java.math.BigDecimal; | |||
| @Data | |||
| public class WxVtwoOrderBusinessStatistics implements Serializable { | |||
| private static final long serialVersionUID = 1L; | |||
| private Integer businessId; | |||
| private String businessName; | |||
| private Integer businessCount; | |||
| private BigDecimal sumAmount; | |||
| private Double moneyRatio; | |||
| } | |||
| @@ -0,0 +1,19 @@ | |||
| package com.iformall.domain.vo; | |||
| import lombok.Data; | |||
| import java.io.Serializable; | |||
| import java.math.BigDecimal; | |||
| @Data | |||
| public class WxVtwoOrderCountStatistics implements Serializable { | |||
| private static final long serialVersionUID = 1L; | |||
| private String xTime; | |||
| private Integer userCount; | |||
| private Integer orderCount; | |||
| private BigDecimal sumAmount; | |||
| private Integer merchantCount; | |||
| } | |||
| @@ -0,0 +1,25 @@ | |||
| package com.iformall.mapper; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.WxVtwoActivityAward; | |||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
| import org.apache.ibatis.annotations.Param; | |||
| import java.util.List; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_activity_award(线下活动奖项)】的数据库操作Mapper | |||
| * @createDate 2025-05-16 00:37:31 | |||
| * @Entity com.iformall.domain.po.WxVtwoActivityAward | |||
| */ | |||
| public interface WxVtwoActivityAwardMapper extends CommonMapper<WxVtwoActivityAward, Long> { | |||
| void insertList(@Param("awardList") List<WxVtwoActivityAward> awardList); | |||
| List<WxVtwoActivityAward> findList(WxVtwoActivityAward activityAwardQ); | |||
| } | |||
| @@ -0,0 +1,19 @@ | |||
| package com.iformall.mapper; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.WxVtwoActivityGrantAward; | |||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_activity_grant_award(线下活动发放奖励)】的数据库操作Mapper | |||
| * @createDate 2025-05-16 00:37:32 | |||
| * @Entity com.iformall.domain.po.WxVtwoActivityGrantAward | |||
| */ | |||
| public interface WxVtwoActivityGrantAwardMapper extends CommonMapper<WxVtwoActivityGrantAward, Long> { | |||
| } | |||
| @@ -0,0 +1,19 @@ | |||
| package com.iformall.mapper; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.WxVtwoActivityGrantExport; | |||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_activity_grant_export(线下活动发放奖励导出)】的数据库操作Mapper | |||
| * @createDate 2025-05-16 00:37:32 | |||
| * @Entity com.iformall.domain.po.WxVtwoActivityGrantExport | |||
| */ | |||
| public interface WxVtwoActivityGrantExportMapper extends CommonMapper<WxVtwoActivityGrantExport, Long> { | |||
| } | |||
| @@ -0,0 +1,19 @@ | |||
| package com.iformall.mapper; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.WxVtwoActivityGrant; | |||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_activity_grant(线下活动发奖)】的数据库操作Mapper | |||
| * @createDate 2025-05-16 00:37:31 | |||
| * @Entity com.iformall.domain.po.WxVtwoActivityGrant | |||
| */ | |||
| public interface WxVtwoActivityGrantMapper extends CommonMapper<WxVtwoActivityGrant, Long> { | |||
| } | |||
| @@ -0,0 +1,19 @@ | |||
| package com.iformall.mapper; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.WxVtwoActivityGrantOrder; | |||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_activity_grant_order(线下活动发奖订单)】的数据库操作Mapper | |||
| * @createDate 2025-05-19 00:37:40 | |||
| * @Entity com.iformall.domain.po.WxVtwoActivityGrantOrder | |||
| */ | |||
| public interface WxVtwoActivityGrantOrderMapper extends CommonMapper<WxVtwoActivityGrantOrder, Long> { | |||
| } | |||
| @@ -0,0 +1,21 @@ | |||
| package com.iformall.mapper; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.WxVtwoActivityGrantSettlement; | |||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_activity_grant_settlement(线下活动发放奖励结算)】的数据库操作Mapper | |||
| * @createDate 2025-05-16 00:37:32 | |||
| * @Entity com.iformall.domain.po.WxVtwoActivityGrantSettlement | |||
| */ | |||
| public interface WxVtwoActivityGrantSettlementMapper extends CommonMapper<WxVtwoActivityGrantSettlement, Long> { | |||
| Integer getOrderCount(WxVtwoActivityGrantSettlement record); | |||
| } | |||
| @@ -0,0 +1,27 @@ | |||
| package com.iformall.mapper; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.WxVtwoActivityMerchant; | |||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
| import org.apache.ibatis.annotations.Param; | |||
| import java.util.List; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_activity_merchant(线下活动商户)】的数据库操作Mapper | |||
| * @createDate 2025-05-16 00:37:32 | |||
| * @Entity com.iformall.domain.po.WxVtwoActivityMerchant | |||
| */ | |||
| public interface WxVtwoActivityMerchantMapper extends CommonMapper<WxVtwoActivityMerchant, Long> { | |||
| List<Long> getMerchantIdList(@Param("activityId")Long activityId, @Param("tenantId")String tenantId); | |||
| List<WxVtwoActivityMerchant> findList(WxVtwoActivityMerchant record); | |||
| void insertList(@Param("merchantList") List<WxVtwoActivityMerchant> merchantList); | |||
| } | |||
| @@ -0,0 +1,47 @@ | |||
| package com.iformall.mapper; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.WxVtwoActivityOrder; | |||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
| import com.iformall.domain.vo.*; | |||
| import org.apache.ibatis.annotations.Param; | |||
| import java.util.List; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_activity_order(线下活动参与登记)】的数据库操作Mapper | |||
| * @createDate 2025-05-16 00:37:32 | |||
| * @Entity com.iformall.domain.po.WxVtwoActivityOrder | |||
| */ | |||
| public interface WxVtwoActivityOrderMapper extends CommonMapper<WxVtwoActivityOrder, Long> { | |||
| List<WxVtwoActivityOrder> findList(WxVtwoActivityOrder record); | |||
| WxVtwoActivityOrder selectById(@Param("id")Long id, @Param("tenantId")String tenantId); | |||
| List<WxVtwoActivityOrderStatistics> auditStatusStatistics(WxVtwoActivityOrder record); | |||
| void updateAuditStatus(WxVtwoActivityOrder record); | |||
| WxVtwoActivityOrder selectLimitOne(WxVtwoActivityOrder record); | |||
| Integer getCount(WxVtwoActivityOrder record); | |||
| Integer getMerchantCount(WxVtwoActivityOrder record); | |||
| void insertList(@Param("orderList")List<WxVtwoActivityOrder> orderList); | |||
| void updateIncreasedPoints(WxVtwoActivityOrder record); | |||
| WxVtwoOrderCountStatistics getCountStatistics(WxVtwoActivityOrder record); | |||
| List<WxVtwoOrderCountStatistics> getCountStatisticsChart(WxVtwoActivityOrder record); | |||
| List<WxVtwoOrderBusinessStatistics> getBusinessStatistics(WxVtwoActivityOrder record); | |||
| } | |||
| @@ -0,0 +1,19 @@ | |||
| package com.iformall.mapper; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.WxVtwoActivitySpecialTopic; | |||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_activity_special_topic(线下活动专题)】的数据库操作Mapper | |||
| * @createDate 2025-05-16 00:37:32 | |||
| * @Entity com.iformall.domain.po.WxVtwoActivitySpecialTopic | |||
| */ | |||
| public interface WxVtwoActivitySpecialTopicMapper extends CommonMapper<WxVtwoActivitySpecialTopic, Long> { | |||
| } | |||
| @@ -0,0 +1,25 @@ | |||
| package com.iformall.mapper; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.WxVtwoAmountGiftActivity; | |||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
| import io.lettuce.core.dynamic.annotation.Param; | |||
| import java.util.List; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_amount_gift_activity(线下满额赠礼活动)】的数据库操作Mapper | |||
| * @createDate 2025-05-19 00:37:40 | |||
| * @Entity com.iformall.domain.po.WxVtwoAmountGiftActivity | |||
| */ | |||
| public interface WxVtwoAmountGiftActivityMapper extends CommonMapper<WxVtwoAmountGiftActivity, Long> { | |||
| List<WxVtwoAmountGiftActivity> findList(WxVtwoAmountGiftActivity amountGiftActivity); | |||
| WxVtwoAmountGiftActivity selectById(@Param("id") Long id, @Param("tenantId")String tenantId); | |||
| } | |||
| @@ -0,0 +1,26 @@ | |||
| package com.iformall.mapper; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.WxVtwoAmountGiftActivity; | |||
| import com.iformall.domain.po.WxVtwoCashBackActivity; | |||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
| import io.lettuce.core.dynamic.annotation.Param; | |||
| import java.util.List; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_cash_back_activity(线下返现活动)】的数据库操作Mapper | |||
| * @createDate 2025-05-19 00:37:40 | |||
| * @Entity com.iformall.domain.po.WxVtwoCashBackActivity | |||
| */ | |||
| public interface WxVtwoCashBackActivityMapper extends CommonMapper<WxVtwoCashBackActivity, Long> { | |||
| List<WxVtwoCashBackActivity> findList(WxVtwoCashBackActivity cashBackActivity); | |||
| WxVtwoCashBackActivity selectById(@Param("id") Long id, @Param("tenantId")String tenantId); | |||
| } | |||
| @@ -0,0 +1,26 @@ | |||
| package com.iformall.mapper; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.WxVtwoActivityAward; | |||
| import com.iformall.domain.po.WxVtwoCashBackAward; | |||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
| import org.apache.ibatis.annotations.Param; | |||
| import java.util.List; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_cash_back_award(线下返现活动奖项)】的数据库操作Mapper | |||
| * @createDate 2025-05-16 00:37:32 | |||
| * @Entity com.iformall.domain.po.WxVtwoCashBackAward | |||
| */ | |||
| public interface WxVtwoCashBackAwardMapper extends CommonMapper<WxVtwoCashBackAward, Long> { | |||
| void insertList(@Param("awardList") List<WxVtwoActivityAward> awardList); | |||
| List<WxVtwoCashBackAward> findList(WxVtwoCashBackAward cashBackAward); | |||
| } | |||
| @@ -0,0 +1,19 @@ | |||
| package com.iformall.mapper; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.WxVtwoCashBackGrantAward; | |||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_cash_back_grant_award(线下返现活动发放奖励)】的数据库操作Mapper | |||
| * @createDate 2025-05-16 00:37:32 | |||
| * @Entity com.iformall.domain.po.WxVtwoCashBackGrantAward | |||
| */ | |||
| public interface WxVtwoCashBackGrantAwardMapper extends CommonMapper<WxVtwoCashBackGrantAward, Long> { | |||
| } | |||
| @@ -0,0 +1,19 @@ | |||
| package com.iformall.mapper; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.WxVtwoCashBackGrant; | |||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_cash_back_grant(线下返现活动发奖)】的数据库操作Mapper | |||
| * @createDate 2025-05-16 00:37:32 | |||
| * @Entity com.iformall.domain.po.WxVtwoCashBackGrant | |||
| */ | |||
| public interface WxVtwoCashBackGrantMapper extends CommonMapper<WxVtwoCashBackGrant, Long> { | |||
| } | |||
| @@ -0,0 +1,25 @@ | |||
| package com.iformall.mapper; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.WxVtwoPrizeDrawActivity; | |||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
| import io.lettuce.core.dynamic.annotation.Param; | |||
| import java.util.List; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_prize_draw_activity(线下抽奖活动)】的数据库操作Mapper | |||
| * @createDate 2025-05-19 00:37:40 | |||
| * @Entity com.iformall.domain.po.WxVtwoPrizeDrawActivity | |||
| */ | |||
| public interface WxVtwoPrizeDrawActivityMapper extends CommonMapper<WxVtwoPrizeDrawActivity, Long> { | |||
| List<WxVtwoPrizeDrawActivity> findList(WxVtwoPrizeDrawActivity prizeDrawActivity); | |||
| WxVtwoPrizeDrawActivity selectById(@Param("id") Long id, @Param("tenantId")String tenantId); | |||
| } | |||
| @@ -0,0 +1,19 @@ | |||
| package com.iformall.mapper; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.WxVtwoSpecialTopicActivity; | |||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_special_topic_activity(线下专题下的活动)】的数据库操作Mapper | |||
| * @createDate 2025-05-19 00:37:40 | |||
| * @Entity com.iformall.domain.po.WxVtwoSpecialTopicActivity | |||
| */ | |||
| public interface WxVtwoSpecialTopicActivityMapper extends CommonMapper<WxVtwoSpecialTopicActivity, Long> { | |||
| } | |||
| @@ -0,0 +1,17 @@ | |||
| package com.iformall.service; | |||
| import com.iformall.domain.po.WxVtwoActivityAward; | |||
| import com.baomidou.mybatisplus.extension.service.IService; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import java.util.List; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_activity_award(线下活动奖项)】的数据库操作Service | |||
| * @createDate 2025-05-16 00:37:31 | |||
| */ | |||
| public interface WxVtwoActivityAwardService extends IService<WxVtwoActivityAward> { | |||
| void saveFromActivity(TenantEntity tenantEntity, Long activityId, List<WxVtwoActivityAward> awardList); | |||
| } | |||
| @@ -0,0 +1,13 @@ | |||
| package com.iformall.service; | |||
| import com.iformall.domain.po.WxVtwoActivityGrantAward; | |||
| import com.baomidou.mybatisplus.extension.service.IService; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_activity_grant_award(线下活动发放奖励)】的数据库操作Service | |||
| * @createDate 2025-05-16 00:37:32 | |||
| */ | |||
| public interface WxVtwoActivityGrantAwardService extends IService<WxVtwoActivityGrantAward> { | |||
| } | |||
| @@ -0,0 +1,13 @@ | |||
| package com.iformall.service; | |||
| import com.iformall.domain.po.WxVtwoActivityGrantExport; | |||
| import com.baomidou.mybatisplus.extension.service.IService; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_activity_grant_export(线下活动发放奖励导出)】的数据库操作Service | |||
| * @createDate 2025-05-16 00:37:32 | |||
| */ | |||
| public interface WxVtwoActivityGrantExportService extends IService<WxVtwoActivityGrantExport> { | |||
| } | |||
| @@ -0,0 +1,13 @@ | |||
| package com.iformall.service; | |||
| import com.iformall.domain.po.WxVtwoActivityGrantOrder; | |||
| import com.baomidou.mybatisplus.extension.service.IService; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_activity_grant_order(线下活动发奖订单)】的数据库操作Service | |||
| * @createDate 2025-05-19 00:37:40 | |||
| */ | |||
| public interface WxVtwoActivityGrantOrderService extends IService<WxVtwoActivityGrantOrder> { | |||
| } | |||
| @@ -0,0 +1,13 @@ | |||
| package com.iformall.service; | |||
| import com.iformall.domain.po.WxVtwoActivityGrant; | |||
| import com.baomidou.mybatisplus.extension.service.IService; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_activity_grant(线下活动发奖)】的数据库操作Service | |||
| * @createDate 2025-05-16 00:37:31 | |||
| */ | |||
| public interface WxVtwoActivityGrantService extends IService<WxVtwoActivityGrant> { | |||
| } | |||
| @@ -0,0 +1,13 @@ | |||
| package com.iformall.service; | |||
| import com.iformall.domain.po.WxVtwoActivityGrantSettlement; | |||
| import com.baomidou.mybatisplus.extension.service.IService; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_activity_grant_settlement(线下活动发放奖励结算)】的数据库操作Service | |||
| * @createDate 2025-05-16 00:37:32 | |||
| */ | |||
| public interface WxVtwoActivityGrantSettlementService extends IService<WxVtwoActivityGrantSettlement> { | |||
| } | |||
| @@ -0,0 +1,19 @@ | |||
| package com.iformall.service; | |||
| import com.iformall.domain.po.WxVtwoActivityMerchant; | |||
| import com.baomidou.mybatisplus.extension.service.IService; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import java.util.List; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_activity_merchant(线下活动商户)】的数据库操作Service | |||
| * @createDate 2025-05-16 00:37:32 | |||
| */ | |||
| public interface WxVtwoActivityMerchantService extends IService<WxVtwoActivityMerchant> { | |||
| void saveFromActivity(TenantEntity tenantEntity, Long activityId, List<Long> merchantIdList); | |||
| List<WxVtwoActivityMerchant> getActivityMerchantList(Long activityId, String tenantId); | |||
| } | |||
| @@ -0,0 +1,13 @@ | |||
| package com.iformall.service; | |||
| import com.iformall.domain.po.WxVtwoActivityOrder; | |||
| import com.baomidou.mybatisplus.extension.service.IService; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_activity_order(线下活动参与登记)】的数据库操作Service | |||
| * @createDate 2025-05-16 00:37:32 | |||
| */ | |||
| public interface WxVtwoActivityOrderService extends IService<WxVtwoActivityOrder> { | |||
| } | |||
| @@ -0,0 +1,13 @@ | |||
| package com.iformall.service; | |||
| import com.iformall.domain.po.WxVtwoActivitySpecialTopic; | |||
| import com.baomidou.mybatisplus.extension.service.IService; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_activity_special_topic(线下活动专题)】的数据库操作Service | |||
| * @createDate 2025-05-16 00:37:32 | |||
| */ | |||
| public interface WxVtwoActivitySpecialTopicService extends IService<WxVtwoActivitySpecialTopic> { | |||
| } | |||
| @@ -0,0 +1,19 @@ | |||
| package com.iformall.service; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxVtwoAmountGiftActivity; | |||
| import com.baomidou.mybatisplus.extension.service.IService; | |||
| import com.iformall.domain.po.WxVtwoPrizeDrawActivity; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_amount_gift_activity(线下满额赠礼活动)】的数据库操作Service | |||
| * @createDate 2025-05-19 00:37:40 | |||
| */ | |||
| public interface WxVtwoAmountGiftActivityService extends IService<WxVtwoAmountGiftActivity> { | |||
| PageInfo<WxVtwoAmountGiftActivity> listAsPage(WxVtwoAmountGiftActivity amountGiftActivity, Integer pageNum, Integer pageSize); | |||
| WxVtwoAmountGiftActivity getInfoById(Long id, String tenantId); | |||
| } | |||
| @@ -0,0 +1,19 @@ | |||
| package com.iformall.service; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxVtwoAmountGiftActivity; | |||
| import com.iformall.domain.po.WxVtwoCashBackActivity; | |||
| import com.baomidou.mybatisplus.extension.service.IService; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_cash_back_activity(线下返现活动)】的数据库操作Service | |||
| * @createDate 2025-05-19 00:37:40 | |||
| */ | |||
| public interface WxVtwoCashBackActivityService extends IService<WxVtwoCashBackActivity> { | |||
| PageInfo<WxVtwoCashBackActivity> listAsPage(WxVtwoCashBackActivity cashBackActivity, Integer pageNum, Integer pageSize); | |||
| WxVtwoCashBackActivity getInfoById(Long id, String tenantId); | |||
| } | |||
| @@ -0,0 +1,18 @@ | |||
| package com.iformall.service; | |||
| import com.iformall.domain.po.WxVtwoCashBackActivity; | |||
| import com.iformall.domain.po.WxVtwoCashBackAward; | |||
| import com.baomidou.mybatisplus.extension.service.IService; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import java.util.List; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_cash_back_award(线下返现活动奖项)】的数据库操作Service | |||
| * @createDate 2025-05-16 00:37:32 | |||
| */ | |||
| public interface WxVtwoCashBackAwardService extends IService<WxVtwoCashBackAward> { | |||
| void saveFromActivity(TenantEntity tenantEntity, Long activityId, List<WxVtwoCashBackAward> amountRulesObject, List<WxVtwoCashBackAward> relatedRulesObject); | |||
| } | |||
| @@ -0,0 +1,13 @@ | |||
| package com.iformall.service; | |||
| import com.iformall.domain.po.WxVtwoCashBackGrantAward; | |||
| import com.baomidou.mybatisplus.extension.service.IService; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_cash_back_grant_award(线下返现活动发放奖励)】的数据库操作Service | |||
| * @createDate 2025-05-16 00:37:32 | |||
| */ | |||
| public interface WxVtwoCashBackGrantAwardService extends IService<WxVtwoCashBackGrantAward> { | |||
| } | |||
| @@ -0,0 +1,13 @@ | |||
| package com.iformall.service; | |||
| import com.iformall.domain.po.WxVtwoCashBackGrant; | |||
| import com.baomidou.mybatisplus.extension.service.IService; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_cash_back_grant(线下返现活动发奖)】的数据库操作Service | |||
| * @createDate 2025-05-16 00:37:32 | |||
| */ | |||
| public interface WxVtwoCashBackGrantService extends IService<WxVtwoCashBackGrant> { | |||
| } | |||
| @@ -0,0 +1,17 @@ | |||
| package com.iformall.service; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxVtwoPrizeDrawActivity; | |||
| import com.baomidou.mybatisplus.extension.service.IService; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_prize_draw_activity(线下抽奖活动)】的数据库操作Service | |||
| * @createDate 2025-05-19 00:37:40 | |||
| */ | |||
| public interface WxVtwoPrizeDrawActivityService extends IService<WxVtwoPrizeDrawActivity> { | |||
| PageInfo<WxVtwoPrizeDrawActivity> listAsPage(WxVtwoPrizeDrawActivity prizeDrawActivity, Integer pageNum, Integer pageSize); | |||
| WxVtwoPrizeDrawActivity getInfoById(Long id, String tenantId); | |||
| } | |||
| @@ -0,0 +1,13 @@ | |||
| package com.iformall.service; | |||
| import com.iformall.domain.po.WxVtwoSpecialTopicActivity; | |||
| import com.baomidou.mybatisplus.extension.service.IService; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_special_topic_activity(线下专题下的活动)】的数据库操作Service | |||
| * @createDate 2025-05-19 00:37:40 | |||
| */ | |||
| public interface WxVtwoSpecialTopicActivityService extends IService<WxVtwoSpecialTopicActivity> { | |||
| } | |||
| @@ -0,0 +1,58 @@ | |||
| package com.iformall.service.impl; | |||
| import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
| import com.iformall.common.IdWorker; | |||
| import com.iformall.domain.po.WxOfflineActivityAwardsItem; | |||
| import com.iformall.domain.po.WxVtwoActivityAward; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.enums.EnumOfflineActivityAwardsModeType; | |||
| import com.iformall.enums.EnumOfflineActivityType; | |||
| import com.iformall.service.WxVtwoActivityAwardService; | |||
| import com.iformall.mapper.WxVtwoActivityAwardMapper; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import java.math.BigDecimal; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_activity_award(线下活动奖项)】的数据库操作Service实现 | |||
| * @createDate 2025-05-16 00:37:31 | |||
| */ | |||
| @Service | |||
| public class WxVtwoActivityAwardServiceImpl extends ServiceImpl<WxVtwoActivityAwardMapper, WxVtwoActivityAward> | |||
| implements WxVtwoActivityAwardService{ | |||
| @Autowired | |||
| private WxVtwoActivityAwardMapper wxVtwoActivityAwardMapper; | |||
| @Override | |||
| public void saveFromActivity(TenantEntity tenantEntity, Long activityId, List<WxVtwoActivityAward> awardList) { | |||
| WxVtwoActivityAward activityAwardDel = new WxVtwoActivityAward(); | |||
| activityAwardDel.updateTenantInfo(tenantEntity); | |||
| activityAwardDel.setActivityId(activityId); | |||
| wxVtwoActivityAwardMapper.delete(new QueryWrapper<>(activityAwardDel)); | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| Date now = new Date(); | |||
| for (WxVtwoActivityAward activityAward : awardList) { | |||
| if(activityAward.getId() == null){ | |||
| activityAward.setId(idWorker.nextId()); | |||
| } | |||
| activityAward.updateTenantInfo(tenantEntity); | |||
| activityAward.setActivityId(activityId); | |||
| if(activityAward.getCreateDate() == null){ | |||
| activityAward.setCreateDate(now); | |||
| } | |||
| activityAward.setUpdateDate(now); | |||
| } | |||
| wxVtwoActivityAwardMapper.insertList(awardList); | |||
| } | |||
| } | |||
| @@ -0,0 +1,22 @@ | |||
| package com.iformall.service.impl; | |||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
| import com.iformall.domain.po.WxVtwoActivityGrantAward; | |||
| import com.iformall.service.WxVtwoActivityGrantAwardService; | |||
| import com.iformall.mapper.WxVtwoActivityGrantAwardMapper; | |||
| import org.springframework.stereotype.Service; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_activity_grant_award(线下活动发放奖励)】的数据库操作Service实现 | |||
| * @createDate 2025-05-16 00:37:32 | |||
| */ | |||
| @Service | |||
| public class WxVtwoActivityGrantAwardServiceImpl extends ServiceImpl<WxVtwoActivityGrantAwardMapper, WxVtwoActivityGrantAward> | |||
| implements WxVtwoActivityGrantAwardService{ | |||
| } | |||
| @@ -0,0 +1,22 @@ | |||
| package com.iformall.service.impl; | |||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
| import com.iformall.domain.po.WxVtwoActivityGrantExport; | |||
| import com.iformall.service.WxVtwoActivityGrantExportService; | |||
| import com.iformall.mapper.WxVtwoActivityGrantExportMapper; | |||
| import org.springframework.stereotype.Service; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_activity_grant_export(线下活动发放奖励导出)】的数据库操作Service实现 | |||
| * @createDate 2025-05-16 00:37:32 | |||
| */ | |||
| @Service | |||
| public class WxVtwoActivityGrantExportServiceImpl extends ServiceImpl<WxVtwoActivityGrantExportMapper, WxVtwoActivityGrantExport> | |||
| implements WxVtwoActivityGrantExportService{ | |||
| } | |||
| @@ -0,0 +1,22 @@ | |||
| package com.iformall.service.impl; | |||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
| import com.iformall.domain.po.WxVtwoActivityGrantOrder; | |||
| import com.iformall.service.WxVtwoActivityGrantOrderService; | |||
| import com.iformall.mapper.WxVtwoActivityGrantOrderMapper; | |||
| import org.springframework.stereotype.Service; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_activity_grant_order(线下活动发奖订单)】的数据库操作Service实现 | |||
| * @createDate 2025-05-19 00:37:40 | |||
| */ | |||
| @Service | |||
| public class WxVtwoActivityGrantOrderServiceImpl extends ServiceImpl<WxVtwoActivityGrantOrderMapper, WxVtwoActivityGrantOrder> | |||
| implements WxVtwoActivityGrantOrderService{ | |||
| } | |||
| @@ -0,0 +1,22 @@ | |||
| package com.iformall.service.impl; | |||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
| import com.iformall.domain.po.WxVtwoActivityGrant; | |||
| import com.iformall.service.WxVtwoActivityGrantService; | |||
| import com.iformall.mapper.WxVtwoActivityGrantMapper; | |||
| import org.springframework.stereotype.Service; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_activity_grant(线下活动发奖)】的数据库操作Service实现 | |||
| * @createDate 2025-05-16 00:37:31 | |||
| */ | |||
| @Service | |||
| public class WxVtwoActivityGrantServiceImpl extends ServiceImpl<WxVtwoActivityGrantMapper, WxVtwoActivityGrant> | |||
| implements WxVtwoActivityGrantService{ | |||
| } | |||
| @@ -0,0 +1,22 @@ | |||
| package com.iformall.service.impl; | |||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
| import com.iformall.domain.po.WxVtwoActivityGrantSettlement; | |||
| import com.iformall.service.WxVtwoActivityGrantSettlementService; | |||
| import com.iformall.mapper.WxVtwoActivityGrantSettlementMapper; | |||
| import org.springframework.stereotype.Service; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_activity_grant_settlement(线下活动发放奖励结算)】的数据库操作Service实现 | |||
| * @createDate 2025-05-16 00:37:32 | |||
| */ | |||
| @Service | |||
| public class WxVtwoActivityGrantSettlementServiceImpl extends ServiceImpl<WxVtwoActivityGrantSettlementMapper, WxVtwoActivityGrantSettlement> | |||
| implements WxVtwoActivityGrantSettlementService{ | |||
| } | |||
| @@ -0,0 +1,81 @@ | |||
| package com.iformall.service.impl; | |||
| import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
| import com.iformall.common.IdWorker; | |||
| import com.iformall.domain.po.WxMerchant; | |||
| import com.iformall.domain.po.WxOfflineActivityMerchant; | |||
| import com.iformall.domain.po.WxVtwoActivityMerchant; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.enums.EnumOfflineActivityMerchantType; | |||
| import com.iformall.enums.EnumYesOrNo; | |||
| import com.iformall.service.WxMerchantService; | |||
| import com.iformall.service.WxVtwoActivityMerchantService; | |||
| import com.iformall.mapper.WxVtwoActivityMerchantMapper; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import java.util.ArrayList; | |||
| import java.util.Collections; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_activity_merchant(线下活动商户)】的数据库操作Service实现 | |||
| * @createDate 2025-05-16 00:37:32 | |||
| */ | |||
| @Service | |||
| public class WxVtwoActivityMerchantServiceImpl extends ServiceImpl<WxVtwoActivityMerchantMapper, WxVtwoActivityMerchant> | |||
| implements WxVtwoActivityMerchantService{ | |||
| @Autowired | |||
| private WxVtwoActivityMerchantMapper wxVtwoActivityMerchantMapper; | |||
| @Autowired | |||
| private WxMerchantService wxMerchantService; | |||
| @Override | |||
| public void saveFromActivity(TenantEntity tenantEntity, Long activityId, List<Long> merchantIdList) { | |||
| WxVtwoActivityMerchant activityMerchantDel = new WxVtwoActivityMerchant(); | |||
| activityMerchantDel.updateTenantInfo(tenantEntity); | |||
| activityMerchantDel.setActivityId(activityId); | |||
| wxVtwoActivityMerchantMapper.delete(new QueryWrapper<>(activityMerchantDel)); | |||
| if(merchantIdList == null || merchantIdList.isEmpty()){ | |||
| return; | |||
| } | |||
| List<WxVtwoActivityMerchant> merchantList = new ArrayList<>(); | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| for (Long merchantId : merchantIdList) { | |||
| WxVtwoActivityMerchant activityMerchant = new WxVtwoActivityMerchant(); | |||
| activityMerchant.setId(idWorker.nextId()); | |||
| activityMerchant.updateTenantInfo(tenantEntity); | |||
| activityMerchant.setActivityId(activityId); | |||
| activityMerchant.setMerchantId(merchantId); | |||
| merchantList.add(activityMerchant); | |||
| } | |||
| wxVtwoActivityMerchantMapper.insertList(merchantList); | |||
| } | |||
| @Override | |||
| public List<WxVtwoActivityMerchant> getActivityMerchantList(Long activityId, String tenantId) { | |||
| WxVtwoActivityMerchant activityMerchantQ = new WxVtwoActivityMerchant(); | |||
| activityMerchantQ.setTenantId(tenantId); | |||
| activityMerchantQ.setActivityId(activityId); | |||
| List<WxVtwoActivityMerchant> activityMerchantList = wxVtwoActivityMerchantMapper.findList(activityMerchantQ); | |||
| WxMerchant merchantQ = new WxMerchant(); | |||
| merchantQ.setTenantId(tenantId); | |||
| Map<Long, WxMerchant> merchantMap = wxMerchantService.findMerchantMap(merchantQ); | |||
| for (WxVtwoActivityMerchant activityMerchant : activityMerchantList) { | |||
| activityMerchant.setMerchant(merchantMap.get(activityMerchant.getMerchantId())); | |||
| } | |||
| return activityMerchantList; | |||
| } | |||
| } | |||
| @@ -0,0 +1,22 @@ | |||
| package com.iformall.service.impl; | |||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
| import com.iformall.domain.po.WxVtwoActivityOrder; | |||
| import com.iformall.service.WxVtwoActivityOrderService; | |||
| import com.iformall.mapper.WxVtwoActivityOrderMapper; | |||
| import org.springframework.stereotype.Service; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_activity_order(线下活动参与登记)】的数据库操作Service实现 | |||
| * @createDate 2025-05-16 00:37:32 | |||
| */ | |||
| @Service | |||
| public class WxVtwoActivityOrderServiceImpl extends ServiceImpl<WxVtwoActivityOrderMapper, WxVtwoActivityOrder> | |||
| implements WxVtwoActivityOrderService{ | |||
| } | |||
| @@ -0,0 +1,22 @@ | |||
| package com.iformall.service.impl; | |||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
| import com.iformall.domain.po.WxVtwoActivitySpecialTopic; | |||
| import com.iformall.service.WxVtwoActivitySpecialTopicService; | |||
| import com.iformall.mapper.WxVtwoActivitySpecialTopicMapper; | |||
| import org.springframework.stereotype.Service; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_activity_special_topic(线下活动专题)】的数据库操作Service实现 | |||
| * @createDate 2025-05-16 00:37:32 | |||
| */ | |||
| @Service | |||
| public class WxVtwoActivitySpecialTopicServiceImpl extends ServiceImpl<WxVtwoActivitySpecialTopicMapper, WxVtwoActivitySpecialTopic> | |||
| implements WxVtwoActivitySpecialTopicService{ | |||
| } | |||
| @@ -0,0 +1,198 @@ | |||
| package com.iformall.service.impl; | |||
| import com.alibaba.fastjson.JSONObject; | |||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
| import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.IdWorker; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.domain.vo.WxVtwoActivityOrderStatistics; | |||
| import com.iformall.domain.vo.WxVtwoActivityRule; | |||
| import com.iformall.domain.vo.WxVtwoActivityRuleDetail; | |||
| import com.iformall.enums.EnumOfflineActivityMerchantType; | |||
| import com.iformall.enums.EnumOfflineActivityRecordStatus; | |||
| import com.iformall.enums.EnumOfflineActivityStatus; | |||
| import com.iformall.enums.EnumYesOrNo; | |||
| import com.iformall.mapper.*; | |||
| import com.iformall.service.WxVtwoActivityAwardService; | |||
| import com.iformall.service.WxVtwoActivityMerchantService; | |||
| import com.iformall.service.WxVtwoAmountGiftActivityService; | |||
| import jodd.util.StringUtil; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import org.springframework.transaction.annotation.Transactional; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_amount_gift_activity(线下满额赠礼活动)】的数据库操作Service实现 | |||
| * @createDate 2025-05-19 00:37:40 | |||
| */ | |||
| @Service | |||
| public class WxVtwoAmountGiftActivityServiceImpl extends ServiceImpl<WxVtwoAmountGiftActivityMapper, WxVtwoAmountGiftActivity> | |||
| implements WxVtwoAmountGiftActivityService{ | |||
| @Autowired | |||
| private WxVtwoAmountGiftActivityMapper wxVtwoAmountGiftActivityMapper; | |||
| @Autowired | |||
| private WxVtwoActivityAwardMapper wxVtwoActivityAwardMapper; | |||
| @Autowired | |||
| private WxVtwoActivityMerchantMapper wxVtwoActivityMerchantMapper; | |||
| @Autowired | |||
| private WxVtwoActivityOrderMapper wxVtwoActivityOrderMapper; | |||
| @Autowired | |||
| private WxVtwoActivityGrantSettlementMapper wxVtwoActivityGrantSettlementMapper; | |||
| @Autowired | |||
| private WxVtwoActivityAwardService wxVtwoActivityAwardService; | |||
| @Autowired | |||
| private WxVtwoActivityMerchantService wxVtwoActivityMerchantService; | |||
| @Override | |||
| public PageInfo<WxVtwoAmountGiftActivity> listAsPage(WxVtwoAmountGiftActivity amountGiftActivity, Integer pageNum, Integer pageSize) { | |||
| handlerQuery(amountGiftActivity); | |||
| PageInfo<WxVtwoAmountGiftActivity> activityPageInfo = PageHelper.startPage(pageNum, pageSize).doSelectPageInfo(() -> wxVtwoAmountGiftActivityMapper.findList(amountGiftActivity)); | |||
| handlerReturnList(activityPageInfo.getList()); | |||
| return activityPageInfo; | |||
| } | |||
| private void handlerQuery(WxVtwoAmountGiftActivity amountGiftActivity) { | |||
| if (null != amountGiftActivity.getStatus()) { | |||
| //已上架 | |||
| if(EnumOfflineActivityStatus.ON_LINE.getCode().equals(amountGiftActivity.getStatus())){ | |||
| amountGiftActivity.setValidStatus(EnumYesOrNo.NO.getCode()); | |||
| } | |||
| //已过期 | |||
| else if(EnumOfflineActivityStatus.EXPIRE.getCode().equals(amountGiftActivity.getStatus())){ | |||
| amountGiftActivity.setStatus(null); | |||
| amountGiftActivity.setValidStatus(EnumYesOrNo.YES.getCode()); | |||
| } | |||
| } | |||
| } | |||
| private void handlerReturnList(List<WxVtwoAmountGiftActivity> list) { | |||
| if (null != list && !list.isEmpty()) { | |||
| Date now = new Date(); | |||
| for (WxVtwoAmountGiftActivity activity : list) { | |||
| if(now.after(activity.getEndTime())){ | |||
| activity.setStatus(EnumOfflineActivityStatus.EXPIRE.getCode()); | |||
| } | |||
| //参与订单数 | |||
| WxVtwoActivityOrder activityOrderQ = new WxVtwoActivityOrder(); | |||
| activityOrderQ.updateTenantInfo(activity); | |||
| activityOrderQ.setCreateDateBegin(activity.getStartTime()); | |||
| activityOrderQ.setCreateDateEnd(activity.getEndTime()); | |||
| if(EnumOfflineActivityMerchantType.ADD.getCode().equals(activity.getMerchantRule())){ | |||
| List<Long> merchantIds = wxVtwoActivityMerchantMapper.getMerchantIdList(activity.getId(), activity.getTenantId()); | |||
| activityOrderQ.setMerchantIdList(merchantIds); | |||
| }else if(EnumOfflineActivityMerchantType.UN_ADD.getCode().equals(activity.getMerchantRule())){ | |||
| List<Long> merchantIds = wxVtwoActivityMerchantMapper.getMerchantIdList(activity.getId(), activity.getTenantId()); | |||
| activityOrderQ.setNotMerchantIdList(merchantIds); | |||
| } | |||
| List<WxVtwoActivityOrderStatistics> auditStatusStatistics = wxVtwoActivityOrderMapper.auditStatusStatistics(activityOrderQ); | |||
| Integer audting = 0, audi_success = 0, audt_fail = 0, invalid = 0; | |||
| for(WxVtwoActivityOrderStatistics statistics : auditStatusStatistics){ | |||
| if(EnumOfflineActivityRecordStatus.AUDTING.getCode().equals(statistics.getAuditStatus())){ | |||
| audting = statistics.getCount(); | |||
| } else if (EnumOfflineActivityRecordStatus.AUDI_SUCCESS.getCode().equals(statistics.getAuditStatus())) { | |||
| audi_success = statistics.getCount(); | |||
| } else if (EnumOfflineActivityRecordStatus.AUDT_FAIL.getCode().equals(statistics.getAuditStatus())) { | |||
| audt_fail = statistics.getCount(); | |||
| }else if (EnumOfflineActivityRecordStatus.INVALID.getCode().equals(statistics.getAuditStatus())) { | |||
| invalid = statistics.getCount(); | |||
| } | |||
| } | |||
| activity.setOrderCount(audting+audi_success+audt_fail+invalid); | |||
| activity.setWaitOrderCount(audting); | |||
| activity.setSuccessOrderCount(audi_success); | |||
| //参与商户数 | |||
| activity.setMershantCount(wxVtwoActivityOrderMapper.getMerchantCount(activityOrderQ)); | |||
| //发放订单数量 | |||
| WxVtwoActivityGrantSettlement grantSettlementQ = new WxVtwoActivityGrantSettlement(); | |||
| grantSettlementQ.updateTenantInfo(activity); | |||
| grantSettlementQ.setActivityId(activity.getId()); | |||
| grantSettlementQ.setStatus(EnumYesOrNo.YES.getCode()); | |||
| activity.setGrantOrderCount(wxVtwoActivityGrantSettlementMapper.getOrderCount(grantSettlementQ)); | |||
| } | |||
| } | |||
| } | |||
| @Override | |||
| @Transactional(rollbackFor = Exception.class) | |||
| public boolean saveOrUpdate(WxVtwoAmountGiftActivity amountGiftActivity) { | |||
| handlerActivityRules(amountGiftActivity); | |||
| Date now = new Date(); | |||
| if(amountGiftActivity.getId() == null){ | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| amountGiftActivity.setId(idWorker.nextId()); | |||
| amountGiftActivity.setCreateDate(now); | |||
| amountGiftActivity.setCreateDate(now); | |||
| amountGiftActivity.setStatus(EnumOfflineActivityStatus.OFF_LINE.getCode()); | |||
| wxVtwoAmountGiftActivityMapper.insert(amountGiftActivity); | |||
| } | |||
| else{ | |||
| amountGiftActivity.setUpdateDate(now); | |||
| wxVtwoAmountGiftActivityMapper.updateById(amountGiftActivity); | |||
| } | |||
| if(amountGiftActivity.getAwardList() != null && !amountGiftActivity.getAwardList().isEmpty()){ | |||
| wxVtwoActivityAwardService.saveFromActivity(amountGiftActivity,amountGiftActivity.getId(),amountGiftActivity.getAwardList()); | |||
| } | |||
| if(amountGiftActivity.getMerchantRule() != null){ | |||
| if(EnumOfflineActivityMerchantType.ALL.getCode().equals(amountGiftActivity.getMerchantRule())){ | |||
| amountGiftActivity.setMerchantIdList(null); | |||
| } | |||
| wxVtwoActivityMerchantService.saveFromActivity(amountGiftActivity,amountGiftActivity.getId(),amountGiftActivity.getMerchantIdList()); | |||
| } | |||
| return true; | |||
| } | |||
| private void handlerActivityRules(WxVtwoAmountGiftActivity amountGiftActivity) { | |||
| if(amountGiftActivity.getAmountRulesObject() != null){ | |||
| amountGiftActivity.setAmountRules(JSONObject.toJSONString(amountGiftActivity.getAmountRulesObject())); | |||
| } | |||
| if(amountGiftActivity.getRelatedRulesObject() != null){ | |||
| amountGiftActivity.setRelatedRules(JSONObject.toJSONString(amountGiftActivity.getRelatedRulesObject())); | |||
| } | |||
| } | |||
| @Override | |||
| public WxVtwoAmountGiftActivity getInfoById(Long id, String tenantId) { | |||
| WxVtwoAmountGiftActivity amountGiftActivity = wxVtwoAmountGiftActivityMapper.selectById(id, tenantId); | |||
| if (amountGiftActivity == null) { | |||
| return null; | |||
| } | |||
| if(StringUtil.isNotBlank(amountGiftActivity.getAmountRules())){ | |||
| amountGiftActivity.setAmountRulesObject(JSONObject.parseArray(amountGiftActivity.getAmountRules(), WxVtwoActivityRuleDetail.class)); | |||
| } | |||
| if(StringUtil.isNotBlank(amountGiftActivity.getRelatedRules())){ | |||
| amountGiftActivity.setRelatedRulesObject(JSONObject.parseArray(amountGiftActivity.getRelatedRules(), WxVtwoActivityRuleDetail.class)); | |||
| } | |||
| WxVtwoActivityAward activityAwardQ = new WxVtwoActivityAward(); | |||
| activityAwardQ.setTenantId(tenantId); | |||
| activityAwardQ.setActivityId(id); | |||
| List<WxVtwoActivityAward> activityAwardList = wxVtwoActivityAwardMapper.findList(activityAwardQ); | |||
| amountGiftActivity.setAwardList(activityAwardList); | |||
| if(!EnumOfflineActivityMerchantType.ALL.getCode().equals(amountGiftActivity.getMerchantRule())){ | |||
| List<WxVtwoActivityMerchant> activityMerchantList = wxVtwoActivityMerchantService.getActivityMerchantList(id,tenantId); | |||
| amountGiftActivity.setMerchanList(activityMerchantList); | |||
| } | |||
| return amountGiftActivity; | |||
| } | |||
| } | |||
| @@ -0,0 +1,186 @@ | |||
| package com.iformall.service.impl; | |||
| import com.alibaba.fastjson.JSONObject; | |||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
| import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.IdWorker; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.domain.vo.WxVtwoActivityOrderStatistics; | |||
| import com.iformall.domain.vo.WxVtwoActivityRuleDetail; | |||
| import com.iformall.enums.*; | |||
| import com.iformall.mapper.*; | |||
| import com.iformall.service.WxVtwoActivityAwardService; | |||
| import com.iformall.service.WxVtwoActivityMerchantService; | |||
| import com.iformall.service.WxVtwoCashBackActivityService; | |||
| import com.iformall.service.WxVtwoCashBackAwardService; | |||
| import jodd.util.StringUtil; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import org.springframework.transaction.annotation.Transactional; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| import java.util.stream.Collectors; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_cash_back_activity(线下返现活动)】的数据库操作Service实现 | |||
| * @createDate 2025-05-19 00:37:40 | |||
| */ | |||
| @Service | |||
| public class WxVtwoCashBackActivityServiceImpl extends ServiceImpl<WxVtwoCashBackActivityMapper, WxVtwoCashBackActivity> | |||
| implements WxVtwoCashBackActivityService{ | |||
| @Autowired | |||
| private WxVtwoCashBackActivityMapper wxVtwoCashBackActivityMapper; | |||
| @Autowired | |||
| private WxVtwoCashBackAwardMapper wxVtwoCashBackAwardMapper; | |||
| @Autowired | |||
| private WxVtwoActivityMerchantMapper wxVtwoActivityMerchantMapper; | |||
| @Autowired | |||
| private WxVtwoActivityOrderMapper wxVtwoActivityOrderMapper; | |||
| @Autowired | |||
| private WxVtwoActivityGrantSettlementMapper wxVtwoActivityGrantSettlementMapper; | |||
| @Autowired | |||
| private WxVtwoCashBackAwardService wxVtwoCashBackAwardService; | |||
| @Autowired | |||
| private WxVtwoActivityMerchantService wxVtwoActivityMerchantService; | |||
| @Override | |||
| public PageInfo<WxVtwoCashBackActivity> listAsPage(WxVtwoCashBackActivity cashBackActivity, Integer pageNum, Integer pageSize) { | |||
| handlerQuery(cashBackActivity); | |||
| PageInfo<WxVtwoCashBackActivity> activityPageInfo = PageHelper.startPage(pageNum, pageSize).doSelectPageInfo(() -> wxVtwoCashBackActivityMapper.findList(cashBackActivity)); | |||
| handlerReturnList(activityPageInfo.getList()); | |||
| return activityPageInfo; | |||
| } | |||
| private void handlerQuery(WxVtwoCashBackActivity cashBackActivity) { | |||
| if (null != cashBackActivity.getStatus()) { | |||
| //已上架 | |||
| if(EnumOfflineActivityStatus.ON_LINE.getCode().equals(cashBackActivity.getStatus())){ | |||
| cashBackActivity.setValidStatus(EnumYesOrNo.NO.getCode()); | |||
| } | |||
| //已过期 | |||
| else if(EnumOfflineActivityStatus.EXPIRE.getCode().equals(cashBackActivity.getStatus())){ | |||
| cashBackActivity.setStatus(null); | |||
| cashBackActivity.setValidStatus(EnumYesOrNo.YES.getCode()); | |||
| } | |||
| } | |||
| } | |||
| private void handlerReturnList(List<WxVtwoCashBackActivity> list) { | |||
| if (null != list && !list.isEmpty()) { | |||
| Date now = new Date(); | |||
| for (WxVtwoCashBackActivity activity : list) { | |||
| if(now.after(activity.getEndTime())){ | |||
| activity.setStatus(EnumOfflineActivityStatus.EXPIRE.getCode()); | |||
| } | |||
| //参与订单数 | |||
| WxVtwoActivityOrder activityOrderQ = new WxVtwoActivityOrder(); | |||
| activityOrderQ.updateTenantInfo(activity); | |||
| activityOrderQ.setCreateDateBegin(activity.getStartTime()); | |||
| activityOrderQ.setCreateDateEnd(activity.getEndTime()); | |||
| if(EnumOfflineActivityMerchantType.ADD.getCode().equals(activity.getMerchantRule())){ | |||
| List<Long> merchantIds = wxVtwoActivityMerchantMapper.getMerchantIdList(activity.getId(), activity.getTenantId()); | |||
| activityOrderQ.setMerchantIdList(merchantIds); | |||
| }else if(EnumOfflineActivityMerchantType.UN_ADD.getCode().equals(activity.getMerchantRule())){ | |||
| List<Long> merchantIds = wxVtwoActivityMerchantMapper.getMerchantIdList(activity.getId(), activity.getTenantId()); | |||
| activityOrderQ.setNotMerchantIdList(merchantIds); | |||
| } | |||
| List<WxVtwoActivityOrderStatistics> auditStatusStatistics = wxVtwoActivityOrderMapper.auditStatusStatistics(activityOrderQ); | |||
| Integer audting = 0, audi_success = 0, audt_fail = 0, invalid = 0; | |||
| for(WxVtwoActivityOrderStatistics statistics : auditStatusStatistics){ | |||
| if(EnumOfflineActivityRecordStatus.AUDTING.getCode().equals(statistics.getAuditStatus())){ | |||
| audting = statistics.getCount(); | |||
| } else if (EnumOfflineActivityRecordStatus.AUDI_SUCCESS.getCode().equals(statistics.getAuditStatus())) { | |||
| audi_success = statistics.getCount(); | |||
| } else if (EnumOfflineActivityRecordStatus.AUDT_FAIL.getCode().equals(statistics.getAuditStatus())) { | |||
| audt_fail = statistics.getCount(); | |||
| }else if (EnumOfflineActivityRecordStatus.INVALID.getCode().equals(statistics.getAuditStatus())) { | |||
| invalid = statistics.getCount(); | |||
| } | |||
| } | |||
| activity.setOrderCount(audting+audi_success+audt_fail+invalid); | |||
| activity.setWaitOrderCount(audting); | |||
| activity.setSuccessOrderCount(audi_success); | |||
| //参与商户数 | |||
| activity.setMershantCount(wxVtwoActivityOrderMapper.getMerchantCount(activityOrderQ)); | |||
| //发放订单数量 | |||
| WxVtwoActivityGrantSettlement grantSettlementQ = new WxVtwoActivityGrantSettlement(); | |||
| grantSettlementQ.updateTenantInfo(activity); | |||
| grantSettlementQ.setActivityId(activity.getId()); | |||
| grantSettlementQ.setStatus(EnumYesOrNo.YES.getCode()); | |||
| activity.setGrantOrderCount(wxVtwoActivityGrantSettlementMapper.getOrderCount(grantSettlementQ)); | |||
| } | |||
| } | |||
| } | |||
| @Override | |||
| @Transactional(rollbackFor = Exception.class) | |||
| public boolean saveOrUpdate(WxVtwoCashBackActivity cashBackActivity) { | |||
| Date now = new Date(); | |||
| if(cashBackActivity.getId() == null){ | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| cashBackActivity.setId(idWorker.nextId()); | |||
| cashBackActivity.setCreateDate(now); | |||
| cashBackActivity.setCreateDate(now); | |||
| cashBackActivity.setStatus(EnumOfflineActivityStatus.OFF_LINE.getCode()); | |||
| wxVtwoCashBackActivityMapper.insert(cashBackActivity); | |||
| } | |||
| else{ | |||
| cashBackActivity.setUpdateDate(now); | |||
| wxVtwoCashBackActivityMapper.updateById(cashBackActivity); | |||
| } | |||
| if((cashBackActivity.getAmountRulesObject()!=null && !cashBackActivity.getAmountRulesObject().isEmpty()) | |||
| || (cashBackActivity.getRelatedRulesObject()!=null && !cashBackActivity.getRelatedRulesObject().isEmpty())){ | |||
| wxVtwoCashBackAwardService.saveFromActivity(cashBackActivity,cashBackActivity.getId(),cashBackActivity.getAmountRulesObject(),cashBackActivity.getRelatedRulesObject()); | |||
| } | |||
| if(cashBackActivity.getMerchantRule() != null){ | |||
| if(EnumOfflineActivityMerchantType.ALL.getCode().equals(cashBackActivity.getMerchantRule())){ | |||
| cashBackActivity.setMerchantIdList(null); | |||
| } | |||
| wxVtwoActivityMerchantService.saveFromActivity(cashBackActivity,cashBackActivity.getId(),cashBackActivity.getMerchantIdList()); | |||
| } | |||
| return true; | |||
| } | |||
| @Override | |||
| public WxVtwoCashBackActivity getInfoById(Long id, String tenantId) { | |||
| WxVtwoCashBackActivity cashBackActivity = wxVtwoCashBackActivityMapper.selectById(id, tenantId); | |||
| if (cashBackActivity == null) { | |||
| return null; | |||
| } | |||
| WxVtwoCashBackAward cashBackAwardQ = new WxVtwoCashBackAward(); | |||
| cashBackAwardQ.setTenantId(tenantId); | |||
| cashBackAwardQ.setActivityId(id); | |||
| List<WxVtwoCashBackAward> activityAwardList = wxVtwoCashBackAwardMapper.findList(cashBackAwardQ); | |||
| Map<Integer, List<WxVtwoCashBackAward>> activityAwardMap = activityAwardList.stream().collect(Collectors.groupingBy(WxVtwoCashBackAward::getModelType)); | |||
| cashBackActivity.setAmountRulesObject(activityAwardMap.get(EnumOfflineActivityAwardsModeType.AMOUNT.getCode())); | |||
| cashBackActivity.setRelatedRulesObject(activityAwardMap.get(EnumOfflineActivityAwardsModeType.COUNT.getCode())); | |||
| if(!EnumOfflineActivityMerchantType.ALL.getCode().equals(cashBackActivity.getMerchantRule())){ | |||
| List<WxVtwoActivityMerchant> activityMerchantList = wxVtwoActivityMerchantService.getActivityMerchantList(id,tenantId); | |||
| cashBackActivity.setMerchanList(activityMerchantList); | |||
| } | |||
| return cashBackActivity; | |||
| } | |||
| } | |||
| @@ -0,0 +1,78 @@ | |||
| package com.iformall.service.impl; | |||
| import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
| import com.iformall.common.IdWorker; | |||
| import com.iformall.domain.po.WxVtwoActivityAward; | |||
| import com.iformall.domain.po.WxVtwoCashBackAward; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.enums.EnumOfflineActivityAwardsModeType; | |||
| import com.iformall.service.WxVtwoCashBackAwardService; | |||
| import com.iformall.mapper.WxVtwoCashBackAwardMapper; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import java.util.ArrayList; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_cash_back_award(线下返现活动奖项)】的数据库操作Service实现 | |||
| * @createDate 2025-05-16 00:37:32 | |||
| */ | |||
| @Service | |||
| public class WxVtwoCashBackAwardServiceImpl extends ServiceImpl<WxVtwoCashBackAwardMapper, WxVtwoCashBackAward> | |||
| implements WxVtwoCashBackAwardService{ | |||
| @Autowired | |||
| private WxVtwoCashBackAwardMapper wxVtwoCashBackAwardMapper; | |||
| @Override | |||
| public void saveFromActivity(TenantEntity tenantEntity, Long activityId, List<WxVtwoCashBackAward> amountRulesObject, List<WxVtwoCashBackAward> relatedRulesObject) { | |||
| WxVtwoCashBackAward activityAwardDel = new WxVtwoCashBackAward(); | |||
| activityAwardDel.updateTenantInfo(tenantEntity); | |||
| activityAwardDel.setActivityId(activityId); | |||
| wxVtwoCashBackAwardMapper.delete(new QueryWrapper<>(activityAwardDel)); | |||
| List<WxVtwoCashBackAward> awardList = new ArrayList<>(); | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| Date now = new Date(); | |||
| if(amountRulesObject != null && !amountRulesObject.isEmpty()) { | |||
| for (WxVtwoCashBackAward activityAward : amountRulesObject) { | |||
| if(activityAward.getId() == null){ | |||
| activityAward.setId(idWorker.nextId()); | |||
| } | |||
| activityAward.updateTenantInfo(tenantEntity); | |||
| activityAward.setActivityId(activityId); | |||
| activityAward.setModelType(EnumOfflineActivityAwardsModeType.AMOUNT.getCode()); | |||
| if(activityAward.getCreateDate() == null){ | |||
| activityAward.setCreateDate(now); | |||
| } | |||
| activityAward.setUpdateDate(now); | |||
| } | |||
| awardList.addAll(amountRulesObject); | |||
| } | |||
| if(relatedRulesObject != null && !relatedRulesObject.isEmpty()) { | |||
| for (WxVtwoCashBackAward activityAward : relatedRulesObject) { | |||
| if(activityAward.getId() == null){ | |||
| activityAward.setId(idWorker.nextId()); | |||
| } | |||
| activityAward.updateTenantInfo(tenantEntity); | |||
| activityAward.setActivityId(activityId); | |||
| activityAward.setModelType(EnumOfflineActivityAwardsModeType.COUNT.getCode()); | |||
| if(activityAward.getCreateDate() == null){ | |||
| activityAward.setCreateDate(now); | |||
| } | |||
| activityAward.setUpdateDate(now); | |||
| } | |||
| awardList.addAll(relatedRulesObject); | |||
| } | |||
| wxVtwoCashBackAwardMapper.insertList(awardList); | |||
| } | |||
| } | |||
| @@ -0,0 +1,22 @@ | |||
| package com.iformall.service.impl; | |||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
| import com.iformall.domain.po.WxVtwoCashBackGrantAward; | |||
| import com.iformall.service.WxVtwoCashBackGrantAwardService; | |||
| import com.iformall.mapper.WxVtwoCashBackGrantAwardMapper; | |||
| import org.springframework.stereotype.Service; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_cash_back_grant_award(线下返现活动发放奖励)】的数据库操作Service实现 | |||
| * @createDate 2025-05-16 00:37:32 | |||
| */ | |||
| @Service | |||
| public class WxVtwoCashBackGrantAwardServiceImpl extends ServiceImpl<WxVtwoCashBackGrantAwardMapper, WxVtwoCashBackGrantAward> | |||
| implements WxVtwoCashBackGrantAwardService{ | |||
| } | |||
| @@ -0,0 +1,22 @@ | |||
| package com.iformall.service.impl; | |||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
| import com.iformall.domain.po.WxVtwoCashBackGrant; | |||
| import com.iformall.service.WxVtwoCashBackGrantService; | |||
| import com.iformall.mapper.WxVtwoCashBackGrantMapper; | |||
| import org.springframework.stereotype.Service; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_cash_back_grant(线下返现活动发奖)】的数据库操作Service实现 | |||
| * @createDate 2025-05-16 00:37:32 | |||
| */ | |||
| @Service | |||
| public class WxVtwoCashBackGrantServiceImpl extends ServiceImpl<WxVtwoCashBackGrantMapper, WxVtwoCashBackGrant> | |||
| implements WxVtwoCashBackGrantService{ | |||
| } | |||
| @@ -0,0 +1,202 @@ | |||
| package com.iformall.service.impl; | |||
| import com.alibaba.fastjson.JSONArray; | |||
| import com.alibaba.fastjson.JSONObject; | |||
| import com.baomidou.mybatisplus.core.conditions.Wrapper; | |||
| import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
| import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.IdWorker; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.domain.vo.OfflineActivityRecordStatistics; | |||
| import com.iformall.domain.vo.WxVtwoActivityOrderStatistics; | |||
| import com.iformall.domain.vo.WxVtwoActivityRule; | |||
| import com.iformall.domain.vo.WxVtwoActivityRuleDetail; | |||
| import com.iformall.enums.EnumOfflineActivityMerchantType; | |||
| import com.iformall.enums.EnumOfflineActivityRecordStatus; | |||
| import com.iformall.enums.EnumOfflineActivityStatus; | |||
| import com.iformall.enums.EnumYesOrNo; | |||
| import com.iformall.mapper.*; | |||
| import com.iformall.service.WxVtwoActivityAwardService; | |||
| import com.iformall.service.WxVtwoActivityMerchantService; | |||
| import com.iformall.service.WxVtwoPrizeDrawActivityService; | |||
| import jodd.util.StringUtil; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import org.springframework.transaction.annotation.Transactional; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_prize_draw_activity(线下抽奖活动)】的数据库操作Service实现 | |||
| * @createDate 2025-05-19 00:37:40 | |||
| */ | |||
| @Service | |||
| public class WxVtwoPrizeDrawActivityServiceImpl extends ServiceImpl<WxVtwoPrizeDrawActivityMapper, WxVtwoPrizeDrawActivity> | |||
| implements WxVtwoPrizeDrawActivityService{ | |||
| @Autowired | |||
| private WxVtwoPrizeDrawActivityMapper wxVtwoPrizeDrawActivityMapper; | |||
| @Autowired | |||
| private WxVtwoActivityAwardMapper wxVtwoActivityAwardMapper; | |||
| @Autowired | |||
| private WxVtwoActivityMerchantMapper wxVtwoActivityMerchantMapper; | |||
| @Autowired | |||
| private WxVtwoActivityOrderMapper wxVtwoActivityOrderMapper; | |||
| @Autowired | |||
| private WxVtwoActivityGrantSettlementMapper wxVtwoActivityGrantSettlementMapper; | |||
| @Autowired | |||
| private WxVtwoActivityAwardService wxVtwoActivityAwardService; | |||
| @Autowired | |||
| private WxVtwoActivityMerchantService wxVtwoActivityMerchantService; | |||
| @Override | |||
| public PageInfo<WxVtwoPrizeDrawActivity> listAsPage(WxVtwoPrizeDrawActivity prizeDrawActivity, Integer pageNum, Integer pageSize) { | |||
| handlerQuery(prizeDrawActivity); | |||
| PageInfo<WxVtwoPrizeDrawActivity> activityPageInfo = PageHelper.startPage(pageNum, pageSize).doSelectPageInfo(() -> wxVtwoPrizeDrawActivityMapper.findList(prizeDrawActivity)); | |||
| handlerReturnList(activityPageInfo.getList()); | |||
| return activityPageInfo; | |||
| } | |||
| private void handlerQuery(WxVtwoPrizeDrawActivity prizeDrawActivity) { | |||
| if (null != prizeDrawActivity.getStatus()) { | |||
| //已上架 | |||
| if(EnumOfflineActivityStatus.ON_LINE.getCode().equals(prizeDrawActivity.getStatus())){ | |||
| prizeDrawActivity.setValidStatus(EnumYesOrNo.NO.getCode()); | |||
| } | |||
| //已过期 | |||
| else if(EnumOfflineActivityStatus.EXPIRE.getCode().equals(prizeDrawActivity.getStatus())){ | |||
| prizeDrawActivity.setStatus(null); | |||
| prizeDrawActivity.setValidStatus(EnumYesOrNo.YES.getCode()); | |||
| } | |||
| } | |||
| } | |||
| private void handlerReturnList(List<WxVtwoPrizeDrawActivity> list) { | |||
| if (null != list && !list.isEmpty()) { | |||
| Date now = new Date(); | |||
| for (WxVtwoPrizeDrawActivity activity : list) { | |||
| if(now.after(activity.getEndTime())){ | |||
| activity.setStatus(EnumOfflineActivityStatus.EXPIRE.getCode()); | |||
| } | |||
| //参与订单数 | |||
| WxVtwoActivityOrder activityOrderQ = new WxVtwoActivityOrder(); | |||
| activityOrderQ.updateTenantInfo(activity); | |||
| activityOrderQ.setCreateDateBegin(activity.getStartTime()); | |||
| activityOrderQ.setCreateDateEnd(activity.getEndTime()); | |||
| if(EnumOfflineActivityMerchantType.ADD.getCode().equals(activity.getMerchantRule())){ | |||
| List<Long> merchantIds = wxVtwoActivityMerchantMapper.getMerchantIdList(activity.getId(), activity.getTenantId()); | |||
| activityOrderQ.setMerchantIdList(merchantIds); | |||
| }else if(EnumOfflineActivityMerchantType.UN_ADD.getCode().equals(activity.getMerchantRule())){ | |||
| List<Long> merchantIds = wxVtwoActivityMerchantMapper.getMerchantIdList(activity.getId(), activity.getTenantId()); | |||
| activityOrderQ.setNotMerchantIdList(merchantIds); | |||
| } | |||
| List<WxVtwoActivityOrderStatistics> auditStatusStatistics = wxVtwoActivityOrderMapper.auditStatusStatistics(activityOrderQ); | |||
| Integer audting = 0, audi_success = 0, audt_fail = 0, invalid = 0; | |||
| for(WxVtwoActivityOrderStatistics statistics : auditStatusStatistics){ | |||
| if(EnumOfflineActivityRecordStatus.AUDTING.getCode().equals(statistics.getAuditStatus())){ | |||
| audting = statistics.getCount(); | |||
| } else if (EnumOfflineActivityRecordStatus.AUDI_SUCCESS.getCode().equals(statistics.getAuditStatus())) { | |||
| audi_success = statistics.getCount(); | |||
| } else if (EnumOfflineActivityRecordStatus.AUDT_FAIL.getCode().equals(statistics.getAuditStatus())) { | |||
| audt_fail = statistics.getCount(); | |||
| }else if (EnumOfflineActivityRecordStatus.INVALID.getCode().equals(statistics.getAuditStatus())) { | |||
| invalid = statistics.getCount(); | |||
| } | |||
| } | |||
| activity.setOrderCount(audting+audi_success+audt_fail+invalid); | |||
| activity.setWaitOrderCount(audting); | |||
| activity.setSuccessOrderCount(audi_success); | |||
| //参与商户数 | |||
| activity.setMershantCount(wxVtwoActivityOrderMapper.getMerchantCount(activityOrderQ)); | |||
| //发放订单数量 | |||
| WxVtwoActivityGrantSettlement grantSettlementQ = new WxVtwoActivityGrantSettlement(); | |||
| grantSettlementQ.updateTenantInfo(activity); | |||
| grantSettlementQ.setActivityId(activity.getId()); | |||
| grantSettlementQ.setStatus(EnumYesOrNo.YES.getCode()); | |||
| activity.setGrantOrderCount(wxVtwoActivityGrantSettlementMapper.getOrderCount(grantSettlementQ)); | |||
| } | |||
| } | |||
| } | |||
| @Override | |||
| @Transactional(rollbackFor = Exception.class) | |||
| public boolean saveOrUpdate(WxVtwoPrizeDrawActivity prizeDrawActivity) { | |||
| handlerActivityRules(prizeDrawActivity); | |||
| Date now = new Date(); | |||
| if(prizeDrawActivity.getId() == null){ | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| prizeDrawActivity.setId(idWorker.nextId()); | |||
| prizeDrawActivity.setCreateDate(now); | |||
| prizeDrawActivity.setCreateDate(now); | |||
| prizeDrawActivity.setStatus(EnumOfflineActivityStatus.OFF_LINE.getCode()); | |||
| wxVtwoPrizeDrawActivityMapper.insert(prizeDrawActivity); | |||
| } | |||
| else{ | |||
| prizeDrawActivity.setUpdateDate(now); | |||
| wxVtwoPrizeDrawActivityMapper.updateById(prizeDrawActivity); | |||
| } | |||
| if(prizeDrawActivity.getAwardList() != null && !prizeDrawActivity.getAwardList().isEmpty()){ | |||
| wxVtwoActivityAwardService.saveFromActivity(prizeDrawActivity,prizeDrawActivity.getId(),prizeDrawActivity.getAwardList()); | |||
| } | |||
| if(prizeDrawActivity.getMerchantRule() != null){ | |||
| if(EnumOfflineActivityMerchantType.ALL.getCode().equals(prizeDrawActivity.getMerchantRule())){ | |||
| prizeDrawActivity.setMerchantIdList(null); | |||
| } | |||
| wxVtwoActivityMerchantService.saveFromActivity(prizeDrawActivity,prizeDrawActivity.getId(),prizeDrawActivity.getMerchantIdList()); | |||
| } | |||
| return true; | |||
| } | |||
| private void handlerActivityRules(WxVtwoPrizeDrawActivity prizeDrawActivity) { | |||
| if(prizeDrawActivity.getAmountRulesObject() != null){ | |||
| prizeDrawActivity.setAmountRules(JSONObject.toJSONString(prizeDrawActivity.getAmountRulesObject())); | |||
| } | |||
| if(prizeDrawActivity.getRelatedRulesObject() != null){ | |||
| prizeDrawActivity.setRelatedRules(JSONObject.toJSONString(prizeDrawActivity.getRelatedRulesObject())); | |||
| } | |||
| } | |||
| @Override | |||
| public WxVtwoPrizeDrawActivity getInfoById(Long id, String tenantId) { | |||
| WxVtwoPrizeDrawActivity prizeDrawActivity = wxVtwoPrizeDrawActivityMapper.selectById(id, tenantId); | |||
| if (prizeDrawActivity == null) { | |||
| return null; | |||
| } | |||
| if(StringUtil.isNotBlank(prizeDrawActivity.getAmountRules())){ | |||
| prizeDrawActivity.setAmountRulesObject(JSONObject.parseObject(prizeDrawActivity.getAmountRules(), WxVtwoActivityRule.class)); | |||
| } | |||
| if(StringUtil.isNotBlank(prizeDrawActivity.getRelatedRules())){ | |||
| prizeDrawActivity.setRelatedRulesObject(JSONObject.parseArray(prizeDrawActivity.getRelatedRules(), WxVtwoActivityRuleDetail.class)); | |||
| } | |||
| WxVtwoActivityAward activityAwardQ = new WxVtwoActivityAward(); | |||
| activityAwardQ.setTenantId(tenantId); | |||
| activityAwardQ.setActivityId(id); | |||
| List<WxVtwoActivityAward> activityAwardList = wxVtwoActivityAwardMapper.findList(activityAwardQ); | |||
| prizeDrawActivity.setAwardList(activityAwardList); | |||
| if(!EnumOfflineActivityMerchantType.ALL.getCode().equals(prizeDrawActivity.getMerchantRule())){ | |||
| List<WxVtwoActivityMerchant> activityMerchantList = wxVtwoActivityMerchantService.getActivityMerchantList(id,tenantId); | |||
| prizeDrawActivity.setMerchanList(activityMerchantList); | |||
| } | |||
| return prizeDrawActivity; | |||
| } | |||
| } | |||
| @@ -0,0 +1,22 @@ | |||
| package com.iformall.service.impl; | |||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
| import com.iformall.domain.po.WxVtwoSpecialTopicActivity; | |||
| import com.iformall.service.WxVtwoSpecialTopicActivityService; | |||
| import com.iformall.mapper.WxVtwoSpecialTopicActivityMapper; | |||
| import org.springframework.stereotype.Service; | |||
| /** | |||
| * @author xiaohu | |||
| * @description 针对表【wx_vtwo_special_topic_activity(线下专题下的活动)】的数据库操作Service实现 | |||
| * @createDate 2025-05-19 00:37:40 | |||
| */ | |||
| @Service | |||
| public class WxVtwoSpecialTopicActivityServiceImpl extends ServiceImpl<WxVtwoSpecialTopicActivityMapper, WxVtwoSpecialTopicActivity> | |||
| implements WxVtwoSpecialTopicActivityService{ | |||
| } | |||
| @@ -0,0 +1,80 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <!DOCTYPE mapper | |||
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| <mapper namespace="com.iformall.mapper.WxVtwoActivityAwardMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxVtwoActivityAward"> | |||
| <id property="id" column="id" jdbcType="BIGINT"/> | |||
| <result property="tenantId" column="tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="parentTenantId" column="parent_tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="activityId" column="activity_id" jdbcType="BIGINT"/> | |||
| <result property="grade" column="grade" jdbcType="INTEGER"/> | |||
| <result property="name" column="name" jdbcType="VARCHAR"/> | |||
| <result property="price" column="price" jdbcType="DECIMAL"/> | |||
| <result property="shareRule" column="share_rule" jdbcType="SMALLINT"/> | |||
| <result property="mallShareRate" column="mall_share_rate" jdbcType="DECIMAL"/> | |||
| <result property="merchantShareRate" column="merchant_share_rate" jdbcType="DECIMAL"/> | |||
| <result property="createDate" column="create_date" jdbcType="TIMESTAMP"/> | |||
| <result property="updateDate" column="update_date" jdbcType="TIMESTAMP"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| id,tenant_id,parent_tenant_id, | |||
| activity_id,grade,name, | |||
| price,share_rule,mall_share_rate, | |||
| merchant_share_rate,create_date,update_date | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| where 1 = 1 | |||
| <if test=" null != id "> | |||
| and `id` = #{id} | |||
| </if> | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and `parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| <if test=" null != activityId "> | |||
| and `activity_id` = #{activityId} | |||
| </if> | |||
| <if test=" null != grade "> | |||
| and `grade` = #{grade} | |||
| </if> | |||
| <if test=" null != ids "> | |||
| and id in | |||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||
| #{idItem} | |||
| </foreach> | |||
| </if> | |||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | |||
| </sql> | |||
| <select id="findList" parameterType="com.iformall.domain.po.WxVtwoActivityAward" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_activity_award | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_activity_award | |||
| where id = #{id} and tenant_id=#{tenantId} | |||
| </select> | |||
| <insert id="insertList" parameterType="java.util.List"> | |||
| insert into wx_vtwo_activity_award | |||
| (id, | |||
| activity_id,grade,name, | |||
| price,share_rule,mall_share_rate, | |||
| merchant_share_rate,create_date,update_date) | |||
| values | |||
| <foreach collection="awardList" item="item" index="index" separator=","> | |||
| (#{item.id,jdbcType=BIGINT}, | |||
| #{item.activityId,jdbcType=BIGINT},#{item.grade,jdbcType=INTEGER},#{item.name,jdbcType=VARCHAR}, | |||
| #{item.price,jdbcType=DECIMAL},#{item.shareRule,jdbcType=SMALLINT},#{item.mallShareRate,jdbcType=DECIMAL}, | |||
| #{item.merchantShareRate,jdbcType=DECIMAL},#{item.createDate,jdbcType=TIMESTAMP},#{item.updateDate,jdbcType=TIMESTAMP}) | |||
| </foreach> | |||
| </insert> | |||
| </mapper> | |||
| @@ -0,0 +1,94 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <!DOCTYPE mapper | |||
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| <mapper namespace="com.iformall.mapper.WxVtwoActivityGrantAwardMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxVtwoActivityGrantAward"> | |||
| <id property="id" column="id" jdbcType="BIGINT"/> | |||
| <result property="tenantId" column="tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="parentTenantId" column="parent_tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="activityId" column="activity_id" jdbcType="BIGINT"/> | |||
| <result property="activityName" column="activity_name" jdbcType="VARCHAR"/> | |||
| <result property="grantId" column="grant_id" jdbcType="BIGINT"/> | |||
| <result property="orderId" column="order_id" jdbcType="BIGINT"/> | |||
| <result property="orderAmount" column="order_amount" jdbcType="DECIMAL"/> | |||
| <result property="modeType" column="mode_type" jdbcType="SMALLINT"/> | |||
| <result property="minAmount" column="min_amount" jdbcType="DECIMAL"/> | |||
| <result property="maxAmount" column="max_amount" jdbcType="DECIMAL"/> | |||
| <result property="relatedCount" column="related_count" jdbcType="INTEGER"/> | |||
| <result property="awardId" column="award_id" jdbcType="BIGINT"/> | |||
| <result property="awardGrade" column="award_grade" jdbcType="INTEGER"/> | |||
| <result property="awardName" column="award_name" jdbcType="VARCHAR"/> | |||
| <result property="awardPrice" column="award_price" jdbcType="DECIMAL"/> | |||
| <result property="awardCount" column="award_count" jdbcType="INTEGER"/> | |||
| <result property="grantPrice" column="grant_price" jdbcType="DECIMAL"/> | |||
| <result property="moneyRule" column="money_rule" jdbcType="SMALLINT"/> | |||
| <result property="mallShareRate" column="mall_share_rate" jdbcType="DECIMAL"/> | |||
| <result property="merchantShareRate" column="merchant_share_rate" jdbcType="DECIMAL"/> | |||
| <result property="status" column="status" jdbcType="SMALLINT"/> | |||
| <result property="createDate" column="create_date" jdbcType="TIMESTAMP"/> | |||
| <result property="updateDate" column="update_date" jdbcType="TIMESTAMP"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| id,tenant_id,parent_tenant_id, | |||
| activity_id,activity_name,grant_id, | |||
| order_id,order_amount,mode_type, | |||
| min_amount,max_amount,related_count, | |||
| award_id,award_grade,award_name, | |||
| award_price,award_count,grant_price, | |||
| money_rule,mall_share_rate,merchant_share_rate, | |||
| status,create_date,update_date | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| where 1 = 1 | |||
| <if test=" null != id "> | |||
| and `id` = #{id} | |||
| </if> | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and `parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| <if test=" null != activityId "> | |||
| and `activity_id` = #{activityId} | |||
| </if> | |||
| <if test=" null != orderId "> | |||
| and `order_id` = #{orderId} | |||
| </if> | |||
| <if test=" null != grantId "> | |||
| and `grant_id` = #{grantId} | |||
| </if> | |||
| <if test=" null != modeType "> | |||
| and `mode_type` = #{modeType} | |||
| </if> | |||
| <if test=" null != awardId "> | |||
| and `award_id` = #{awardId} | |||
| </if> | |||
| <if test=" null != status "> | |||
| and `status` = #{status} | |||
| </if> | |||
| <if test=" null != ids "> | |||
| and id in | |||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||
| #{idItem} | |||
| </foreach> | |||
| </if> | |||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | |||
| </sql> | |||
| <select id="findList" parameterType="com.iformall.domain.po.WxVtwoActivityGrantAward" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_activity_grant_award | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_activity_grant_award | |||
| where id = #{id} and tenant_id=#{tenantId} | |||
| </select> | |||
| </mapper> | |||
| @@ -0,0 +1,113 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <!DOCTYPE mapper | |||
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| <mapper namespace="com.iformall.mapper.WxVtwoActivityGrantExportMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxVtwoActivityGrantExport"> | |||
| <id property="id" column="id" jdbcType="BIGINT"/> | |||
| <result property="tenantId" column="tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="parentTenantId" column="parent_tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="activityId" column="activity_id" jdbcType="BIGINT"/> | |||
| <result property="orderId" column="order_id" jdbcType="BIGINT"/> | |||
| <result property="orderNo" column="order_no" jdbcType="VARCHAR"/> | |||
| <result property="orderAmount" column="order_amount" jdbcType="DECIMAL"/> | |||
| <result property="merchantId" column="merchant_id" jdbcType="BIGINT"/> | |||
| <result property="merchantName" column="merchant_name" jdbcType="VARCHAR"/> | |||
| <result property="merchantShopNum" column="merchant_shop_num" jdbcType="VARCHAR"/> | |||
| <result property="businessId" column="business_id" jdbcType="INTEGER"/> | |||
| <result property="businessName" column="business_name" jdbcType="VARCHAR"/> | |||
| <result property="lotteryNum" column="lottery_num" jdbcType="VARCHAR"/> | |||
| <result property="lotteryCount" column="lottery_count" jdbcType="INTEGER"/> | |||
| <result property="anniversaryLotteryNum" column="anniversary_lottery_num" jdbcType="VARCHAR"/> | |||
| <result property="orderCreateTime" column="order_create_time" jdbcType="TIMESTAMP"/> | |||
| <result property="orderAuditStatus" column="order_audit_status" jdbcType="INTEGER"/> | |||
| <result property="orderAuditBy" column="order_audit_by" jdbcType="BIGINT"/> | |||
| <result property="orderAuditName" column="order_audit_name" jdbcType="VARCHAR"/> | |||
| <result property="orderAuditRemark" column="order_audit_remark" jdbcType="VARCHAR"/> | |||
| <result property="orderAuditTime" column="order_audit_time" jdbcType="TIMESTAMP"/> | |||
| <result property="vipNum" column="vip_num" jdbcType="VARCHAR"/> | |||
| <result property="cusName" column="cus_name" jdbcType="VARCHAR"/> | |||
| <result property="cusPhone" column="cus_phone" jdbcType="VARCHAR"/> | |||
| <result property="cusCard" column="cus_card" jdbcType="VARCHAR"/> | |||
| <result property="cusAddress" column="cus_address" jdbcType="VARCHAR"/> | |||
| <result property="legionId" column="legion_id" jdbcType="BIGINT"/> | |||
| <result property="legionName" column="legion_name" jdbcType="VARCHAR"/> | |||
| <result property="unionId" column="union_id" jdbcType="BIGINT"/> | |||
| <result property="unionName" column="union_name" jdbcType="VARCHAR"/> | |||
| <result property="grantId" column="grant_id" jdbcType="BIGINT"/> | |||
| <result property="grantUserName" column="grant_user_name" jdbcType="VARCHAR"/> | |||
| <result property="grantUserCard" column="grant_user_card" jdbcType="VARCHAR"/> | |||
| <result property="grantBy" column="grant_by" jdbcType="BIGINT"/> | |||
| <result property="grantByName" column="grant_by_name" jdbcType="VARCHAR"/> | |||
| <result property="grantTime" column="grant_time" jdbcType="TIMESTAMP"/> | |||
| <result property="grantRemark" column="grant_remark" jdbcType="VARCHAR"/> | |||
| <result property="signImg" column="sign_img" jdbcType="VARCHAR"/> | |||
| <result property="grantDetail" column="grant_detail" jdbcType="VARCHAR"/> | |||
| <result property="grantPrice" column="grant_price" jdbcType="DECIMAL"/> | |||
| <result property="mallSharePrice" column="mall_share_price" jdbcType="DECIMAL"/> | |||
| <result property="merchantSharePrice" column="merchant_share_price" jdbcType="DECIMAL"/> | |||
| <result property="mallShareRate" column="mall_share_rate" jdbcType="DECIMAL"/> | |||
| <result property="merchantShareRate" column="merchant_share_rate" jdbcType="DECIMAL"/> | |||
| <result property="taxAmount" column="tax_amount" jdbcType="DECIMAL"/> | |||
| <result property="status" column="status" jdbcType="SMALLINT"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| id,tenant_id,parent_tenant_id, | |||
| activity_id,order_id,order_no, | |||
| order_amount,merchant_id,merchant_name, | |||
| merchant_shop_num,business_id,business_name, | |||
| lottery_num,lottery_count,anniversary_lottery_num, | |||
| order_create_time,order_audit_status,order_audit_by, | |||
| order_audit_name,order_audit_remark,order_audit_time, | |||
| vip_num,cus_name,cus_phone, | |||
| cus_card,cus_address,legion_id, | |||
| legion_name,union_id,union_name, | |||
| grant_id,grant_user_name,grant_user_card, | |||
| grant_by,grant_by_name,grant_time,grant_remark, | |||
| sign_img,grant_detail,grant_price, | |||
| mall_share_price,merchant_share_price,mall_share_rate, | |||
| merchant_share_rate,tax_amount,status | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| where 1 = 1 | |||
| <if test=" null != id "> | |||
| and `id` = #{id} | |||
| </if> | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and `parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| <if test=" null != activityId "> | |||
| and `activity_id` = #{activityId} | |||
| </if> | |||
| <if test=" null != orderId "> | |||
| and `order_id` = #{orderId} | |||
| </if> | |||
| <if test=" null != grantId "> | |||
| and `grant_id` = #{grantId} | |||
| </if> | |||
| <if test=" null != ids "> | |||
| and id in | |||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||
| #{idItem} | |||
| </foreach> | |||
| </if> | |||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | |||
| </sql> | |||
| <select id="findList" parameterType="com.iformall.domain.po.WxVtwoActivityGrantExport" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_activity_grant_export | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_activity_grant_export | |||
| where id = #{id} and tenant_id=#{tenantId} | |||
| </select> | |||
| </mapper> | |||
| @@ -0,0 +1,79 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <!DOCTYPE mapper | |||
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| <mapper namespace="com.iformall.mapper.WxVtwoActivityGrantMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxVtwoActivityGrant"> | |||
| <id property="id" column="id" jdbcType="BIGINT"/> | |||
| <result property="tenantId" column="tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="parentTenantId" column="parent_tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="activityId" column="activity_id" jdbcType="BIGINT"/> | |||
| <result property="activityName" column="activity_name" jdbcType="VARCHAR"/> | |||
| <result property="orderMoneySum" column="order_money_sum" jdbcType="DECIMAL"/> | |||
| <result property="orderCount" column="order_count" jdbcType="INTEGER"/> | |||
| <result property="cusName" column="cus_name" jdbcType="VARCHAR"/> | |||
| <result property="cusPhone" column="cus_phone" jdbcType="VARCHAR"/> | |||
| <result property="lotteryNum" column="lottery_num" jdbcType="VARCHAR"/> | |||
| <result property="lotteryCount" column="lottery_count" jdbcType="INTEGER"/> | |||
| <result property="anniversaryLotteryNum" column="anniversary_lottery_num" jdbcType="VARCHAR"/> | |||
| <result property="realName" column="real_name" jdbcType="VARCHAR"/> | |||
| <result property="realCard" column="real_card" jdbcType="VARCHAR"/> | |||
| <result property="remark" column="remark" jdbcType="VARCHAR"/> | |||
| <result property="signImg" column="sign_img" jdbcType="VARCHAR"/> | |||
| <result property="status" column="status" jdbcType="SMALLINT"/> | |||
| <result property="createBy" column="create_by" jdbcType="BIGINT"/> | |||
| <result property="createDate" column="create_date" jdbcType="TIMESTAMP"/> | |||
| <result property="updateDate" column="update_date" jdbcType="TIMESTAMP"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| id,tenant_id,parent_tenant_id, | |||
| activity_id,activity_name,order_money_sum, | |||
| order_count,cus_name,cus_phone, | |||
| lottery_num,lottery_count,anniversary_lottery_num, | |||
| real_name,real_card,remark,sign_img, | |||
| status,create_by,create_date, | |||
| update_date | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| where 1 = 1 | |||
| <if test=" null != id "> | |||
| and `id` = #{id} | |||
| </if> | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and `parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| <if test=" null != activityId "> | |||
| and `activity_id` = #{activityId} | |||
| </if> | |||
| <if test=" null != status "> | |||
| and `status` = #{status} | |||
| </if> | |||
| <if test=" null != ids "> | |||
| and id in | |||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||
| #{idItem} | |||
| </foreach> | |||
| </if> | |||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | |||
| </sql> | |||
| <select id="findList" parameterType="com.iformall.domain.po.WxVtwoActivityGrant" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_activity_grant | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_activity_grant | |||
| where id = #{id} and tenant_id=#{tenantId} | |||
| </select> | |||
| </mapper> | |||
| @@ -0,0 +1,63 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <!DOCTYPE mapper | |||
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| <mapper namespace="com.iformall.mapper.WxVtwoActivityGrantOrderMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxVtwoActivityGrantOrder"> | |||
| <id property="id" column="id" jdbcType="BIGINT"/> | |||
| <result property="tenantId" column="tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="parentTenantId" column="parent_tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="grantId" column="grant_id" jdbcType="BIGINT"/> | |||
| <result property="orderId" column="order_id" jdbcType="BIGINT"/> | |||
| <result property="isAmount" column="is_amount" jdbcType="SMALLINT"/> | |||
| <result property="status" column="status" jdbcType="SMALLINT"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| id,tenant_id,parent_tenant_id, | |||
| grant_id,order_id,is_amount, | |||
| status | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| where 1 = 1 | |||
| <if test=" null != id "> | |||
| and `id` = #{id} | |||
| </if> | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and `parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| <if test=" null != grantId "> | |||
| and `grant_id` = #{grantId} | |||
| </if> | |||
| <if test=" null != orderId "> | |||
| and `order_id` = #{orderId} | |||
| </if> | |||
| <if test=" null != status "> | |||
| and `status` = #{status} | |||
| </if> | |||
| <if test=" null != ids "> | |||
| and id in | |||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||
| #{idItem} | |||
| </foreach> | |||
| </if> | |||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | |||
| </sql> | |||
| <select id="findList" parameterType="com.iformall.domain.po.WxVtwoActivityGrantOrder" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_activity_grant_order | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_activity_grant_order | |||
| where id = #{id} and tenant_id=#{tenantId} | |||
| </select> | |||
| </mapper> | |||
| @@ -0,0 +1,95 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <!DOCTYPE mapper | |||
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| <mapper namespace="com.iformall.mapper.WxVtwoActivityGrantSettlementMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxVtwoActivityGrantSettlement"> | |||
| <id property="id" column="id" jdbcType="BIGINT"/> | |||
| <result property="tenantId" column="tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="parentTenantId" column="parent_tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="activityId" column="activity_id" jdbcType="BIGINT"/> | |||
| <result property="grantId" column="grant_id" jdbcType="BIGINT"/> | |||
| <result property="grantAwardId" column="grant_award_id" jdbcType="BIGINT"/> | |||
| <result property="awardId" column="award_id" jdbcType="BIGINT"/> | |||
| <result property="grantPrice" column="grant_price" jdbcType="DECIMAL"/> | |||
| <result property="orderId" column="order_id" jdbcType="BIGINT"/> | |||
| <result property="orderNo" column="order_no" jdbcType="VARCHAR"/> | |||
| <result property="orderAmount" column="order_amount" jdbcType="DECIMAL"/> | |||
| <result property="merchantId" column="merchant_id" jdbcType="BIGINT"/> | |||
| <result property="orderRatio" column="order_ratio" jdbcType="DECIMAL"/> | |||
| <result property="orderGrantPrice" column="order_grant_price" jdbcType="DECIMAL"/> | |||
| <result property="mallShareRate" column="mall_share_rate" jdbcType="DECIMAL"/> | |||
| <result property="merchantShareRate" column="merchant_share_rate" jdbcType="DECIMAL"/> | |||
| <result property="orderMallSharePrice" column="order_mall_share_price" jdbcType="DECIMAL"/> | |||
| <result property="orderMerchantSharePrice" column="order_merchant_share_price" jdbcType="DECIMAL"/> | |||
| <result property="taxAmount" column="tax_amount" jdbcType="DECIMAL"/> | |||
| <result property="status" column="status" jdbcType="SMALLINT"/> | |||
| <result property="createDate" column="create_date" jdbcType="TIMESTAMP"/> | |||
| <result property="updateDate" column="update_date" jdbcType="TIMESTAMP"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| id,tenant_id,parent_tenant_id, | |||
| activity_id,grant_id,grant_award_id, | |||
| award_id,grant_price,order_id, | |||
| order_no,order_amount,merchant_id, | |||
| order_ratio,order_grant_price,mall_share_rate, | |||
| merchant_share_rate,order_mall_share_price,order_merchant_share_price, | |||
| tax_amount,status,create_date, | |||
| update_date | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| where 1 = 1 | |||
| <if test=" null != id "> | |||
| and `id` = #{id} | |||
| </if> | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and `parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| <if test=" null != activityId "> | |||
| and `activity_id` = #{activityId} | |||
| </if> | |||
| <if test=" null != grantId "> | |||
| and `grant_id` = #{grantId} | |||
| </if> | |||
| <if test=" null != grantAwardId "> | |||
| and `grant_award_id` = #{grantAwardId} | |||
| </if> | |||
| <if test=" null != awardId "> | |||
| and `award_id` = #{awardId} | |||
| </if> | |||
| <if test=" null != status "> | |||
| and `status` = #{status} | |||
| </if> | |||
| <if test=" null != ids "> | |||
| and id in | |||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||
| #{idItem} | |||
| </foreach> | |||
| </if> | |||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | |||
| </sql> | |||
| <select id="findList" parameterType="com.iformall.domain.po.WxVtwoActivityGrantSettlement" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_activity_grant_settlement | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_activity_grant_settlement | |||
| where id = #{id} and tenant_id=#{tenantId} | |||
| </select> | |||
| <select id="getOrderCount" parameterType="com.iformall.domain.po.WxVtwoActivityGrantSettlement" resultType="Integer"> | |||
| SELECT count(DISTINCT order_id) as 'orderCount' | |||
| FROM wx_vtwo_activity_grant_settlement | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| </mapper> | |||
| @@ -0,0 +1,74 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <!DOCTYPE mapper | |||
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| <mapper namespace="com.iformall.mapper.WxVtwoActivityMerchantMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxVtwoActivityMerchant"> | |||
| <id property="id" column="id" jdbcType="BIGINT"/> | |||
| <result property="tenantId" column="tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="parentTenantId" column="parent_tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="activityId" column="activity_id" jdbcType="BIGINT"/> | |||
| <result property="merchantId" column="merchant_id" jdbcType="BIGINT"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| id,tenant_id,parent_tenant_id, | |||
| activity_id,merchant_id | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| where 1 = 1 | |||
| <if test=" null != id "> | |||
| and `id` = #{id} | |||
| </if> | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and `parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| <if test=" null != activityId "> | |||
| and `activity_id` = #{activityId} | |||
| </if> | |||
| <if test=" null != merchantId "> | |||
| and `merchant_id` = #{merchantId} | |||
| </if> | |||
| <if test=" null != ids "> | |||
| and id in | |||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||
| #{idItem} | |||
| </foreach> | |||
| </if> | |||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | |||
| </sql> | |||
| <select id="findList" parameterType="com.iformall.domain.po.WxVtwoActivityMerchant" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_activity_merchant | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_activity_merchant | |||
| where id = #{id} and tenant_id=#{tenantId} | |||
| </select> | |||
| <insert id="insertList" parameterType="java.util.List"> | |||
| insert into wx_vtwo_activity_merchant | |||
| (id, | |||
| activity_id,merchant_id) | |||
| values | |||
| <foreach collection="merchantList" item="item" index="index" separator=","> | |||
| (#{item.id,jdbcType=BIGINT}, | |||
| #{item.activityId,jdbcType=BIGINT},#{item.merchantId,jdbcType=BIGINT}) | |||
| </foreach> | |||
| </insert> | |||
| <select id="getMerchantIdList" parameterType="java.util.HashMap" resultType="Long"> | |||
| select merchant_id from wx_vtwo_activity_merchant | |||
| where activity_id = #{activityId} and tenant_id = #{tenantId} | |||
| </select> | |||
| </mapper> | |||
| @@ -0,0 +1,253 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <!DOCTYPE mapper | |||
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| <mapper namespace="com.iformall.mapper.WxVtwoActivityOrderMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxVtwoActivityOrder"> | |||
| <id property="id" column="id" jdbcType="BIGINT"/> | |||
| <result property="tenantId" column="tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="parentTenantId" column="parent_tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="fromUserId" column="from_user_id" jdbcType="BIGINT"/> | |||
| <result property="vipNum" column="vip_num" jdbcType="VARCHAR"/> | |||
| <result property="cusName" column="cus_name" jdbcType="VARCHAR"/> | |||
| <result property="realCusName" column="real_cus_name" jdbcType="VARCHAR"/> | |||
| <result property="cusPhone" column="cus_phone" jdbcType="VARCHAR"/> | |||
| <result property="cusCard" column="cus_card" jdbcType="VARCHAR"/> | |||
| <result property="cusAddress" column="cus_address" jdbcType="VARCHAR"/> | |||
| <result property="legionId" column="legion_id" jdbcType="BIGINT"/> | |||
| <result property="legionName" column="legion_name" jdbcType="VARCHAR"/> | |||
| <result property="unionId" column="union_id" jdbcType="BIGINT"/> | |||
| <result property="unionName" column="union_name" jdbcType="VARCHAR"/> | |||
| <result property="fromOrderId" column="from_order_id" jdbcType="BIGINT"/> | |||
| <result property="orderNo" column="order_no" jdbcType="VARCHAR"/> | |||
| <result property="orderAmount" column="order_amount" jdbcType="DECIMAL"/> | |||
| <result property="merchantId" column="merchant_id" jdbcType="BIGINT"/> | |||
| <result property="businessId" column="business_id" jdbcType="INTEGER"/> | |||
| <result property="lotteryNum" column="lottery_num" jdbcType="VARCHAR"/> | |||
| <result property="lotteryCount" column="lottery_count" jdbcType="INTEGER"/> | |||
| <result property="anniversaryLotteryNum" column="anniversary_lottery_num" jdbcType="VARCHAR"/> | |||
| <result property="auditStatus" column="audit_status" jdbcType="INTEGER"/> | |||
| <result property="auditRemark" column="audit_remark" jdbcType="VARCHAR"/> | |||
| <result property="auditBy" column="audit_by" jdbcType="BIGINT"/> | |||
| <result property="auditTime" column="audit_time" jdbcType="TIMESTAMP"/> | |||
| <result property="increasedPoints" column="increased_points" jdbcType="INTEGER"/> | |||
| <result property="createBy" column="create_by" jdbcType="BIGINT"/> | |||
| <result property="createDate" column="create_date" jdbcType="TIMESTAMP"/> | |||
| <result property="updateDate" column="update_date" jdbcType="TIMESTAMP"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| id,tenant_id,parent_tenant_id, | |||
| from_user_id,vip_num,cus_name, | |||
| real_cus_name,cus_phone,cus_card, | |||
| cus_address,legion_id,legion_name, | |||
| union_id,union_name,from_order_id, | |||
| order_no,order_amount,merchant_id, | |||
| business_id,lottery_num,lottery_count, | |||
| anniversary_lottery_num,audit_status,audit_remark, | |||
| audit_by,audit_time,increased_points, | |||
| create_by,create_date,update_date | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| where 1 = 1 | |||
| <if test=" null != id "> | |||
| and `id` = #{id} | |||
| </if> | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != cusName and cusName != '' "> | |||
| and `cus_name` like concat('%', #{cusName},'%') | |||
| </if> | |||
| <if test=" null != cusPhone and cusPhone != '' "> | |||
| and `cus_phone` = #{cusPhone} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and `parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| <if test=" null != merchantId "> | |||
| and `merchant_id` = #{merchantId} | |||
| </if> | |||
| <if test=" null != businessId "> | |||
| and `business_id` = #{businessId} | |||
| </if> | |||
| <if test=" null != fromOrderId "> | |||
| and `from_order_id` = #{fromOrderId} | |||
| </if> | |||
| <if test=" null != orderNo and orderNo != '' "> | |||
| and `order_no` like concat('%', #{orderNo},'%') | |||
| </if> | |||
| <if test=" null != createDateBegin"> | |||
| and `create_date` >= #{createDateBegin} | |||
| </if> | |||
| <if test=" null != createDateEnd"> | |||
| and `create_date` <= #{createDateEnd} | |||
| </if> | |||
| <if test=" null != auditStatus "> | |||
| and `audit_status` = #{auditStatus} | |||
| </if> | |||
| <if test=" null != merchantIdList "> | |||
| and merchant_id in | |||
| <foreach collection="merchantIdList" index="index" item="midItem" open="(" separator="," close=")"> | |||
| #{midItem} | |||
| </foreach> | |||
| </if> | |||
| <if test=" null != notMerchantIdList "> | |||
| and merchant_id not in | |||
| <foreach collection="notMerchantIdList" index="index" item="midItem" open="(" separator="," close=")"> | |||
| #{midItem} | |||
| </foreach> | |||
| </if> | |||
| <if test=" null != ids "> | |||
| and id in | |||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||
| #{idItem} | |||
| </foreach> | |||
| </if> | |||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | |||
| </sql> | |||
| <select id="findList" parameterType="com.iformall.domain.po.WxVtwoActivityOrder" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_activity_order | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_activity_order | |||
| where id = #{id} and tenant_id=#{tenantId} | |||
| </select> | |||
| <select id="selectLimitOne" parameterType="com.iformall.domain.po.WxVtwoActivityOrder" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_activity_order | |||
| <include refid="dynamicWhereConditions" /> | |||
| limit 1 | |||
| </select> | |||
| <select id="auditStatusStatistics" parameterType="com.iformall.domain.po.WxVtwoActivityOrder" resultType="com.iformall.domain.vo.WxVtwoActivityOrderStatistics"> | |||
| SELECT audit_status as 'auditStatus', | |||
| count(1) as 'count', | |||
| IFNULL(sum(order_amount),0) as 'sumAmount' | |||
| FROM wx_vtwo_activity_order | |||
| <include refid="dynamicWhereConditions" /> | |||
| GROUP BY audit_status | |||
| </select> | |||
| <update id="updateAuditStatus" parameterType="com.iformall.domain.po.WxVtwoActivityOrder"> | |||
| update wx_vtwo_activity_order | |||
| set `audit_status` = #{auditStatus}, | |||
| <if test=" null != lotteryNum and '' != lotteryNum"> | |||
| `lottery_num` = #{lotteryNum}, | |||
| </if> | |||
| <if test=" null != lotteryCount and '' != lotteryCount"> | |||
| `lottery_count` = #{lotteryCount}, | |||
| </if> | |||
| <if test=" null != anniversaryLotteryNum and '' != anniversaryLotteryNum"> | |||
| `anniversary_lottery_num` = #{anniversaryLotteryNum}, | |||
| </if> | |||
| <if test=" null != auditRemark and '' != auditRemark"> | |||
| `audit_remark` = #{auditRemark}, | |||
| </if> | |||
| <if test=" null != auditTime"> | |||
| `audit_time` = #{auditTime}, | |||
| </if> | |||
| <if test=" null != auditBy"> | |||
| `audit_by` = #{auditBy}, | |||
| </if> | |||
| `update_date` = #{updateDate} | |||
| where id = #{id} | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and `parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| </update> | |||
| <select id="getCount" parameterType="com.iformall.domain.po.WxVtwoActivityOrder" resultType="Integer"> | |||
| SELECT COUNT(1) FROM wx_vtwo_activity_order | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| <select id="getMerchantCount" parameterType="com.iformall.domain.po.WxVtwoActivityOrder" resultType="Integer"> | |||
| SELECT COUNT(distinct merchant_id) FROM wx_vtwo_activity_order | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| <select id="getCountStatistics" parameterType="com.iformall.domain.po.WxVtwoActivityOrder" resultType="com.iformall.domain.vo.WxVtwoOrderCountStatistics"> | |||
| select count(DISTINCT cus_phone) userCount, | |||
| count(1) orderCount, | |||
| IFNULL(sum(order_amount),0) sumAmount, | |||
| count(DISTINCT merchant_id) merchantCount | |||
| from wx_vtwo_activity_order | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| <select id="getCountStatisticsChart" parameterType="com.iformall.domain.po.WxVtwoActivityOrder" resultType="com.iformall.domain.vo.WxVtwoOrderCountStatistics"> | |||
| select DATE_FORMAT(create_date,'%Y-%m-%d') as xTime, | |||
| count(DISTINCT cus_phone) userCount, | |||
| count(1) orderCount, | |||
| IFNULL(sum(order_amount),0) sumAmount, | |||
| count(DISTINCT merchant_id) merchantCount | |||
| from wx_vtwo_activity_order | |||
| <include refid="dynamicWhereConditions" /> | |||
| group by xTime | |||
| </select> | |||
| <select id="getBusinessStatistics" parameterType="com.iformall.domain.po.WxVtwoActivityOrder" resultType="com.iformall.domain.vo.WxVtwoOrderBusinessStatistics"> | |||
| select business_id businessId, | |||
| count(1) businessCount, | |||
| IFNULL(sum(order_amount),0) sumAmount | |||
| from wx_vtwo_activity_order | |||
| <include refid="dynamicWhereConditions" /> | |||
| group by business_id | |||
| </select> | |||
| <insert id="insertList" parameterType="java.util.List"> | |||
| insert into wx_vtwo_activity_order | |||
| (id, | |||
| from_user_id,vip_num,cus_name, | |||
| real_cus_name,cus_phone,cus_card, | |||
| cus_address,legion_id,legion_name, | |||
| union_id,union_name,from_order_id, | |||
| order_no,order_amount,merchant_id, | |||
| business_id,lottery_num,lottery_count, | |||
| anniversary_lottery_num,audit_status,audit_remark, | |||
| audit_by,audit_time,increased_points, | |||
| create_by,create_date,update_date) | |||
| values | |||
| <foreach collection="orderList" item="item" index="index" separator=","> | |||
| (#{item.id,jdbcType=BIGINT}, | |||
| #{item.fromUserId,jdbcType=BIGINT},#{item.vipNum,jdbcType=VARCHAR},#{item.cusName,jdbcType=VARCHAR}, | |||
| #{item.realCusName,jdbcType=VARCHAR},#{item.cusPhone,jdbcType=VARCHAR},#{item.cusCard,jdbcType=VARCHAR}, | |||
| #{item.cusAddress,jdbcType=VARCHAR},#{item.legionId,jdbcType=BIGINT},#{item.legionName,jdbcType=VARCHAR}, | |||
| #{item.unionId,jdbcType=BIGINT},#{item.unionName,jdbcType=VARCHAR},#{item.fromOrderId,jdbcType=BIGINT}, | |||
| #{item.orderNo,jdbcType=VARCHAR},#{item.orderAmount,jdbcType=DECIMAL},#{item.merchantId,jdbcType=BIGINT}, | |||
| #{item.businessId,jdbcType=INTEGER},#{item.lotteryNum,jdbcType=VARCHAR},#{item.lotteryCount,jdbcType=INTEGER}, | |||
| #{item.anniversaryLotteryNum,jdbcType=VARCHAR},#{item.auditStatus,jdbcType=INTEGER},#{item.auditRemark,jdbcType=VARCHAR}, | |||
| #{item.auditBy,jdbcType=BIGINT},#{item.auditTime,jdbcType=TIMESTAMP},#{item.increasedPoints,jdbcType=INTEGER}, | |||
| #{item.createBy,jdbcType=BIGINT}, #{item.createDate,jdbcType=TIMESTAMP},#{item.updateDate,jdbcType=TIMESTAMP}) | |||
| </foreach> | |||
| </insert> | |||
| <update id="updateIncreasedPoints"> | |||
| update wx_vtwo_activity_order | |||
| set increased_points = #{increasedPoints} | |||
| where id = #{id} | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and `parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| </update> | |||
| </mapper> | |||
| @@ -0,0 +1,79 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <!DOCTYPE mapper | |||
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| <mapper namespace="com.iformall.mapper.WxVtwoActivitySpecialTopicMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxVtwoActivitySpecialTopic"> | |||
| <id property="id" column="id" jdbcType="BIGINT"/> | |||
| <result property="tenantId" column="tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="parentTenantId" column="parent_tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="name" column="name" jdbcType="VARCHAR"/> | |||
| <result property="startTime" column="start_time" jdbcType="TIMESTAMP"/> | |||
| <result property="endTime" column="end_time" jdbcType="TIMESTAMP"/> | |||
| <result property="creditOnOff" column="credit_on_off" jdbcType="SMALLINT"/> | |||
| <result property="creditConfig" column="credit_config" jdbcType="VARCHAR"/> | |||
| <result property="status" column="status" jdbcType="SMALLINT"/> | |||
| <result property="createDate" column="create_date" jdbcType="TIMESTAMP"/> | |||
| <result property="updateDate" column="update_date" jdbcType="TIMESTAMP"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| id,tenant_id,parent_tenant_id, | |||
| name,start_time,end_time, | |||
| credit_on_off,credit_config,status, | |||
| create_date,update_date | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| where 1 = 1 | |||
| <if test=" null != id "> | |||
| and `id` = #{id} | |||
| </if> | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and `parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| <if test=" null != name and name != '' "> | |||
| and `name` like concat('%', #{name},'%') | |||
| </if> | |||
| <if test=" null != begin"> | |||
| and `start_time` >= #{begin} | |||
| </if> | |||
| <if test=" null != end"> | |||
| and `end_time` <= #{end} | |||
| </if> | |||
| <if test=" null != creditOnOff"> | |||
| and `credit_on_off` = #{creditOnOff} | |||
| </if> | |||
| <if test=" null != status "> | |||
| and `status` = #{status} | |||
| </if> | |||
| <if test=" null != ids "> | |||
| and id in | |||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||
| #{idItem} | |||
| </foreach> | |||
| </if> | |||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | |||
| </sql> | |||
| <select id="findList" parameterType="com.iformall.domain.po.WxVtwoActivitySpecialTopic" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_activity_special_topic | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_activity_special_topic | |||
| where id = #{id} and tenant_id=#{tenantId} | |||
| </select> | |||
| </mapper> | |||
| @@ -0,0 +1,92 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <!DOCTYPE mapper | |||
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| <mapper namespace="com.iformall.mapper.WxVtwoAmountGiftActivityMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxVtwoAmountGiftActivity"> | |||
| <id property="id" column="id" jdbcType="BIGINT"/> | |||
| <result property="tenantId" column="tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="parentTenantId" column="parent_tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="name" column="name" jdbcType="VARCHAR"/> | |||
| <result property="startTime" column="start_time" jdbcType="TIMESTAMP"/> | |||
| <result property="endTime" column="end_time" jdbcType="TIMESTAMP"/> | |||
| <result property="amountModel" column="amount_model" jdbcType="SMALLINT"/> | |||
| <result property="businessOrderLimit" column="business_order_limit" jdbcType="INTEGER"/> | |||
| <result property="amountRules" column="amount_rules" jdbcType="VARCHAR"/> | |||
| <result property="relatedModel" column="related_model" jdbcType="SMALLINT"/> | |||
| <result property="relatedRules" column="related_rules" jdbcType="VARCHAR"/> | |||
| <result property="awardsCount" column="awards_count" jdbcType="INTEGER"/> | |||
| <result property="merchantRule" column="merchant_rule" jdbcType="SMALLINT"/> | |||
| <result property="status" column="status" jdbcType="SMALLINT"/> | |||
| <result property="createDate" column="create_date" jdbcType="TIMESTAMP"/> | |||
| <result property="updateDate" column="update_date" jdbcType="TIMESTAMP"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| id,tenant_id,parent_tenant_id, | |||
| name,start_time,end_time, | |||
| amount_model,business_order_limit,amount_rules, | |||
| related_model,related_rules,awards_count, | |||
| merchant_rule,status,create_date, | |||
| update_date | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| where 1 = 1 | |||
| <if test=" null != id "> | |||
| and `id` = #{id} | |||
| </if> | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and `parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| <if test=" null != name and name != '' "> | |||
| and `name` like concat('%', #{name},'%') | |||
| </if> | |||
| <if test=" null != begin"> | |||
| and `start_time` >= #{begin} | |||
| </if> | |||
| <if test=" null != end"> | |||
| and `end_time` <= #{end} | |||
| </if> | |||
| <if test=" null != merchantRule"> | |||
| and `merchant_rule` = #{merchantRule} | |||
| </if> | |||
| <!-- 未过期 --> | |||
| <if test=" 0 == validStatus"> | |||
| and end_time >= now() | |||
| </if> | |||
| <!-- 已过期 --> | |||
| <if test=" 1 == validStatus"> | |||
| and end_time <= now() | |||
| </if> | |||
| <if test=" null != status "> | |||
| and `status` = #{status} | |||
| </if> | |||
| <if test=" null != ids "> | |||
| and id in | |||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||
| #{idItem} | |||
| </foreach> | |||
| </if> | |||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | |||
| </sql> | |||
| <select id="findList" parameterType="com.iformall.domain.po.WxVtwoAmountGiftActivity" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_amount_gift_activity | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_amount_gift_activity | |||
| where id = #{id} and tenant_id=#{tenantId} | |||
| </select> | |||
| </mapper> | |||
| @@ -0,0 +1,91 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <!DOCTYPE mapper | |||
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| <mapper namespace="com.iformall.mapper.WxVtwoCashBackActivityMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxVtwoCashBackActivity"> | |||
| <id property="id" column="id" jdbcType="BIGINT"/> | |||
| <result property="tenantId" column="tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="parentTenantId" column="parent_tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="name" column="name" jdbcType="VARCHAR"/> | |||
| <result property="startTime" column="start_time" jdbcType="TIMESTAMP"/> | |||
| <result property="endTime" column="end_time" jdbcType="TIMESTAMP"/> | |||
| <result property="amountModel" column="amount_model" jdbcType="SMALLINT"/> | |||
| <result property="businessOrderLimit" column="business_order_limit" jdbcType="INTEGER"/> | |||
| <result property="relatedModel" column="related_model" jdbcType="SMALLINT"/> | |||
| <result property="cashBackLimit" column="cash_back_limit" jdbcType="INTEGER"/> | |||
| <result property="cashBackRule" column="cash_back_rule" jdbcType="SMALLINT"/> | |||
| <result property="taxDeductionRules" column="tax_deduction_rules" jdbcType="VARCHAR"/> | |||
| <result property="merchantRule" column="merchant_rule" jdbcType="SMALLINT"/> | |||
| <result property="status" column="status" jdbcType="SMALLINT"/> | |||
| <result property="createDate" column="create_date" jdbcType="TIMESTAMP"/> | |||
| <result property="updateDate" column="update_date" jdbcType="TIMESTAMP"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| id,tenant_id,parent_tenant_id, | |||
| name,start_time,end_time, | |||
| amount_model,business_order_limit,related_model, | |||
| cash_back_limit,cash_back_rule,tax_deduction_rules, | |||
| merchant_rule,status,create_date, | |||
| update_date | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| where 1 = 1 | |||
| <if test=" null != id "> | |||
| and `id` = #{id} | |||
| </if> | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and `parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| <if test=" null != name and name != '' "> | |||
| and `name` like concat('%', #{name},'%') | |||
| </if> | |||
| <if test=" null != begin"> | |||
| and `start_time` >= #{begin} | |||
| </if> | |||
| <if test=" null != end"> | |||
| and `end_time` <= #{end} | |||
| </if> | |||
| <if test=" null != merchantRule"> | |||
| and `merchant_rule` = #{merchantRule} | |||
| </if> | |||
| <!-- 未过期 --> | |||
| <if test=" 0 == validStatus"> | |||
| and end_time >= now() | |||
| </if> | |||
| <!-- 已过期 --> | |||
| <if test=" 1 == validStatus"> | |||
| and end_time <= now() | |||
| </if> | |||
| <if test=" null != status "> | |||
| and `status` = #{status} | |||
| </if> | |||
| <if test=" null != ids "> | |||
| and id in | |||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||
| #{idItem} | |||
| </foreach> | |||
| </if> | |||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | |||
| </sql> | |||
| <select id="findList" parameterType="com.iformall.domain.po.WxVtwoCashBackActivity" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_cash_back_activity | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_cash_back_activity | |||
| where id = #{id} and tenant_id=#{tenantId} | |||
| </select> | |||
| </mapper> | |||
| @@ -0,0 +1,90 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <!DOCTYPE mapper | |||
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| <mapper namespace="com.iformall.mapper.WxVtwoCashBackAwardMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxVtwoCashBackAward"> | |||
| <id property="id" column="id" jdbcType="BIGINT"/> | |||
| <result property="tenantId" column="tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="parentTenantId" column="parent_tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="activityId" column="activity_id" jdbcType="BIGINT"/> | |||
| <result property="modelType" column="model_type" jdbcType="SMALLINT"/> | |||
| <result property="minAmount" column="min_amount" jdbcType="DECIMAL"/> | |||
| <result property="maxAmount" column="max_amount" jdbcType="DECIMAL"/> | |||
| <result property="relatedCount" column="related_count" jdbcType="INTEGER"/> | |||
| <result property="name" column="name" jdbcType="VARCHAR"/> | |||
| <result property="cashBackRatio" column="cash_back_ratio" jdbcType="DECIMAL"/> | |||
| <result property="cashBackLimit" column="cash_back_limit" jdbcType="INTEGER"/> | |||
| <result property="shareRule" column="share_rule" jdbcType="SMALLINT"/> | |||
| <result property="mallShareRate" column="mall_share_rate" jdbcType="DECIMAL"/> | |||
| <result property="merchantShareRate" column="merchant_share_rate" jdbcType="DECIMAL"/> | |||
| <result property="createDate" column="create_date" jdbcType="TIMESTAMP"/> | |||
| <result property="updateDate" column="update_date" jdbcType="TIMESTAMP"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| id,tenant_id,parent_tenant_id, | |||
| activity_id,model_type,min_amount, | |||
| max_amount,related_count,name, | |||
| cash_back_ratio,cash_back_limit,share_rule, | |||
| mall_share_rate,merchant_share_rate,create_date, | |||
| update_date | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| where 1 = 1 | |||
| <if test=" null != id "> | |||
| and `id` = #{id} | |||
| </if> | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and `parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| <if test=" null != activityId "> | |||
| and `activity_id` = #{activityId} | |||
| </if> | |||
| <if test=" null != modelType "> | |||
| and `model_type` = #{modelType} | |||
| </if> | |||
| <if test=" null != ids "> | |||
| and id in | |||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||
| #{idItem} | |||
| </foreach> | |||
| </if> | |||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | |||
| </sql> | |||
| <select id="findList" parameterType="com.iformall.domain.po.WxVtwoCashBackAward" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_cash_back_award | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_cash_back_award | |||
| where id = #{id} and tenant_id=#{tenantId} | |||
| </select> | |||
| <insert id="insertList" parameterType="java.util.List"> | |||
| insert into wx_vtwo_cash_back_award | |||
| (id, | |||
| activity_id,model_type,min_amount, | |||
| max_amount,related_count,name, | |||
| cash_back_ratio,cash_back_limit,share_rule, | |||
| mall_share_rate,merchant_share_rate,create_date, | |||
| update_date) | |||
| values | |||
| <foreach collection="awardList" item="item" index="index" separator=","> | |||
| (#{item.id,jdbcType=BIGINT}, | |||
| #{item.activityId,jdbcType=BIGINT},#{item.modelType,jdbcType=INTEGER},#{item.minAmount,jdbcType=DECIMAL}, | |||
| #{item.maxAmount,jdbcType=DECIMAL},#{item.relatedCount,jdbcType=INTEGER},#{item.name,jdbcType=VARCHAR}, | |||
| #{item.cashBackRatio,jdbcType=DECIMAL},#{item.cashBackLimit,jdbcType=DECIMAL},#{item.shareRule,jdbcType=INTEGER}, | |||
| #{item.mallShareRate,jdbcType=DECIMAL}, #{item.merchantShareRate,jdbcType=DECIMAL},#{item.createDate,jdbcType=TIMESTAMP}, | |||
| #{item.updateDate,jdbcType=TIMESTAMP}) | |||
| </foreach> | |||
| </insert> | |||
| </mapper> | |||
| @@ -0,0 +1,86 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <!DOCTYPE mapper | |||
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| <mapper namespace="com.iformall.mapper.WxVtwoCashBackGrantAwardMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxVtwoCashBackGrantAward"> | |||
| <id property="id" column="id" jdbcType="BIGINT"/> | |||
| <result property="tenantId" column="tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="parentTenantId" column="parent_tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="activityId" column="activity_id" jdbcType="BIGINT"/> | |||
| <result property="activityName" column="activity_name" jdbcType="VARCHAR"/> | |||
| <result property="grantId" column="grant_id" jdbcType="BIGINT"/> | |||
| <result property="recordId" column="record_id" jdbcType="BIGINT"/> | |||
| <result property="orderAmount" column="order_amount" jdbcType="DECIMAL"/> | |||
| <result property="modeType" column="mode_type" jdbcType="SMALLINT"/> | |||
| <result property="minAmount" column="min_amount" jdbcType="DECIMAL"/> | |||
| <result property="maxAmount" column="max_amount" jdbcType="DECIMAL"/> | |||
| <result property="relatedCount" column="related_count" jdbcType="INTEGER"/> | |||
| <result property="awardId" column="award_id" jdbcType="BIGINT"/> | |||
| <result property="awardName" column="award_name" jdbcType="VARCHAR"/> | |||
| <result property="cashBackRatio" column="cash_back_ratio" jdbcType="DECIMAL"/> | |||
| <result property="cashBackRule" column="cash_back_rule" jdbcType="SMALLINT"/> | |||
| <result property="cashBack" column="cash_back" jdbcType="DECIMAL"/> | |||
| <result property="moneyRule" column="money_rule" jdbcType="SMALLINT"/> | |||
| <result property="mallShareRate" column="mall_share_rate" jdbcType="DECIMAL"/> | |||
| <result property="merchantShareRate" column="merchant_share_rate" jdbcType="DECIMAL"/> | |||
| <result property="taxDeductionRules" column="tax_deduction_rules" jdbcType="VARCHAR"/> | |||
| <result property="taxAmount" column="tax_amount" jdbcType="DECIMAL"/> | |||
| <result property="status" column="status" jdbcType="SMALLINT"/> | |||
| <result property="createDate" column="create_date" jdbcType="TIMESTAMP"/> | |||
| <result property="updateDate" column="update_date" jdbcType="TIMESTAMP"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| id,tenant_id,parent_tenant_id, | |||
| activity_id,activity_name,grant_id, | |||
| record_id,order_amount,mode_type, | |||
| min_amount,max_amount,related_count, | |||
| award_id,award_name,cash_back_ratio, | |||
| cash_back_rule,cash_back,money_rule, | |||
| mall_share_rate,merchant_share_rate,tax_deduction_rules, | |||
| tax_amount,status,create_date, | |||
| update_date | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| where 1 = 1 | |||
| <if test=" null != id "> | |||
| and `id` = #{id} | |||
| </if> | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and `parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| <if test=" null != activityId "> | |||
| and `activity_id` = #{activityId} | |||
| </if> | |||
| <if test=" null != grantId "> | |||
| and `grant_id` = #{grantId} | |||
| </if> | |||
| <if test=" null != recordId "> | |||
| and `record_id` = #{recordId} | |||
| </if> | |||
| <if test=" null != ids "> | |||
| and id in | |||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||
| #{idItem} | |||
| </foreach> | |||
| </if> | |||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | |||
| </sql> | |||
| <select id="findList" parameterType="com.iformall.domain.po.WxVtwoCashBackGrantAward" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_cash_back_grant_award | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_cash_back_grant_award | |||
| where id = #{id} and tenant_id=#{tenantId} | |||
| </select> | |||
| </mapper> | |||
| @@ -0,0 +1,85 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <!DOCTYPE mapper | |||
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| <mapper namespace="com.iformall.mapper.WxVtwoCashBackGrantMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxVtwoCashBackGrant"> | |||
| <id property="id" column="id" jdbcType="BIGINT"/> | |||
| <result property="tenantId" column="tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="parentTenantId" column="parent_tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="activityId" column="activity_id" jdbcType="BIGINT"/> | |||
| <result property="activityName" column="activity_name" jdbcType="VARCHAR"/> | |||
| <result property="orderMoneySum" column="order_money_sum" jdbcType="DECIMAL"/> | |||
| <result property="orderCount" column="order_count" jdbcType="INTEGER"/> | |||
| <result property="cusName" column="cus_name" jdbcType="VARCHAR"/> | |||
| <result property="cusPhone" column="cus_phone" jdbcType="VARCHAR"/> | |||
| <result property="lotteryNum" column="lottery_num" jdbcType="VARCHAR"/> | |||
| <result property="lotteryCount" column="lottery_count" jdbcType="INTEGER"/> | |||
| <result property="anniversaryLotteryNum" column="anniversary_lottery_num" jdbcType="VARCHAR"/> | |||
| <result property="realName" column="real_name" jdbcType="VARCHAR"/> | |||
| <result property="realCard" column="real_card" jdbcType="VARCHAR"/> | |||
| <result property="cashBackLimit" column="cash_back_limit" jdbcType="DECIMAL"/> | |||
| <result property="cashBackRule" column="cash_back_rule" jdbcType="SMALLINT"/> | |||
| <result property="cashBack" column="cash_back" jdbcType="DECIMAL"/> | |||
| <result property="taxDeductionRules" column="tax_deduction_rules" jdbcType="VARCHAR"/> | |||
| <result property="taxAmount" column="tax_amount" jdbcType="DECIMAL"/> | |||
| <result property="realCashBack" column="real_cash_back" jdbcType="DECIMAL"/> | |||
| <result property="remark" column="remark" jdbcType="VARCHAR"/> | |||
| <result property="signImg" column="sign_img" jdbcType="VARCHAR"/> | |||
| <result property="status" column="status" jdbcType="SMALLINT"/> | |||
| <result property="createBy" column="create_by" jdbcType="BIGINT"/> | |||
| <result property="createDate" column="create_date" jdbcType="TIMESTAMP"/> | |||
| <result property="updateDate" column="update_date" jdbcType="TIMESTAMP"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| id,tenant_id,parent_tenant_id, | |||
| activity_id,activity_name,order_money_sum, | |||
| order_count,cus_name,cus_phone, | |||
| lottery_num,lottery_count,anniversary_lottery_num, | |||
| real_name,real_card,cash_back_limit, | |||
| cash_back_rule,cash_back,tax_deduction_rules, | |||
| tax_amount,real_cash_back,remark,sign_img, | |||
| status,create_by,create_date, | |||
| update_date | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| where 1 = 1 | |||
| <if test=" null != id "> | |||
| and `id` = #{id} | |||
| </if> | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and `parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| <if test=" null != activityId "> | |||
| and `activity_id` = #{activityId} | |||
| </if> | |||
| <if test=" null != status "> | |||
| and `status` = #{status} | |||
| </if> | |||
| <if test=" null != ids "> | |||
| and id in | |||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||
| #{idItem} | |||
| </foreach> | |||
| </if> | |||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | |||
| </sql> | |||
| <select id="findList" parameterType="com.iformall.domain.po.WxVtwoCashBackGrant" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_cash_back_grant | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_cash_back_grant | |||
| where id = #{id} and tenant_id=#{tenantId} | |||
| </select> | |||
| </mapper> | |||
| @@ -0,0 +1,89 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <!DOCTYPE mapper | |||
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| <mapper namespace="com.iformall.mapper.WxVtwoPrizeDrawActivityMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxVtwoPrizeDrawActivity"> | |||
| <id property="id" column="id" jdbcType="BIGINT"/> | |||
| <result property="tenantId" column="tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="parentTenantId" column="parent_tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="name" column="name" jdbcType="VARCHAR"/> | |||
| <result property="startTime" column="start_time" jdbcType="TIMESTAMP"/> | |||
| <result property="endTime" column="end_time" jdbcType="TIMESTAMP"/> | |||
| <result property="amountModel" column="amount_model" jdbcType="SMALLINT"/> | |||
| <result property="businessOrderLimit" column="business_order_limit" jdbcType="INTEGER"/> | |||
| <result property="amountRules" column="amount_rules" jdbcType="VARCHAR"/> | |||
| <result property="relatedModel" column="related_model" jdbcType="SMALLINT"/> | |||
| <result property="relatedRules" column="related_rules" jdbcType="VARCHAR"/> | |||
| <result property="awardsLimit" column="awards_limit" jdbcType="INTEGER"/> | |||
| <result property="awardsCount" column="awards_count" jdbcType="INTEGER"/> | |||
| <result property="merchantRule" column="merchant_rule" jdbcType="SMALLINT"/> | |||
| <result property="status" column="status" jdbcType="SMALLINT"/> | |||
| <result property="createDate" column="create_date" jdbcType="TIMESTAMP"/> | |||
| <result property="updateDate" column="update_date" jdbcType="TIMESTAMP"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| id,tenant_id,parent_tenant_id, | |||
| name,start_time,end_time, | |||
| amount_model,business_order_limit,amount_rules, | |||
| related_model,related_rules,awards_limit, | |||
| awards_count,merchant_rule,status, | |||
| create_date,update_date | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| where 1 = 1 | |||
| <if test=" null != id "> | |||
| and `id` = #{id} | |||
| </if> | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and `parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| <if test=" null != name and name != '' "> | |||
| and `name` like concat('%', #{name},'%') | |||
| </if> | |||
| <if test=" null != begin"> | |||
| and `start_time` >= #{begin} | |||
| </if> | |||
| <if test=" null != end"> | |||
| and `end_time` <= #{end} | |||
| </if> | |||
| <if test=" null != merchantRule"> | |||
| and `merchant_rule` = #{merchantRule} | |||
| </if> | |||
| <!-- 未过期 --> | |||
| <if test=" 0 == validStatus"> | |||
| and end_time >= now() | |||
| </if> | |||
| <!-- 已过期 --> | |||
| <if test=" 1 == validStatus"> | |||
| and end_time <= now() | |||
| </if> | |||
| <if test=" null != status "> | |||
| and `status` = #{status} | |||
| </if> | |||
| <if test=" null != ids "> | |||
| and id in | |||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||
| #{idItem} | |||
| </foreach> | |||
| </if> | |||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | |||
| </sql> | |||
| <select id="findList" parameterType="com.iformall.domain.po.WxVtwoPrizeDrawActivity" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_prize_draw_activity | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_prize_draw_activity | |||
| where id = #{id} and tenant_id=#{tenantId} | |||
| </select> | |||
| </mapper> | |||
| @@ -0,0 +1,57 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <!DOCTYPE mapper | |||
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| <mapper namespace="com.iformall.mapper.WxVtwoSpecialTopicActivityMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxVtwoSpecialTopicActivity"> | |||
| <id property="id" column="id" jdbcType="BIGINT"/> | |||
| <result property="tenantId" column="tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="parentTenantId" column="parent_tenant_id" jdbcType="VARCHAR"/> | |||
| <result property="specialTopicId" column="special_topic_id" jdbcType="BIGINT"/> | |||
| <result property="activityId" column="activity_id" jdbcType="BIGINT"/> | |||
| <result property="activityType" column="activity_type" jdbcType="SMALLINT"/> | |||
| <result property="activityName" column="activity_name" jdbcType="VARCHAR"/> | |||
| <result property="activityCreateDate" column="activity_create_date" jdbcType="TIMESTAMP"/> | |||
| <result property="activityStartTime" column="activity_start_time" jdbcType="TIMESTAMP"/> | |||
| <result property="activityEndTime" column="activity_end_time" jdbcType="TIMESTAMP"/> | |||
| <result property="activityStatus" column="activity_status" jdbcType="SMALLINT"/> | |||
| <result property="createDate" column="create_date" jdbcType="TIMESTAMP"/> | |||
| <result property="updateDate" column="update_date" jdbcType="TIMESTAMP"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| id,tenant_id,parent_tenant_id, | |||
| special_topic_id,activity_id,activity_type, | |||
| activity_name,activity_create_date,activity_start_time, | |||
| activity_end_time,activity_status,create_date, | |||
| update_date | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| where 1 = 1 | |||
| <if test=" null != id "> | |||
| and `id` = #{id} | |||
| </if> | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and `parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| <if test=" null != specialTopicId "> | |||
| and `special_topic_id` = #{specialTopicId} | |||
| </if> | |||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | |||
| </sql> | |||
| <select id="findList" parameterType="com.iformall.domain.po.WxVtwoSpecialTopicActivity" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_special_topic_activity | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_vtwo_special_topic_activity | |||
| where id = #{id} and tenant_id=#{tenantId} | |||
| </select> | |||
| </mapper> | |||