## 报单赠送
This commit is contained in:
		
							parent
							
								
									cec21f424a
								
							
						
					
					
						commit
						21ba182806
					
				|  | @ -5,6 +5,7 @@ import com.hzs.activity.base.param.QueryActivityParam; | ||||||
| import com.hzs.activity.base.service.IActivityService; | import com.hzs.activity.base.service.IActivityService; | ||||||
| import com.hzs.activity.base.vo.BaseConfigVo; | import com.hzs.activity.base.vo.BaseConfigVo; | ||||||
| import com.hzs.activity.declaration.param.AcDeclarationParam; | import com.hzs.activity.declaration.param.AcDeclarationParam; | ||||||
|  | import com.hzs.activity.declaration.param.AcDeclarationPkIdParam; | ||||||
| import com.hzs.activity.declaration.service.IAcDeclarationGiftConfigService; | import com.hzs.activity.declaration.service.IAcDeclarationGiftConfigService; | ||||||
| import com.hzs.common.core.annotation.Log; | import com.hzs.common.core.annotation.Log; | ||||||
| import com.hzs.common.core.enums.EActType; | import com.hzs.common.core.enums.EActType; | ||||||
|  | @ -83,13 +84,16 @@ public class AcDeclarationGiftConfigController extends BaseController { | ||||||
|     /** |     /** | ||||||
|      * |      * | ||||||
|      * 报单赠送活动删除 |      * 报单赠送活动删除 | ||||||
|      * @param  pkId 报单赠送删除 |      * @param  acDeclarationPkIdParam 报单赠送删除 | ||||||
|      * @return AjaxResult |      * @return AjaxResult | ||||||
|      */ |      */ | ||||||
|     @Log(module = EOperationModule.AC_DECLARATION_GIFT_DELETE, business = EOperationBusiness.AC_DECLARATION_GIFT_DELETE, method = EOperationMethod.DELETE, remark = "报单赠送删除") |     @Log(module = EOperationModule.AC_DECLARATION_GIFT_DELETE, business = EOperationBusiness.AC_DECLARATION_GIFT_DELETE, method = EOperationMethod.DELETE, remark = "报单赠送删除") | ||||||
|     @PostMapping("/delete") |     @PostMapping("/delete") | ||||||
|     public AjaxResult declarationConfigDelete(@RequestBody Long pkId) { |     public AjaxResult declarationConfigDelete(@RequestBody AcDeclarationPkIdParam acDeclarationPkIdParam) { | ||||||
|         String str = iAcDeclarationGiftConfigService.deleteConfig(pkId); |         if (acDeclarationPkIdParam.getPkId() == null) { | ||||||
|  |             return AjaxResult.error(); | ||||||
|  |         } | ||||||
|  |         String str = iAcDeclarationGiftConfigService.deleteConfig(acDeclarationPkIdParam.getPkId()); | ||||||
|         if (str != null) { |         if (str != null) { | ||||||
|             return AjaxResult.error(str); |             return AjaxResult.error(str); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  | @ -42,7 +42,7 @@ public class AcDeclarationConfigParam { | ||||||
|     /** |     /** | ||||||
|      * 指定等级 |      * 指定等级 | ||||||
|      */ |      */ | ||||||
|     private Integer level; |     private Integer specifyLevel; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -19,11 +19,6 @@ public class AcDeclarationParam { | ||||||
|      */ |      */ | ||||||
|     private Long pkBaseId; |     private Long pkBaseId; | ||||||
| 
 | 
 | ||||||
|     /** |  | ||||||
|      * 操作类型(1=新增,2=修改,3=删除) |  | ||||||
|      */ |  | ||||||
|     private Integer controlType; |  | ||||||
| 
 |  | ||||||
|     /** |     /** | ||||||
|      * 国家 |      * 国家 | ||||||
|      */ |      */ | ||||||
|  | @ -46,7 +41,7 @@ public class AcDeclarationParam { | ||||||
|     private ActivityParam activityParam; |     private ActivityParam activityParam; | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 加购升级信息 |      * 报单赠送信息 | ||||||
|      */ |      */ | ||||||
|     private List<AcDeclarationConfigParam> acDeclarationConfigParams; |     private List<AcDeclarationConfigParam> acDeclarationConfigParams; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -0,0 +1,12 @@ | ||||||
|  | package com.hzs.activity.declaration.param; | ||||||
|  | 
 | ||||||
|  | import lombok.AllArgsConstructor; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.NoArgsConstructor; | ||||||
|  | 
 | ||||||
|  | @Data | ||||||
|  | @AllArgsConstructor | ||||||
|  | @NoArgsConstructor | ||||||
|  | public class AcDeclarationPkIdParam { | ||||||
|  |     private Long pkId; | ||||||
|  | } | ||||||
|  | @ -124,7 +124,7 @@ public class AcDeclarationGiftConfigServiceImpl extends ServiceImpl<AcDeclaratio | ||||||
|         AcBaseConfig baseConfig = baseConfigService.getById(pkId); |         AcBaseConfig baseConfig = baseConfigService.getById(pkId); | ||||||
|         ActivityParam activityParam = BeanUtil.copyProperties(baseConfig, ActivityParam.class); |         ActivityParam activityParam = BeanUtil.copyProperties(baseConfig, ActivityParam.class); | ||||||
|         removeDeclarationConfig(pkId); |         removeDeclarationConfig(pkId); | ||||||
|         iActivityService.createBaseConfigLog(activityParam, new StringBuffer(), null, EApprovalBusiness.AC_DECLARATION_GIFT_UPDATE.getValue(), false); |         iActivityService.createBaseConfigLog(activityParam, new StringBuffer(), null, EApprovalBusiness.AC_DECLARATION_GIFT_REMOVE.getValue(), false); | ||||||
|         return null; |         return null; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | @ -162,7 +162,7 @@ public class AcDeclarationGiftConfigServiceImpl extends ServiceImpl<AcDeclaratio | ||||||
|                         .specsName(item.getSpecsName()) |                         .specsName(item.getSpecsName()) | ||||||
|                         .specsNameId(item.getSpecsNameId()) |                         .specsNameId(item.getSpecsNameId()) | ||||||
|                         .quantity(item.getQuantity()) |                         .quantity(item.getQuantity()) | ||||||
|                         .level(item.getLevel()) |                         .specifyLevel(item.getSpecifyLevel()) | ||||||
|                         .build(); |                         .build(); | ||||||
|                 build.setPkCountry(acBaseConfig.getPkCountry()); |                 build.setPkCountry(acBaseConfig.getPkCountry()); | ||||||
|                 build.setCreationTime(acBaseConfig.getCreationTime()); |                 build.setCreationTime(acBaseConfig.getCreationTime()); | ||||||
|  |  | ||||||
|  | @ -7,6 +7,7 @@ import com.hzs.activity.declaration.service.IAcDeclarationGiftRecordService; | ||||||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||||
| import com.hzs.activity.declaration.vo.AcDeclarationGiftRecord; | import com.hzs.activity.declaration.vo.AcDeclarationGiftRecord; | ||||||
| import com.hzs.activity.declaration.vo.AcDeclarationListVO; | import com.hzs.activity.declaration.vo.AcDeclarationListVO; | ||||||
|  | import com.hzs.common.core.enums.ERegistrationAuthority; | ||||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||||
| 
 | 
 | ||||||
| import java.util.Collections; | import java.util.Collections; | ||||||
|  | @ -25,6 +26,11 @@ public class AcDeclarationGiftRecordServiceImpl extends ServiceImpl<AcDeclaratio | ||||||
| 
 | 
 | ||||||
|     @Override |     @Override | ||||||
|     public List<AcDeclarationListVO> queryList(AcDeclarationListParam param) { |     public List<AcDeclarationListVO> queryList(AcDeclarationListParam param) { | ||||||
|         return baseMapper.queryList(param); |         List<AcDeclarationListVO> acDeclarationListVOS = baseMapper.queryList(param); | ||||||
|  |         acDeclarationListVOS.forEach(item->{ | ||||||
|  |             // 将注册权限实际值注入 | ||||||
|  |             item.setRegisterAuthorityVal(ERegistrationAuthority.getEnumByValue(item.getRegisterAuthority()).getLabel()); | ||||||
|  |         }); | ||||||
|  |         return acDeclarationListVOS; | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -71,8 +71,8 @@ public class AcDeclarationGiftConfig extends BaseEntity { | ||||||
|     /** |     /** | ||||||
|      * 指定等级 |      * 指定等级 | ||||||
|      */ |      */ | ||||||
|     @TableField("LEVEL") |     @TableField("SPECIFY_LEVEL") | ||||||
|     private Integer level; |     private Integer specifyLevel; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -29,6 +29,16 @@ public class AcDeclarationListVO { | ||||||
|     @Excel(name = "会员名称") |     @Excel(name = "会员名称") | ||||||
|     private String memberName; |     private String memberName; | ||||||
| 
 | 
 | ||||||
|  |     /** | ||||||
|  |      * 注册权限 | ||||||
|  |      */ | ||||||
|  |     private Integer registerAuthority; | ||||||
|  |     /** | ||||||
|  |      * 注册权限实际值 | ||||||
|  |      */ | ||||||
|  |     @Excel(name = "注册权限") | ||||||
|  |     private String registerAuthorityVal; | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 活动开始时间 |      * 活动开始时间 | ||||||
|  | @ -61,5 +71,5 @@ public class AcDeclarationListVO { | ||||||
|     private Integer quantity; |     private Integer quantity; | ||||||
| 
 | 
 | ||||||
|     @Excel(name = "指定等级") |     @Excel(name = "指定等级") | ||||||
|     private String levelVal; |     private String specifyLevelVal; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -28,22 +28,24 @@ | ||||||
|         PK_COUNTRY, |         PK_COUNTRY, | ||||||
|         PK_ID, PK_BASE_ID, PK_RULE_ID, PK_MEMBER, PK_PRODUCT, QUANTITY |         PK_ID, PK_BASE_ID, PK_RULE_ID, PK_MEMBER, PK_PRODUCT, QUANTITY | ||||||
|     </sql> |     </sql> | ||||||
|     <select id="queryList" resultType="com.hzs.activity.declaration.param.AcDeclarationListParam"> |     <select id="queryList" resultType="com.hzs.activity.declaration.vo.AcDeclarationListVO"> | ||||||
|         SELECT |         SELECT | ||||||
|         abc.ACT_NAME, |         abc.ACT_NAME, | ||||||
|         cm.member_code, |         cm.member_code, | ||||||
|         cm.member_name, |         cm.member_name, | ||||||
|         BG.GRADE_NAME AS levelVal, |         adgc.REGISTER_AUTHORITY | ||||||
|  |         BG.GRADE_NAME AS specifyLevelVal, | ||||||
|         abc.ACT_START_DATE, |         abc.ACT_START_DATE, | ||||||
|         abc.ACT_END_DATE, |         abc.ACT_END_DATE, | ||||||
|         bp.PRODUCT_NAME, |         bp.PRODUCT_NAME, | ||||||
|         adgr.* |         adgr.* | ||||||
|         FROM |         FROM | ||||||
|         AC_DECLARATION_GIFT_RECORD adgr |         AC_DECLARATION_GIFT_RECORD adgr | ||||||
|  |         LEFT JOIN AC_DECLARATION_GIFT_CONFIG adgc ON adgr.PK_RULE_ID = adgc.PK_ID | ||||||
|         LEFT JOIN BD_PRODUCT bp ON adgr.PK_PRODUCT = bp.PK_ID |         LEFT JOIN BD_PRODUCT bp ON adgr.PK_PRODUCT = bp.PK_ID | ||||||
|         LEFT JOIN AC_BASE_CONFIG abc ON adgr.PK_BASE_ID = abc.PK_ID |         LEFT JOIN AC_BASE_CONFIG abc ON adgr.PK_BASE_ID = abc.PK_ID | ||||||
|         LEFT JOIN CU_MEMBER cm ON adgr.PK_MEMBER = cm.PK_ID |         LEFT JOIN CU_MEMBER cm ON adgr.PK_MEMBER = cm.PK_ID | ||||||
|         LEFT JOIN BD_GRADE BG ON adgr.LEVEL = BG.PK_ID |         LEFT JOIN BD_GRADE BG ON adgr.SPECIFY_LEVEL = BG.PK_ID | ||||||
|         WHERE |         WHERE | ||||||
|         adgr.DEL_FLAG = 0 |         adgr.DEL_FLAG = 0 | ||||||
|         <if test="actName != null and actName != ''"> |         <if test="actName != null and actName != ''"> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue