|
@ -1,15 +1,22 @@ |
|
|
package com.epmet.controller; |
|
|
package com.epmet.controller; |
|
|
|
|
|
|
|
|
|
|
|
import com.epmet.commons.tools.annotation.LoginUser; |
|
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
|
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
|
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
import com.epmet.commons.tools.utils.ExcelUtils; |
|
|
import com.epmet.commons.tools.utils.ExcelUtils; |
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
import com.epmet.commons.tools.validator.AssertUtils; |
|
|
import com.epmet.commons.tools.validator.AssertUtils; |
|
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
|
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
|
|
import com.epmet.commons.tools.validator.group.AddGroup; |
|
|
import com.epmet.commons.tools.validator.group.AddGroup; |
|
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|
|
|
|
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|
|
|
|
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|
|
|
|
|
import com.epmet.dto.CategorydetailResultDTO; |
|
|
import com.epmet.dto.PointAdditiveRuleDTO; |
|
|
import com.epmet.dto.PointAdditiveRuleDTO; |
|
|
|
|
|
import com.epmet.dto.form.AddcategoryFormDTO; |
|
|
|
|
|
import com.epmet.dto.form.AddruleFormDTO; |
|
|
|
|
|
import com.epmet.dto.form.List4applyFormDTO; |
|
|
|
|
|
import com.epmet.dto.form.List4treeFormDTO; |
|
|
import com.epmet.excel.PointAdditiveRuleExcel; |
|
|
import com.epmet.excel.PointAdditiveRuleExcel; |
|
|
import com.epmet.service.PointAdditiveRuleService; |
|
|
import com.epmet.service.PointAdditiveRuleService; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
@ -27,7 +34,7 @@ import java.util.Map; |
|
|
* @since v1.0.0 2022-06-15 |
|
|
* @since v1.0.0 2022-06-15 |
|
|
*/ |
|
|
*/ |
|
|
@RestController |
|
|
@RestController |
|
|
@RequestMapping("pointAdditiveRule") |
|
|
@RequestMapping("additiverule") |
|
|
public class PointAdditiveRuleController { |
|
|
public class PointAdditiveRuleController { |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
@ -77,6 +84,82 @@ public class PointAdditiveRuleController { |
|
|
ExcelUtils.exportExcelToTarget(response, null, list, PointAdditiveRuleExcel.class); |
|
|
ExcelUtils.exportExcelToTarget(response, null, list, PointAdditiveRuleExcel.class); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @describe: 查询积分类别规则列表 |
|
|
|
|
|
* @author wangtong |
|
|
|
|
|
* @date 2022/6/15 10:11 |
|
|
|
|
|
* @params [dto] |
|
|
|
|
|
* @return com.epmet.commons.tools.utils.Result |
|
|
|
|
|
*/ |
|
|
|
|
|
@PostMapping("list4tree") |
|
|
|
|
|
public Result<List<PointAdditiveRuleDTO>> list4tree(@LoginUser TokenDto tokenDto, @RequestBody List4treeFormDTO dto){ |
|
|
|
|
|
dto.setCustomerId(tokenDto.getCustomerId()); |
|
|
|
|
|
return pointAdditiveRuleService.list4tree(dto); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @describe: 查询下级类别简要信息 |
|
|
|
|
|
* @author wangtong |
|
|
|
|
|
* @date 2022/6/15 10:23 |
|
|
|
|
|
* @params [categoryId] |
|
|
|
|
|
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.PointAdditiveRuleDTO>> |
|
|
|
|
|
*/ |
|
|
|
|
|
@PostMapping("subcategory/listbrief/{categoryId}") |
|
|
|
|
|
public Result<List<PointAdditiveRuleDTO>> listbrief(@PathVariable("categoryId") String categoryId){ |
|
|
|
|
|
return pointAdditiveRuleService.listbrief(categoryId); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @describe: 查询积分类别详情 |
|
|
|
|
|
* @author wangtong |
|
|
|
|
|
* @date 2022/6/15 10:23 |
|
|
|
|
|
* @params [categoryId] |
|
|
|
|
|
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.PointAdditiveRuleDTO>> |
|
|
|
|
|
*/ |
|
|
|
|
|
@PostMapping("categorydetail/{categoryId}") |
|
|
|
|
|
public Result<CategorydetailResultDTO> categorydetail(@PathVariable("categoryId") String categoryId){ |
|
|
|
|
|
return pointAdditiveRuleService.categorydetail(categoryId); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @describe: 添加积分类别 |
|
|
|
|
|
* @author wangtong |
|
|
|
|
|
* @date 2022/6/15 10:23 |
|
|
|
|
|
* @params [categoryId] |
|
|
|
|
|
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.PointAdditiveRuleDTO>> |
|
|
|
|
|
*/ |
|
|
|
|
|
@PostMapping("addcategory") |
|
|
|
|
|
public Result addcategory(@LoginUser TokenDto tokenDto,@RequestBody AddcategoryFormDTO dto){ |
|
|
|
|
|
ValidatorUtils.validateEntity(dto); |
|
|
|
|
|
dto.setCustomerId(tokenDto.getCustomerId()); |
|
|
|
|
|
return pointAdditiveRuleService.addcategory(dto); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @describe: 添加积分规则 |
|
|
|
|
|
* @author wangtong |
|
|
|
|
|
* @date 2022/6/15 10:23 |
|
|
|
|
|
* @params [categoryId] |
|
|
|
|
|
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.PointAdditiveRuleDTO>> |
|
|
|
|
|
*/ |
|
|
|
|
|
@PostMapping("addrule") |
|
|
|
|
|
public Result addrule(@LoginUser TokenDto tokenDto,@RequestBody AddruleFormDTO dto){ |
|
|
|
|
|
ValidatorUtils.validateEntity(dto); |
|
|
|
|
|
dto.setCustomerId(tokenDto.getCustomerId()); |
|
|
|
|
|
return pointAdditiveRuleService.addrule(dto); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @describe: [附加积分]获取允许申请的积分类别 |
|
|
|
|
|
* @author wangtong |
|
|
|
|
|
* @date 2022/6/15 10:23 |
|
|
|
|
|
* @params [categoryId] |
|
|
|
|
|
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.PointAdditiveRuleDTO>> |
|
|
|
|
|
*/ |
|
|
|
|
|
@PostMapping("list4apply") |
|
|
|
|
|
public Result<List<PointAdditiveRuleDTO>> list4apply(@LoginUser TokenDto tokenDto,@RequestBody List4applyFormDTO dto){ |
|
|
|
|
|
ValidatorUtils.validateEntity(dto); |
|
|
|
|
|
dto.setCustomerId(tokenDto.getCustomerId()); |
|
|
|
|
|
return pointAdditiveRuleService.list4apply(dto); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|