收藏参数区分国内、海外、企业

This commit is contained in:
caozhen
2023-09-18 16:36:18 +08:00
parent ac0f76b476
commit f903c990fa
@@ -75,11 +75,11 @@ public class LawsStandardCollectionController extends JeroController<LawsStandar
@ApiOperation(value="标准收藏-国内收藏", notes="标准收藏-国内收藏")
@PostMapping(value = "/domestic/add")
public Result<T> domesticAdd(@Validated @RequestBody LawsStandardCollection lawsStandardCollection) {
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
LawsDomesticStandard standard = lawsDomesticStandardService.queryById(lawsStandardCollection.getStandardId());
lawsStandardCollection.setStandardClass(standard.getStandardClass());
lawsStandardCollection.setStandardName(standard.getStandardName());
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
lawsStandardCollection.setCollectorId(sysUser.getId());
LambdaQueryWrapper<LawsStandardCollection> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(LawsStandardCollection::getStandardId, lawsStandardCollection.getStandardId());
wrapper.eq(LawsStandardCollection::getCollectorId, sysUser.getId());
@@ -114,11 +114,11 @@ public class LawsStandardCollectionController extends JeroController<LawsStandar
@ApiOperation(value="标准收藏-海外收藏", notes="标准收藏-海外收藏")
@PostMapping(value = "/overseas/add")
public Result<T> overseasAdd(@Validated @RequestBody LawsStandardCollection lawsStandardCollection) {
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
LawsOverseasStandard standard = lawsOverseasStandardService.queryById(lawsStandardCollection.getStandardId());
lawsStandardCollection.setStandardClass(standard.getStandardClass());
lawsStandardCollection.setStandardName(standard.getStandardName());
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
lawsStandardCollection.setCollectorId(sysUser.getId());
LambdaQueryWrapper<LawsStandardCollection> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(LawsStandardCollection::getStandardId, lawsStandardCollection.getStandardId());
wrapper.eq(LawsStandardCollection::getCollectorId, sysUser.getId());
@@ -153,11 +153,11 @@ public class LawsStandardCollectionController extends JeroController<LawsStandar
@ApiOperation(value="标准收藏-企标收藏", notes="标准收藏-企标收藏")
@PostMapping(value = "/enterprise/add")
public Result<T> enterpriseAdd(@Validated @RequestBody LawsStandardCollection lawsStandardCollection) {
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
LawsEnterpriseStandard standard = enterpriseStandardService.getById(lawsStandardCollection.getStandardId());
lawsStandardCollection.setStandardClass(standard.getCategoryCode());
lawsStandardCollection.setStandardName(standard.getStandardName());
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
lawsStandardCollection.setCollectorId(sysUser.getId());
LambdaQueryWrapper<LawsStandardCollection> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(LawsStandardCollection::getStandardId, lawsStandardCollection.getStandardId());
wrapper.eq(LawsStandardCollection::getCollectorId, sysUser.getId());