소스 검색

golden 课程相关

yexianchao 1 개월 전
부모
커밋
524fc87286
67개의 변경된 파일2503개의 추가작업 그리고 30개의 파일을 삭제
  1. 1 1
      crm-custom/src/main/java/com/crm/custom/controller/CustomController.java
  2. 67 0
      crm-custom/src/main/java/com/crm/custom/controller/GoldenCommonQuestionController.java
  3. 78 0
      crm-custom/src/main/java/com/crm/custom/controller/GoldenGoodsController.java
  4. 79 0
      crm-custom/src/main/java/com/crm/custom/controller/GoldenGoodsVideoController.java
  5. 61 0
      crm-custom/src/main/java/com/crm/custom/controller/GoldenRewardQuestionController.java
  6. 14 0
      crm-custom/src/main/java/com/crm/custom/dao/mapper/GoldenCommonQuestionMapper.java
  7. 18 0
      crm-custom/src/main/java/com/crm/custom/dao/mapper/GoldenGoodsMapper.java
  8. 19 0
      crm-custom/src/main/java/com/crm/custom/dao/mapper/GoldenGoodsVideoMapper.java
  9. 14 0
      crm-custom/src/main/java/com/crm/custom/dao/mapper/GoldenRewardQuestionMapper.java
  10. 22 0
      crm-custom/src/main/java/com/crm/custom/dao/repository/GoldenCommonQuestionRepository.java
  11. 22 0
      crm-custom/src/main/java/com/crm/custom/dao/repository/GoldenGoodsRepository.java
  12. 21 0
      crm-custom/src/main/java/com/crm/custom/dao/repository/GoldenGoodsVideoRepository.java
  13. 22 0
      crm-custom/src/main/java/com/crm/custom/dao/repository/GoldenRewardQuestionRepository.java
  14. 24 0
      crm-custom/src/main/java/com/crm/custom/service/GoldenCommonQuestionService.java
  15. 32 0
      crm-custom/src/main/java/com/crm/custom/service/GoldenGoodsService.java
  16. 31 0
      crm-custom/src/main/java/com/crm/custom/service/GoldenGoodsVideoService.java
  17. 24 0
      crm-custom/src/main/java/com/crm/custom/service/GoldenRewardQuestionService.java
  18. 16 22
      crm-custom/src/main/java/com/crm/custom/service/impl/CustomInfoServiceImpl.java
  19. 100 0
      crm-custom/src/main/java/com/crm/custom/service/impl/GoldenCommonQuestionServiceImpl.java
  20. 151 0
      crm-custom/src/main/java/com/crm/custom/service/impl/GoldenGoodsServiceImpl.java
  21. 156 0
      crm-custom/src/main/java/com/crm/custom/service/impl/GoldenGoodsVideoServiceImpl.java
  22. 100 0
      crm-custom/src/main/java/com/crm/custom/service/impl/GoldenRewardQuestionServiceImpl.java
  23. 1 1
      crm-custom/src/main/resources/application-dev.yml
  24. 1 1
      crm-custom/src/main/resources/application-test.yml
  25. 5 1
      crm-custom/src/main/resources/application.yml
  26. 31 0
      crm-custom/src/main/resources/mapper/GoldenCommonQuestionMapper.xml
  27. 57 0
      crm-custom/src/main/resources/mapper/GoldenGoods.xml
  28. 56 0
      crm-custom/src/main/resources/mapper/GoldenGoodsVideo.xml
  29. 31 0
      crm-custom/src/main/resources/mapper/GoldenRewardQuestionMapper.xml
  30. 53 0
      crm-manager/src/main/java/com/crm/manager/controller/GoldenCommonQuestionController.java
  31. 58 0
      crm-manager/src/main/java/com/crm/manager/controller/GoldenGoodsController.java
  32. 59 0
      crm-manager/src/main/java/com/crm/manager/controller/GoldenGoodsVideoController.java
  33. 54 0
      crm-manager/src/main/java/com/crm/manager/controller/GoldenRewardQuestionController.java
  34. 33 0
      crm-manager/src/main/java/com/crm/manager/service/golden/GoldenCommonQuestionFeignService.java
  35. 40 0
      crm-manager/src/main/java/com/crm/manager/service/golden/GoldenGoodsFeignService.java
  36. 39 0
      crm-manager/src/main/java/com/crm/manager/service/golden/GoldenGoodsVideoFeignService.java
  37. 33 0
      crm-manager/src/main/java/com/crm/manager/service/golden/GoldenRewardQuestionFeignService.java
  38. 1 1
      crm-manager/src/main/resources/application-dev.yml
  39. 1 1
      crm-manager/src/main/resources/application-test.yml
  40. 56 0
      crm-model/src/main/java/com/crm/rely/backend/model/dto/golden/goods/GoldenGoodsListDto.java
  41. 61 0
      crm-model/src/main/java/com/crm/rely/backend/model/dto/golden/goods/GoldenGoodsVideoListDto.java
  42. 24 0
      crm-model/src/main/java/com/crm/rely/backend/model/dto/golden/question/GoldenCommonQuestionListDto.java
  43. 24 0
      crm-model/src/main/java/com/crm/rely/backend/model/dto/golden/question/GoldenRewardQuestionListDto.java
  44. 4 0
      crm-model/src/main/java/com/crm/rely/backend/model/entity/custom/info/CustomInfoRegisterEntity.java
  45. 2 2
      crm-model/src/main/java/com/crm/rely/backend/model/entity/custom/info/CustomInfoRegisterSendEmailCodeEntity.java
  46. 53 0
      crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/goods/GoldenGoodsAddEntity.java
  47. 9 0
      crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/goods/GoldenGoodsDeleteEntitys.java
  48. 23 0
      crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/goods/GoldenGoodsSearchEntity.java
  49. 53 0
      crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/goods/GoldenGoodsUpdateEntity.java
  50. 64 0
      crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/goods/GoldenGoodsVideoAddEntity.java
  51. 9 0
      crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/goods/GoldenGoodsVideoDeleteEntitys.java
  52. 15 0
      crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/goods/GoldenGoodsVideoSearchEntity.java
  53. 64 0
      crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/goods/GoldenGoodsVideoUpdateEntity.java
  54. 27 0
      crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/question/GoldenCommonQuestionAddEntity.java
  55. 9 0
      crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/question/GoldenCommonQuestionDeleteEntitys.java
  56. 11 0
      crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/question/GoldenCommonQuestionSearchEntity.java
  57. 27 0
      crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/question/GoldenCommonQuestionUpdateEntity.java
  58. 26 0
      crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/question/GoldenRewardQuestionAddEntity.java
  59. 9 0
      crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/question/GoldenRewardQuestionDeleteEntitys.java
  60. 11 0
      crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/question/GoldenRewardQuestionSearchEntity.java
  61. 26 0
      crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/question/GoldenRewardQuestionUpdateEntity.java
  62. 24 0
      crm-model/src/main/java/com/crm/rely/backend/model/pojo/table/GoldenCommonQuestionTable.java
  63. 50 0
      crm-model/src/main/java/com/crm/rely/backend/model/pojo/table/GoldenGoodsTable.java
  64. 62 0
      crm-model/src/main/java/com/crm/rely/backend/model/pojo/table/GoldenGoodsVideoTable.java
  65. 25 0
      crm-model/src/main/java/com/crm/rely/backend/model/pojo/table/GoldenRewardQuestionTable.java
  66. 52 0
      crm-model/src/main/java/com/crm/rely/backend/model/pojo/view/GoldenGoodsListView.java
  67. 58 0
      crm-model/src/main/java/com/crm/rely/backend/model/pojo/view/GoldenGoodsVideoListView.java

+ 1 - 1
crm-custom/src/main/java/com/crm/custom/controller/CustomController.java

@@ -80,7 +80,7 @@ public class CustomController extends BaseLoginController {
 
         entity.setValid(1);
         entity.setStatus(StatusConstants.APPLY_STATUS);
-        entity.setPosition(CustomConstants.POSITION1);
+        //entity.setPosition(CustomConstants.POSITION1);
         customInfoService.add(entity);
 
         return BaseResultDto.success(Constants.REGISTER_SUCCESS);

+ 67 - 0
crm-custom/src/main/java/com/crm/custom/controller/GoldenCommonQuestionController.java

@@ -0,0 +1,67 @@
+package com.crm.custom.controller;
+
+import com.crm.custom.service.GoldenCommonQuestionService;
+import com.crm.rely.backend.core.constant.FeignClientAnnotation;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.model.dto.golden.question.GoldenCommonQuestionListDto;
+import com.crm.rely.backend.model.entity.golden.question.GoldenCommonQuestionAddEntity;
+import com.crm.rely.backend.model.entity.golden.question.GoldenCommonQuestionDeleteEntitys;
+import com.crm.rely.backend.model.entity.golden.question.GoldenCommonQuestionSearchEntity;
+import com.crm.rely.backend.model.entity.golden.question.GoldenCommonQuestionUpdateEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/common/question")
+public class GoldenCommonQuestionController {
+
+    @Autowired
+    private GoldenCommonQuestionService goldenCommonQuestionService;
+
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<GoldenCommonQuestionListDto> customPageList(@RequestBody GoldenCommonQuestionSearchEntity entity) throws Exception {
+        return goldenCommonQuestionService.searchPageList(entity);
+    }
+
+    @PostMapping("/manager/add")
+    @FeignClientAnnotation
+    public BaseResultDto add(@RequestBody @Validated GoldenCommonQuestionAddEntity entity) throws Exception {
+        goldenCommonQuestionService.add(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/manager/delete")
+    @FeignClientAnnotation
+    public BaseResultDto delete(@RequestBody @Validated GoldenCommonQuestionDeleteEntitys entitys) throws Exception {
+
+        goldenCommonQuestionService.delete(entitys);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/manager/update")
+    @FeignClientAnnotation
+    public BaseResultDto update(@RequestBody @Validated GoldenCommonQuestionUpdateEntity entity) throws Exception {
+        goldenCommonQuestionService.update(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/manager/search/list")
+    @FeignClientAnnotation
+    public ResultWithPagerDto<GoldenCommonQuestionListDto> pageList(@RequestBody GoldenCommonQuestionSearchEntity entity) throws Exception {
+        return goldenCommonQuestionService.searchPageList(entity);
+    }
+
+    @PostMapping("/manager/search/single")
+    @FeignClientAnnotation
+    public BaseResultDto searchSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        return BaseResultDto.success(goldenCommonQuestionService.searchSingle(entity));
+    }
+
+}

+ 78 - 0
crm-custom/src/main/java/com/crm/custom/controller/GoldenGoodsController.java

@@ -0,0 +1,78 @@
+package com.crm.custom.controller;
+
+import com.crm.custom.service.GoldenGoodsService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.constant.FeignClientAnnotation;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.model.dto.golden.goods.GoldenGoodsListDto;
+import com.crm.rely.backend.model.entity.custom.info.CustomInfoEntity;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsAddEntity;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsDeleteEntitys;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsSearchEntity;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsUpdateEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+
+@RestController
+@RequestMapping("/goods")
+public class GoldenGoodsController {
+
+    @Autowired
+    private GoldenGoodsService goldenGoodsService;
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<GoldenGoodsListDto> customPageList(@RequestBody GoldenGoodsSearchEntity entity, CustomInfoEntity infoEntity) throws Exception {
+        return goldenGoodsService.customPageList(entity,infoEntity);
+    }
+
+    @PostMapping("/manager/add")
+    @FeignClientAnnotation
+    public BaseResultDto add(@RequestBody @Validated GoldenGoodsAddEntity entity) throws Exception {
+        goldenGoodsService.add(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/manager/delete")
+    @FeignClientAnnotation
+    public BaseResultDto delete(@RequestBody @Validated GoldenGoodsDeleteEntitys entitys) throws Exception {
+
+        goldenGoodsService.delete(entitys);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/manager/update")
+    @FeignClientAnnotation
+    public BaseResultDto update(@RequestBody @Validated GoldenGoodsUpdateEntity entity) throws Exception {
+        goldenGoodsService.update(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/manager/search/list")
+    @FeignClientAnnotation
+    public ResultWithPagerDto<GoldenGoodsListDto> pageList(@RequestBody GoldenGoodsSearchEntity entity) throws Exception {
+        return goldenGoodsService.searchPageList(entity);
+    }
+
+    @PostMapping("/manager/search/single")
+    @FeignClientAnnotation
+    public BaseResultDto searchSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        return BaseResultDto.success(goldenGoodsService.searchSingle(entity));
+    }
+
+    @PostMapping("/manager/upload")
+    @FeignClientAnnotation
+    public BaseResultDto managerUpload(@RequestParam(value = "file", required = false) MultipartFile file, HttpServletRequest req) throws Exception {
+
+        goldenGoodsService.validated(file);
+
+        String path = goldenGoodsService.uploadFile(file);
+        return BaseResultDto.success(Constants.UPLOAD_SUCCESS, path);
+    }
+
+}

+ 79 - 0
crm-custom/src/main/java/com/crm/custom/controller/GoldenGoodsVideoController.java

@@ -0,0 +1,79 @@
+package com.crm.custom.controller;
+
+import com.crm.custom.service.GoldenGoodsVideoService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.constant.FeignClientAnnotation;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.model.dto.golden.goods.GoldenGoodsVideoListDto;
+import com.crm.rely.backend.model.entity.custom.info.CustomInfoEntity;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsVideoAddEntity;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsVideoDeleteEntitys;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsVideoSearchEntity;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsVideoUpdateEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+
+@RestController
+@RequestMapping("/goods/video")
+public class GoldenGoodsVideoController {
+
+    @Autowired
+    private GoldenGoodsVideoService goldenGoodsVideoService;
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<GoldenGoodsVideoListDto> customPageList(@RequestBody GoldenGoodsVideoSearchEntity entity, CustomInfoEntity infoEntity) throws Exception {
+        return goldenGoodsVideoService.customPageList(entity, infoEntity);
+    }
+
+    @PostMapping("/manager/add")
+    @FeignClientAnnotation
+    public BaseResultDto add(@RequestBody @Validated GoldenGoodsVideoAddEntity entity) throws Exception {
+        goldenGoodsVideoService.add(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/manager/delete")
+    @FeignClientAnnotation
+    public BaseResultDto delete(@RequestBody @Validated GoldenGoodsVideoDeleteEntitys entitys) throws Exception {
+
+        goldenGoodsVideoService.delete(entitys);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/manager/update")
+    @FeignClientAnnotation
+    public BaseResultDto update(@RequestBody @Validated GoldenGoodsVideoUpdateEntity entity) throws Exception {
+        goldenGoodsVideoService.update(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/manager/search/list")
+    @FeignClientAnnotation
+    public ResultWithPagerDto<GoldenGoodsVideoListDto> pageList(@RequestBody GoldenGoodsVideoSearchEntity entity) throws Exception {
+        return goldenGoodsVideoService.searchPageList(entity);
+    }
+
+    @PostMapping("/manager/search/single")
+    @FeignClientAnnotation
+    public BaseResultDto searchSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        return BaseResultDto.success(goldenGoodsVideoService.searchSingle(entity));
+    }
+
+    @PostMapping("/manager/upload/{goodsId}")
+    @FeignClientAnnotation
+    public BaseResultDto managerUpload(@RequestParam(value = "file", required = false) MultipartFile file,
+                                       @PathVariable("goodsId") Long goodsId, HttpServletRequest req) throws Exception {
+
+        //goldenGoodsVideoService.validatedVideo(file);
+
+        String path = goldenGoodsVideoService.uploadFile(goodsId, file);
+        return BaseResultDto.success(Constants.UPLOAD_SUCCESS, path);
+    }
+
+}

+ 61 - 0
crm-custom/src/main/java/com/crm/custom/controller/GoldenRewardQuestionController.java

@@ -0,0 +1,61 @@
+package com.crm.custom.controller;
+
+import com.crm.custom.service.GoldenRewardQuestionService;
+import com.crm.rely.backend.core.constant.FeignClientAnnotation;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.model.dto.golden.question.GoldenRewardQuestionListDto;
+import com.crm.rely.backend.model.entity.golden.question.GoldenRewardQuestionAddEntity;
+import com.crm.rely.backend.model.entity.golden.question.GoldenRewardQuestionDeleteEntitys;
+import com.crm.rely.backend.model.entity.golden.question.GoldenRewardQuestionSearchEntity;
+import com.crm.rely.backend.model.entity.golden.question.GoldenRewardQuestionUpdateEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/reward/question")
+public class GoldenRewardQuestionController {
+
+    @Autowired
+    private GoldenRewardQuestionService goldenRewardQuestionService;
+
+    @PostMapping("/manager/add")
+    @FeignClientAnnotation
+    public BaseResultDto add(@RequestBody @Validated GoldenRewardQuestionAddEntity entity) throws Exception {
+        goldenRewardQuestionService.add(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/manager/delete")
+    @FeignClientAnnotation
+    public BaseResultDto delete(@RequestBody @Validated GoldenRewardQuestionDeleteEntitys entitys) throws Exception {
+
+        goldenRewardQuestionService.delete(entitys);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/manager/update")
+    @FeignClientAnnotation
+    public BaseResultDto update(@RequestBody @Validated GoldenRewardQuestionUpdateEntity entity) throws Exception {
+        goldenRewardQuestionService.update(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/manager/search/list")
+    @FeignClientAnnotation
+    public ResultWithPagerDto<GoldenRewardQuestionListDto> pageList(@RequestBody GoldenRewardQuestionSearchEntity entity) throws Exception {
+        return goldenRewardQuestionService.searchPageList(entity);
+    }
+
+    @PostMapping("/search/single")
+    @FeignClientAnnotation
+    public BaseResultDto searchSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        return BaseResultDto.success(goldenRewardQuestionService.searchSingle(entity));
+    }
+
+}

+ 14 - 0
crm-custom/src/main/java/com/crm/custom/dao/mapper/GoldenCommonQuestionMapper.java

@@ -0,0 +1,14 @@
+package com.crm.custom.dao.mapper;
+
+import com.crm.rely.backend.model.entity.golden.question.GoldenCommonQuestionSearchEntity;
+import com.crm.rely.backend.model.pojo.table.GoldenCommonQuestionTable;
+
+import java.util.List;
+
+public interface GoldenCommonQuestionMapper {
+
+    Integer countList(GoldenCommonQuestionSearchEntity entity);
+
+    List<GoldenCommonQuestionTable> pageList(GoldenCommonQuestionSearchEntity entity);
+
+}

+ 18 - 0
crm-custom/src/main/java/com/crm/custom/dao/mapper/GoldenGoodsMapper.java

@@ -0,0 +1,18 @@
+package com.crm.custom.dao.mapper;
+
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsSearchEntity;
+import com.crm.rely.backend.model.pojo.table.GoldenGoodsTable;
+import com.crm.rely.backend.model.pojo.view.GoldenGoodsListView;
+
+import java.util.List;
+
+public interface GoldenGoodsMapper {
+
+    List<GoldenGoodsListView> customPageList(GoldenGoodsSearchEntity entity);
+
+    Integer countList(GoldenGoodsSearchEntity entity);
+
+    List<GoldenGoodsTable> pageList(GoldenGoodsSearchEntity entity);
+
+
+}

+ 19 - 0
crm-custom/src/main/java/com/crm/custom/dao/mapper/GoldenGoodsVideoMapper.java

@@ -0,0 +1,19 @@
+package com.crm.custom.dao.mapper;
+
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsVideoSearchEntity;
+import com.crm.rely.backend.model.pojo.table.GoldenGoodsVideoTable;
+import com.crm.rely.backend.model.pojo.view.GoldenGoodsVideoListView;
+
+import java.util.List;
+
+public interface GoldenGoodsVideoMapper {
+
+    Integer customCountList(GoldenGoodsVideoSearchEntity entity);
+
+    List<GoldenGoodsVideoListView> customPageList(GoldenGoodsVideoSearchEntity entity);
+
+    Integer countList(GoldenGoodsVideoSearchEntity entity);
+
+    List<GoldenGoodsVideoTable> pageList(GoldenGoodsVideoSearchEntity entity);
+
+}

+ 14 - 0
crm-custom/src/main/java/com/crm/custom/dao/mapper/GoldenRewardQuestionMapper.java

@@ -0,0 +1,14 @@
+package com.crm.custom.dao.mapper;
+
+import com.crm.rely.backend.model.entity.golden.question.GoldenRewardQuestionSearchEntity;
+import com.crm.rely.backend.model.pojo.table.GoldenRewardQuestionTable;
+
+import java.util.List;
+
+public interface GoldenRewardQuestionMapper {
+
+    Integer countList(GoldenRewardQuestionSearchEntity entity);
+
+    List<GoldenRewardQuestionTable> pageList(GoldenRewardQuestionSearchEntity entity);
+
+}

+ 22 - 0
crm-custom/src/main/java/com/crm/custom/dao/repository/GoldenCommonQuestionRepository.java

@@ -0,0 +1,22 @@
+package com.crm.custom.dao.repository;
+
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import com.crm.rely.backend.model.pojo.table.GoldenCommonQuestionTable;
+import org.springframework.data.jpa.repository.Lock;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.LockModeType;
+import java.util.List;
+
+@Repository
+public interface GoldenCommonQuestionRepository extends BaseRepository<GoldenCommonQuestionTable> {
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    GoldenCommonQuestionTable findFirstById(Long id);
+
+    List<GoldenCommonQuestionTable> findAllByIdIn(List<Long> ids);
+
+    GoldenCommonQuestionTable getFirstById(Long id);
+
+
+}

+ 22 - 0
crm-custom/src/main/java/com/crm/custom/dao/repository/GoldenGoodsRepository.java

@@ -0,0 +1,22 @@
+package com.crm.custom.dao.repository;
+
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import com.crm.rely.backend.model.pojo.table.GoldenGoodsTable;
+import org.springframework.data.jpa.repository.Lock;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.LockModeType;
+import java.util.List;
+
+@Repository
+public interface GoldenGoodsRepository extends BaseRepository<GoldenGoodsTable> {
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    GoldenGoodsTable findFirstById(Long id);
+
+    List<GoldenGoodsTable> findAllByIdIn(List<Long> ids);
+
+    GoldenGoodsTable getFirstById(Long id);
+
+
+}

+ 21 - 0
crm-custom/src/main/java/com/crm/custom/dao/repository/GoldenGoodsVideoRepository.java

@@ -0,0 +1,21 @@
+package com.crm.custom.dao.repository;
+
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import com.crm.rely.backend.model.pojo.table.GoldenGoodsVideoTable;
+import org.springframework.data.jpa.repository.Lock;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.LockModeType;
+import java.util.List;
+
+@Repository
+public interface GoldenGoodsVideoRepository extends BaseRepository<GoldenGoodsVideoTable> {
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    GoldenGoodsVideoTable findFirstById(Long id);
+
+    List<GoldenGoodsVideoTable> findAllByIdIn(List<Long> ids);
+
+    GoldenGoodsVideoTable getFirstById(Long id);
+
+}

+ 22 - 0
crm-custom/src/main/java/com/crm/custom/dao/repository/GoldenRewardQuestionRepository.java

@@ -0,0 +1,22 @@
+package com.crm.custom.dao.repository;
+
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import com.crm.rely.backend.model.pojo.table.GoldenRewardQuestionTable;
+import org.springframework.data.jpa.repository.Lock;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.LockModeType;
+import java.util.List;
+
+@Repository
+public interface GoldenRewardQuestionRepository extends BaseRepository<GoldenRewardQuestionTable> {
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    GoldenRewardQuestionTable findFirstById(Long id);
+
+    List<GoldenRewardQuestionTable> findAllByIdIn(List<Long> ids);
+
+    GoldenRewardQuestionTable getFirstById(Long id);
+
+
+}

+ 24 - 0
crm-custom/src/main/java/com/crm/custom/service/GoldenCommonQuestionService.java

@@ -0,0 +1,24 @@
+package com.crm.custom.service;
+
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.exception.ServiceException;
+import com.crm.rely.backend.model.dto.golden.question.GoldenCommonQuestionListDto;
+import com.crm.rely.backend.model.entity.golden.question.GoldenCommonQuestionAddEntity;
+import com.crm.rely.backend.model.entity.golden.question.GoldenCommonQuestionDeleteEntitys;
+import com.crm.rely.backend.model.entity.golden.question.GoldenCommonQuestionSearchEntity;
+import com.crm.rely.backend.model.entity.golden.question.GoldenCommonQuestionUpdateEntity;
+
+public interface GoldenCommonQuestionService {
+
+    void add(GoldenCommonQuestionAddEntity entity) throws ServiceException;
+
+    void delete(GoldenCommonQuestionDeleteEntitys entitys) throws ServiceException;
+
+    void update(GoldenCommonQuestionUpdateEntity entity) throws ServiceException;
+
+    ResultWithPagerDto<GoldenCommonQuestionListDto> searchPageList(GoldenCommonQuestionSearchEntity entity) throws ServiceException;
+
+    GoldenCommonQuestionListDto searchSingle(SingleLongEntity entity) throws ServiceException;
+    
+}

+ 32 - 0
crm-custom/src/main/java/com/crm/custom/service/GoldenGoodsService.java

@@ -0,0 +1,32 @@
+package com.crm.custom.service;
+
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.exception.ServiceException;
+import com.crm.rely.backend.model.dto.golden.goods.GoldenGoodsListDto;
+import com.crm.rely.backend.model.entity.custom.info.CustomInfoEntity;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsAddEntity;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsDeleteEntitys;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsSearchEntity;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsUpdateEntity;
+import org.springframework.web.multipart.MultipartFile;
+
+public interface GoldenGoodsService {
+
+    ResultWithPagerDto<GoldenGoodsListDto> customPageList(GoldenGoodsSearchEntity entity, CustomInfoEntity infoEntity);
+
+    void add(GoldenGoodsAddEntity entity) throws ServiceException;
+
+    void delete(GoldenGoodsDeleteEntitys entitys) throws ServiceException;
+
+    void update(GoldenGoodsUpdateEntity entity) throws ServiceException;
+
+    ResultWithPagerDto<GoldenGoodsListDto> searchPageList(GoldenGoodsSearchEntity entity) throws ServiceException;
+
+    GoldenGoodsListDto searchSingle(SingleLongEntity entity) throws ServiceException;
+
+    void validated(MultipartFile file) throws ServiceException;
+
+    String uploadFile(MultipartFile file) throws Exception;
+
+}

+ 31 - 0
crm-custom/src/main/java/com/crm/custom/service/GoldenGoodsVideoService.java

@@ -0,0 +1,31 @@
+package com.crm.custom.service;
+
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.exception.ServiceException;
+import com.crm.rely.backend.model.dto.golden.goods.GoldenGoodsVideoListDto;
+import com.crm.rely.backend.model.entity.custom.info.CustomInfoEntity;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsVideoAddEntity;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsVideoDeleteEntitys;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsVideoSearchEntity;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsVideoUpdateEntity;
+import org.springframework.web.multipart.MultipartFile;
+
+public interface GoldenGoodsVideoService {
+
+    ResultWithPagerDto<GoldenGoodsVideoListDto> customPageList(GoldenGoodsVideoSearchEntity entity, CustomInfoEntity infoEntity);
+
+    void add(GoldenGoodsVideoAddEntity entity) throws ServiceException;
+
+    void delete(GoldenGoodsVideoDeleteEntitys entitys) throws ServiceException;
+
+    void update(GoldenGoodsVideoUpdateEntity entity) throws ServiceException;
+
+    ResultWithPagerDto<GoldenGoodsVideoListDto> searchPageList(GoldenGoodsVideoSearchEntity entity) throws ServiceException;
+
+    GoldenGoodsVideoListDto searchSingle(SingleLongEntity entity) throws ServiceException;
+
+    void validatedVideo(MultipartFile file) throws ServiceException;
+
+    String uploadFile(Long goodsId, MultipartFile file) throws Exception;
+}

+ 24 - 0
crm-custom/src/main/java/com/crm/custom/service/GoldenRewardQuestionService.java

@@ -0,0 +1,24 @@
+package com.crm.custom.service;
+
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.exception.ServiceException;
+import com.crm.rely.backend.model.dto.golden.question.GoldenRewardQuestionListDto;
+import com.crm.rely.backend.model.entity.golden.question.GoldenRewardQuestionAddEntity;
+import com.crm.rely.backend.model.entity.golden.question.GoldenRewardQuestionDeleteEntitys;
+import com.crm.rely.backend.model.entity.golden.question.GoldenRewardQuestionSearchEntity;
+import com.crm.rely.backend.model.entity.golden.question.GoldenRewardQuestionUpdateEntity;
+
+public interface GoldenRewardQuestionService {
+
+    void add(GoldenRewardQuestionAddEntity entity) throws ServiceException;
+
+    void delete(GoldenRewardQuestionDeleteEntitys entitys) throws ServiceException;
+
+    void update(GoldenRewardQuestionUpdateEntity entity) throws ServiceException;
+
+    ResultWithPagerDto<GoldenRewardQuestionListDto> searchPageList(GoldenRewardQuestionSearchEntity entity) throws ServiceException;
+
+    GoldenRewardQuestionListDto searchSingle(SingleLongEntity entity) throws ServiceException;
+    
+}

+ 16 - 22
crm-custom/src/main/java/com/crm/custom/service/impl/CustomInfoServiceImpl.java

@@ -136,10 +136,10 @@ public class CustomInfoServiceImpl extends BaseUploadServiceImpl implements Cust
             获取ib信息
          */
 
-        List<CustomFileDto> fileDtos = customFileService.getAllFiles(customInfoTable.getId());
+        //List<CustomFileDto> fileDtos = customFileService.getAllFiles(customInfoTable.getId());
 
-        CustomBankTable customBankTable = customBankService.getByCustomId(customInfoTable.getId());
-        CustomInfoEntity transform = transform(customInfoTable, null, entity, fileDtos, customBankTable);
+        //CustomBankTable customBankTable = customBankService.getByCustomId(customInfoTable.getId());
+        CustomInfoEntity transform = transform(customInfoTable, null, entity);
 
         /**
          * 更新登录信息
@@ -237,24 +237,14 @@ public class CustomInfoServiceImpl extends BaseUploadServiceImpl implements Cust
     public void add(CustomInfoRegisterEntity entity) throws ServiceException, InterruptedException {
 
         //打印注册信息日志
-        String registerString = String.format("register email:%s,emailCode:%s,agentId:%d",
-                entity.getEmail(),
-                entity.getEmailCode(),
-                entity.getAgentId());
+        String registerString = String.format("register email:%s,emailCode:%s,agentId:%d",entity.getEmail(),entity.getEmailCode(), entity.getAgentId());
         log.info(registerString);
 
-        emailService.validateCode(entity.getEmail(), entity.getEmailCode());
+        //emailService.validateCode(entity.getEmail(), entity.getEmailCode());
         //验证邮箱是否存在
         existByEmail(entity.getEmail());
 
-        //验证身份证
-        existByIdentity(entity.getIdentity());
-
-        //验证学号
-//        existBySno(entity.getSno());
-
-        //验证代理是否存在
-        if (entity.getAgentId() != null) {
+        /*if (entity.getAgentId() != null) {
             UserInfoTable agent = userInfoRepository.getFirstById(entity.getAgentId());
             //不存在代理设置为null 外佣设置为0
             if (agent == null) {
@@ -274,7 +264,7 @@ public class CustomInfoServiceImpl extends BaseUploadServiceImpl implements Cust
                 Long agentId = Long.parseLong(sysConfigTable.getValue());
                 entity.setAgentId(agentId);
             }
-        }
+        }*/
 
         //获取国家信息
         SysCountryTable sysCountryTable = sysCountryService.getByCode(entity.getCountry());
@@ -687,7 +677,12 @@ public class CustomInfoServiceImpl extends BaseUploadServiceImpl implements Cust
 
         sysEmailSendEntity.setUsers(entity.getEmail());
         sysEmailSendEntity.setEmailSendEnum(EmailSendEnum.REGISTER_CODE);
-        sysEmailSendEntity.setTemplateName(GlobalSystemEmailCodeConstants.CUSTOM_REGISTER_SEND_EMAIL_CODE_CN);
+        if (CountryUtil.isCN(entity.getCountry())) {
+            sysEmailSendEntity.setTemplateName(GlobalSystemEmailCodeConstants.CUSTOM_REGISTER_SEND_EMAIL_CODE_CN);
+        } else {
+            sysEmailSendEntity.setTemplateName(GlobalSystemEmailCodeConstants.CUSTOM_REGISTER_SEND_EMAIL_CODE_EN);
+        }
+        sysEmailSendEntity.setMap(map);
         sysEmailSendEntity.setMap(map);
 
         return sysEmailSendEntity;
@@ -902,8 +897,7 @@ public class CustomInfoServiceImpl extends BaseUploadServiceImpl implements Cust
     }
 
     private CustomInfoEntity transform(CustomInfoTable customInfoTable, UserInfoEntity ibInfoEntity,
-                                       CustomInfoLoginEntity entity, List<CustomFileDto> fileDtos,
-                                       CustomBankTable customBankTable) {
+                                       CustomInfoLoginEntity entity) {
 
         CustomInfoEntity infoEntity = new CustomInfoEntity();
 
@@ -913,7 +907,7 @@ public class CustomInfoServiceImpl extends BaseUploadServiceImpl implements Cust
             infoEntity.setAddressLines(Arrays.asList(customInfoTable.getAddressLine().split("@#")));
         }
         infoEntity.setIbInfo(ibInfoEntity);
-        infoEntity.setFiles(fileDtos);
+        /*infoEntity.setFiles(fileDtos);
         if (customBankTable != null) {
             infoEntity.setBankAddr(customBankTable.getBankAddr());
             infoEntity.setBankBack(customBankTable.getBankBack());
@@ -924,7 +918,7 @@ public class CustomInfoServiceImpl extends BaseUploadServiceImpl implements Cust
             infoEntity.setSwiftCode(customBankTable.getSwiftCode());
             infoEntity.setBankFront(customBankTable.getBankFront());
             infoEntity.setBankCardNum(customBankTable.getBankCardNum());
-        }
+        }*/
 
         return infoEntity;
     }

+ 100 - 0
crm-custom/src/main/java/com/crm/custom/service/impl/GoldenCommonQuestionServiceImpl.java

@@ -0,0 +1,100 @@
+package com.crm.custom.service.impl;
+
+import com.crm.custom.dao.mapper.GoldenCommonQuestionMapper;
+import com.crm.custom.dao.repository.GoldenCommonQuestionRepository;
+import com.crm.custom.service.GoldenCommonQuestionService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.dto.base.PageDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.exception.ServiceException;
+import com.crm.rely.backend.model.dto.golden.question.GoldenCommonQuestionListDto;
+import com.crm.rely.backend.model.entity.golden.question.GoldenCommonQuestionAddEntity;
+import com.crm.rely.backend.model.entity.golden.question.GoldenCommonQuestionDeleteEntitys;
+import com.crm.rely.backend.model.entity.golden.question.GoldenCommonQuestionSearchEntity;
+import com.crm.rely.backend.model.entity.golden.question.GoldenCommonQuestionUpdateEntity;
+import com.crm.rely.backend.model.pojo.table.GoldenCommonQuestionTable;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Service
+public class GoldenCommonQuestionServiceImpl implements GoldenCommonQuestionService {
+
+    @Autowired
+    private GoldenCommonQuestionRepository repository;
+    @Autowired
+    private GoldenCommonQuestionMapper mapper;
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void add(GoldenCommonQuestionAddEntity entity) throws ServiceException {
+        GoldenCommonQuestionTable table = new GoldenCommonQuestionTable();
+        BeanUtils.copyProperties(entity, table);
+        repository.save(table);
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void delete(GoldenCommonQuestionDeleteEntitys entity) throws ServiceException {
+        List<GoldenCommonQuestionTable> tables = repository.findAllByIdIn(entity.getIds());
+        if (tables == null) {
+            throw ServiceException.exception(Constants.INFO_NOT_FOUND);
+        }
+        repository.delete(tables);
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void update(GoldenCommonQuestionUpdateEntity entity) throws ServiceException {
+        GoldenCommonQuestionTable table = repository.findFirstById(entity.getId());
+        if (table == null) {
+            throw ServiceException.exception(Constants.INFO_NOT_FOUND);
+        }
+        BeanUtils.copyProperties(entity, table);
+        repository.save(table);
+    }
+
+    @Override
+    public ResultWithPagerDto<GoldenCommonQuestionListDto> searchPageList(GoldenCommonQuestionSearchEntity entity) throws ServiceException {
+        Integer count = mapper.countList(entity);
+        PageDto pageDto = PageDto.format(entity, count);
+        if (count == null || count <= 0) {
+            return ResultWithPagerDto.success(pageDto);
+        }
+        List<GoldenCommonQuestionTable> tables = mapper.pageList(entity);
+        if (tables == null || tables.size() <= 0) {
+            throw new ServiceException(Constants.SYSTEM_ERROR);
+        }
+        List<GoldenCommonQuestionListDto> dtos = new ArrayList<>(tables.size());
+
+        for (GoldenCommonQuestionTable table : tables) {
+            GoldenCommonQuestionListDto dto = transformSearchListDto(table);
+            dtos.add(dto);
+        }
+
+        return ResultWithPagerDto.success(pageDto, dtos);
+    }
+
+    @Override
+    public GoldenCommonQuestionListDto searchSingle(SingleLongEntity entity) throws ServiceException {
+        GoldenCommonQuestionTable table = repository.getFirstById(entity.getId());
+        if (table == null) {
+            throw ServiceException.exception(Constants.INFO_NOT_FOUND);
+        }
+
+        return transformSearchListDto(table);
+    }
+
+    private GoldenCommonQuestionListDto transformSearchListDto(GoldenCommonQuestionTable table) {
+        GoldenCommonQuestionListDto dto = new GoldenCommonQuestionListDto();
+        BeanUtils.copyProperties(table, dto);
+        return dto;
+    }
+
+
+}

+ 151 - 0
crm-custom/src/main/java/com/crm/custom/service/impl/GoldenGoodsServiceImpl.java

@@ -0,0 +1,151 @@
+package com.crm.custom.service.impl;
+
+import com.crm.custom.dao.mapper.GoldenGoodsMapper;
+import com.crm.custom.dao.repository.GoldenGoodsRepository;
+import com.crm.custom.service.GoldenGoodsService;
+import com.crm.custom.service.impl.base.BaseUploadServiceImpl;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.dto.base.PageDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.exception.ServiceException;
+import com.crm.rely.backend.model.dto.golden.goods.GoldenGoodsListDto;
+import com.crm.rely.backend.model.entity.custom.info.CustomInfoEntity;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsAddEntity;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsDeleteEntitys;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsSearchEntity;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsUpdateEntity;
+import com.crm.rely.backend.model.pojo.table.GoldenGoodsTable;
+import com.crm.rely.backend.model.pojo.view.GoldenGoodsListView;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Service
+public class GoldenGoodsServiceImpl extends BaseUploadServiceImpl implements GoldenGoodsService {
+
+    @Autowired
+    private GoldenGoodsRepository repository;
+    @Autowired
+    private GoldenGoodsMapper mapper;
+
+    @Override
+    public ResultWithPagerDto<GoldenGoodsListDto> customPageList(GoldenGoodsSearchEntity entity, CustomInfoEntity infoEntity) throws ServiceException {
+        if (infoEntity == null || infoEntity.getId() == null) {
+            entity.setCustomId(-1l);
+        }else {
+            entity.setCustomId(infoEntity.getId());
+        }
+
+        Integer count = mapper.countList(entity);
+        PageDto pageDto = PageDto.format(entity, count);
+        if (count == null || count <= 0) {
+            return ResultWithPagerDto.success(pageDto);
+        }
+        List<GoldenGoodsListView> views = mapper.customPageList(entity);
+        if (views == null || views.size() <= 0) {
+            throw new ServiceException(Constants.SYSTEM_ERROR);
+        }
+        List<GoldenGoodsListDto> dtos = new ArrayList<>(views.size());
+
+        for (GoldenGoodsListView view : views) {
+            GoldenGoodsListDto dto = new GoldenGoodsListDto();
+            BeanUtils.copyProperties(view, dto);
+
+            if (infoEntity == null || infoEntity.getId() == null) {
+                dto.setCustomType(0);
+            }else{
+                if(view.getCustomId() == null){
+                    dto.setCustomType(1);
+                }else{
+                    dto.setCustomType(2);
+                }
+            }
+
+            dtos.add(dto);
+        }
+
+        return ResultWithPagerDto.success(pageDto, dtos);
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void add(GoldenGoodsAddEntity entity) throws ServiceException {
+        GoldenGoodsTable table = new GoldenGoodsTable();
+        BeanUtils.copyProperties(entity, table);
+        repository.save(table);
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void delete(GoldenGoodsDeleteEntitys entity) throws ServiceException {
+        List<GoldenGoodsTable> tables = repository.findAllByIdIn(entity.getIds());
+        if (tables == null) {
+            throw ServiceException.exception(Constants.INFO_NOT_FOUND);
+        }
+        repository.delete(tables);
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void update(GoldenGoodsUpdateEntity entity) throws ServiceException {
+        GoldenGoodsTable table = repository.findFirstById(entity.getId());
+        if (table == null) {
+            throw ServiceException.exception(Constants.INFO_NOT_FOUND);
+        }
+        BeanUtils.copyProperties(entity, table);
+        repository.save(table);
+    }
+
+    @Override
+    public ResultWithPagerDto<GoldenGoodsListDto> searchPageList(GoldenGoodsSearchEntity entity) throws ServiceException {
+        Integer count = mapper.countList(entity);
+        PageDto pageDto = PageDto.format(entity, count);
+        if (count == null || count <= 0) {
+            return ResultWithPagerDto.success(pageDto);
+        }
+        List<GoldenGoodsTable> tables = mapper.pageList(entity);
+        if (tables == null || tables.size() <= 0) {
+            throw new ServiceException(Constants.SYSTEM_ERROR);
+        }
+        List<GoldenGoodsListDto> dtos = new ArrayList<>(tables.size());
+
+        for (GoldenGoodsTable table : tables) {
+            GoldenGoodsListDto dto = transformSearchListDto(table);
+            dtos.add(dto);
+        }
+
+        return ResultWithPagerDto.success(pageDto, dtos);
+    }
+
+    @Override
+    public GoldenGoodsListDto searchSingle(SingleLongEntity entity) throws ServiceException {
+        GoldenGoodsTable table = repository.getFirstById(entity.getId());
+        if (table == null) {
+            throw ServiceException.exception(Constants.INFO_NOT_FOUND);
+        }
+
+        return transformSearchListDto(table);
+    }
+
+    private GoldenGoodsListDto transformSearchListDto(GoldenGoodsTable table) {
+        GoldenGoodsListDto dto = new GoldenGoodsListDto();
+        BeanUtils.copyProperties(table, dto);
+        return dto;
+    }
+
+    @Override
+    public String uploadFile(MultipartFile file) throws Exception {
+
+        String middlePath = "/goods";
+        String path = saveFile(middlePath, file);
+
+        return path;
+    }
+
+}

+ 156 - 0
crm-custom/src/main/java/com/crm/custom/service/impl/GoldenGoodsVideoServiceImpl.java

@@ -0,0 +1,156 @@
+package com.crm.custom.service.impl;
+
+import com.crm.custom.dao.mapper.GoldenGoodsVideoMapper;
+import com.crm.custom.dao.repository.GoldenGoodsRepository;
+import com.crm.custom.dao.repository.GoldenGoodsVideoRepository;
+import com.crm.custom.service.GoldenGoodsVideoService;
+import com.crm.custom.service.impl.base.BaseUploadServiceImpl;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.dto.base.PageDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.exception.ServiceException;
+import com.crm.rely.backend.model.dto.golden.goods.GoldenGoodsVideoListDto;
+import com.crm.rely.backend.model.entity.custom.info.CustomInfoEntity;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsVideoAddEntity;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsVideoDeleteEntitys;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsVideoSearchEntity;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsVideoUpdateEntity;
+import com.crm.rely.backend.model.pojo.table.GoldenGoodsTable;
+import com.crm.rely.backend.model.pojo.table.GoldenGoodsVideoTable;
+import com.crm.rely.backend.model.pojo.view.GoldenGoodsVideoListView;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Service
+public class GoldenGoodsVideoServiceImpl extends BaseUploadServiceImpl implements GoldenGoodsVideoService {
+
+    @Autowired
+    private GoldenGoodsVideoRepository repository;
+    @Autowired
+    private GoldenGoodsVideoMapper mapper;
+    @Autowired
+    private GoldenGoodsRepository goldenGoodsRepository;
+
+    @Override
+    public ResultWithPagerDto<GoldenGoodsVideoListDto> customPageList(GoldenGoodsVideoSearchEntity entity, CustomInfoEntity infoEntity) throws ServiceException {
+        if (infoEntity == null || infoEntity.getId() == null) {
+            entity.setCustomId(-1l);
+        }else {
+            entity.setCustomId(infoEntity.getId());
+        }
+
+        Integer count = mapper.customCountList(entity);
+        PageDto pageDto = PageDto.format(entity, count);
+        if (count == null || count <= 0) {
+            return ResultWithPagerDto.success(pageDto);
+        }
+        List<GoldenGoodsVideoListView> views = mapper.customPageList(entity);
+        if (views == null || views.size() <= 0) {
+            throw new ServiceException(Constants.SYSTEM_ERROR);
+        }
+        List<GoldenGoodsVideoListDto> dtos = new ArrayList<>(views.size());
+
+        for (GoldenGoodsVideoListView view : views) {
+            GoldenGoodsVideoListDto dto = new GoldenGoodsVideoListDto();
+            BeanUtils.copyProperties(view, dto);
+
+            if ((infoEntity != null && infoEntity.getId() != null && view.getCustomId() != null) || view.getPayType() == 0) {
+                dto.setPayType(0);
+            }else{
+                dto.setFileUrl(null);
+                dto.setLinkUrl(null);
+            }
+
+            dtos.add(dto);
+        }
+
+        return ResultWithPagerDto.success(pageDto, dtos);
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void add(GoldenGoodsVideoAddEntity entity) throws ServiceException {
+        GoldenGoodsTable goldenGoodsTable = goldenGoodsRepository.getFirstById(entity.getGoodsId());
+        if (goldenGoodsTable == null) {
+            throw ServiceException.exception(Constants.INFO_NOT_FOUND);
+        }
+        GoldenGoodsVideoTable table = new GoldenGoodsVideoTable();
+        BeanUtils.copyProperties(entity, table);
+        repository.save(table);
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void delete(GoldenGoodsVideoDeleteEntitys entity) throws ServiceException {
+        List<GoldenGoodsVideoTable> tables = repository.findAllByIdIn(entity.getIds());
+        if (tables == null) {
+            throw ServiceException.exception(Constants.INFO_NOT_FOUND);
+        }
+        repository.delete(tables);
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void update(GoldenGoodsVideoUpdateEntity entity) throws ServiceException {
+        GoldenGoodsVideoTable table = repository.findFirstById(entity.getId());
+        if (table == null) {
+            throw ServiceException.exception(Constants.INFO_NOT_FOUND);
+        }
+        BeanUtils.copyProperties(entity, table);
+        repository.save(table);
+    }
+
+    @Override
+    public ResultWithPagerDto<GoldenGoodsVideoListDto> searchPageList(GoldenGoodsVideoSearchEntity entity) throws ServiceException {
+        Integer count = mapper.countList(entity);
+        PageDto pageDto = PageDto.format(entity, count);
+        if (count == null || count <= 0) {
+            return ResultWithPagerDto.success(pageDto);
+        }
+        List<GoldenGoodsVideoTable> tables = mapper.pageList(entity);
+        if (tables == null || tables.size() <= 0) {
+            throw new ServiceException(Constants.SYSTEM_ERROR);
+        }
+        List<GoldenGoodsVideoListDto> dtos = new ArrayList<>(tables.size());
+
+        for (GoldenGoodsVideoTable table : tables) {
+            GoldenGoodsVideoListDto dto = transformSearchListDto(table);
+            dtos.add(dto);
+        }
+
+        return ResultWithPagerDto.success(pageDto, dtos);
+    }
+
+    @Override
+    public GoldenGoodsVideoListDto searchSingle(SingleLongEntity entity) throws ServiceException {
+        GoldenGoodsVideoTable table = repository.getFirstById(entity.getId());
+        if (table == null) {
+            throw ServiceException.exception(Constants.INFO_NOT_FOUND);
+        }
+
+        return transformSearchListDto(table);
+    }
+
+    private GoldenGoodsVideoListDto transformSearchListDto(GoldenGoodsVideoTable table) {
+        GoldenGoodsVideoListDto dto = new GoldenGoodsVideoListDto();
+        BeanUtils.copyProperties(table, dto);
+        return dto;
+    }
+
+    @Override
+    public String uploadFile(Long goodsId, MultipartFile file) throws Exception {
+
+        String middlePath = "/goods/video/" + goodsId;
+        String path = saveFile(middlePath, file);
+
+        return path;
+    }
+
+}

+ 100 - 0
crm-custom/src/main/java/com/crm/custom/service/impl/GoldenRewardQuestionServiceImpl.java

@@ -0,0 +1,100 @@
+package com.crm.custom.service.impl;
+
+import com.crm.custom.dao.mapper.GoldenRewardQuestionMapper;
+import com.crm.custom.dao.repository.GoldenRewardQuestionRepository;
+import com.crm.custom.service.GoldenRewardQuestionService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.dto.base.PageDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.exception.ServiceException;
+import com.crm.rely.backend.model.dto.golden.question.GoldenRewardQuestionListDto;
+import com.crm.rely.backend.model.entity.golden.question.GoldenRewardQuestionAddEntity;
+import com.crm.rely.backend.model.entity.golden.question.GoldenRewardQuestionDeleteEntitys;
+import com.crm.rely.backend.model.entity.golden.question.GoldenRewardQuestionSearchEntity;
+import com.crm.rely.backend.model.entity.golden.question.GoldenRewardQuestionUpdateEntity;
+import com.crm.rely.backend.model.pojo.table.GoldenRewardQuestionTable;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Service
+public class GoldenRewardQuestionServiceImpl implements GoldenRewardQuestionService {
+
+    @Autowired
+    private GoldenRewardQuestionRepository repository;
+    @Autowired
+    private GoldenRewardQuestionMapper mapper;
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void add(GoldenRewardQuestionAddEntity entity) throws ServiceException {
+        GoldenRewardQuestionTable table = new GoldenRewardQuestionTable();
+        BeanUtils.copyProperties(entity, table);
+        repository.save(table);
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void delete(GoldenRewardQuestionDeleteEntitys entity) throws ServiceException {
+        List<GoldenRewardQuestionTable> tables = repository.findAllByIdIn(entity.getIds());
+        if (tables == null) {
+            throw ServiceException.exception(Constants.INFO_NOT_FOUND);
+        }
+        repository.delete(tables);
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void update(GoldenRewardQuestionUpdateEntity entity) throws ServiceException {
+        GoldenRewardQuestionTable table = repository.findFirstById(entity.getId());
+        if (table == null) {
+            throw ServiceException.exception(Constants.INFO_NOT_FOUND);
+        }
+        BeanUtils.copyProperties(entity, table);
+        repository.save(table);
+    }
+
+    @Override
+    public ResultWithPagerDto<GoldenRewardQuestionListDto> searchPageList(GoldenRewardQuestionSearchEntity entity) throws ServiceException {
+        Integer count = mapper.countList(entity);
+        PageDto pageDto = PageDto.format(entity, count);
+        if (count == null || count <= 0) {
+            return ResultWithPagerDto.success(pageDto);
+        }
+        List<GoldenRewardQuestionTable> tables = mapper.pageList(entity);
+        if (tables == null || tables.size() <= 0) {
+            throw new ServiceException(Constants.SYSTEM_ERROR);
+        }
+        List<GoldenRewardQuestionListDto> dtos = new ArrayList<>(tables.size());
+
+        for (GoldenRewardQuestionTable table : tables) {
+            GoldenRewardQuestionListDto dto = transformSearchListDto(table);
+            dtos.add(dto);
+        }
+
+        return ResultWithPagerDto.success(pageDto, dtos);
+    }
+
+    @Override
+    public GoldenRewardQuestionListDto searchSingle(SingleLongEntity entity) throws ServiceException {
+        GoldenRewardQuestionTable table = repository.getFirstById(entity.getId());
+        if (table == null) {
+            throw ServiceException.exception(Constants.INFO_NOT_FOUND);
+        }
+
+        return transformSearchListDto(table);
+    }
+
+    private GoldenRewardQuestionListDto transformSearchListDto(GoldenRewardQuestionTable table) {
+        GoldenRewardQuestionListDto dto = new GoldenRewardQuestionListDto();
+        BeanUtils.copyProperties(table, dto);
+        return dto;
+    }
+
+
+}

+ 1 - 1
crm-custom/src/main/resources/application-dev.yml

@@ -15,7 +15,7 @@ spring:
 #    host: 47.75.159.72
 #    masterPassword: 123123
 web:
-  upload-path: D:/server/cwg_crm/upload
+  upload-path: ..\upload
   front-path: G:\crm\trader_test_front\customer-frontend-dist
 eureka:
   client:

+ 1 - 1
crm-custom/src/main/resources/application-test.yml

@@ -17,7 +17,7 @@ spring:
 #    host: 47.75.159.72
 #    masterPassword: 123123
 web:
-  upload-path: C:\server\cwg_crm\upload
+  upload-path: ..\upload
 eureka:
   client:
     serviceUrl:

+ 5 - 1
crm-custom/src/main/resources/application.yml

@@ -27,7 +27,11 @@ login:
     /custom/login/exist,
     /email/unsubscribe/add,
     /email/unsubscribe/type,
-    /custom/get/language
+    /custom/get/language,
+    /common/question/search/list,
+    /goods/search/list,
+    /goods/video/search/list,
+    /goods/video/search/single
   single-sign-on: true
 role:
   excludePathPatterns: /**

+ 31 - 0
crm-custom/src/main/resources/mapper/GoldenCommonQuestionMapper.xml

@@ -0,0 +1,31 @@
+<?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.crm.custom.dao.mapper.GoldenCommonQuestionMapper">
+
+    <select id="countList" resultType="integer"
+            parameterType="com.crm.rely.backend.model.entity.golden.question.GoldenCommonQuestionSearchEntity">
+        select count(*) from golden_common_question
+        <where>
+            <if test="question!=null and question!=''">
+                and question like concat('%',#{question},'%')
+            </if>
+        </where>
+    </select>
+
+    <select id="pageList" resultType="com.crm.rely.backend.model.pojo.table.GoldenCommonQuestionTable"
+            parameterType="com.crm.rely.backend.model.entity.golden.question.GoldenCommonQuestionSearchEntity">
+        select * from golden_common_question
+        <where>
+            <if test="question!=null and question!=''">
+                and question like concat('%',#{question},'%')
+            </if>
+        </where>
+        order by id desc
+        <if test="page != null">
+            limit #{page.offset},#{page.row}
+        </if>
+    </select>
+
+</mapper>

+ 57 - 0
crm-custom/src/main/resources/mapper/GoldenGoods.xml

@@ -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.crm.custom.dao.mapper.GoldenGoodsMapper">
+
+    <select id="customPageList" resultType="com.crm.rely.backend.model.pojo.view.GoldenGoodsListView"
+            parameterType="com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsSearchEntity">
+        select goods.*,
+            der.custom_id
+        from golden_goods goods
+        left join golden_order_details der on goods.id = der.goods_id and der.custom_id = #{customId}
+        <where>
+            <if test="goodsName!=null and goodsName!=''">
+                and goods.goods_name like concat('%',#{goodsName},'%')
+            </if>
+            <if test="goodsType!=null">
+                and goods.`goods_type` = #{goodsType}
+            </if>
+        </where>
+        order by goods.id desc
+        <if test="page != null">
+            limit #{page.offset},#{page.row}
+        </if>
+    </select>
+
+    <select id="countList" resultType="integer"
+            parameterType="com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsSearchEntity">
+        select count(*) from golden_goods
+        <where>
+            <if test="goodsName!=null and goodsName!=''">
+                and goods_name like concat('%',#{goodsName},'%')
+            </if>
+            <if test="goodsType!=null">
+                and `goods_type` = #{goodsType}
+            </if>
+        </where>
+    </select>
+
+    <select id="pageList" resultType="com.crm.rely.backend.model.pojo.table.GoldenGoodsTable"
+            parameterType="com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsSearchEntity">
+        select * from golden_goods
+        <where>
+            <if test="goodsName!=null and goodsName!=''">
+                and goods_name like concat('%',#{goodsName},'%')
+            </if>
+            <if test="goodsType!=null">
+                and `goods_type` = #{goodsType}
+            </if>
+        </where>
+        order by id desc
+        <if test="page != null">
+            limit #{page.offset},#{page.row}
+        </if>
+    </select>
+
+</mapper>

+ 56 - 0
crm-custom/src/main/resources/mapper/GoldenGoodsVideo.xml

@@ -0,0 +1,56 @@
+<?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.crm.custom.dao.mapper.GoldenGoodsVideoMapper">
+
+    <select id="customCountList" resultType="integer"
+            parameterType="com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsVideoSearchEntity">
+        select count(*) from golden_goods_video video
+        left join golden_order_details der on video.goods_id = der.goods_id and der.custom_id = #{customId}
+        where video.goods_id = #{goodsId}
+        <if test="videoName!=null and videoName!=''">
+            and video.video_name like concat('%',#{videoName},'%')
+        </if>
+    </select>
+
+    <select id="customPageList" resultType="com.crm.rely.backend.model.pojo.view.GoldenGoodsVideoListView"
+            parameterType="com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsVideoSearchEntity">
+        select video.id,video.goods_id,video_name,title,
+               file_type,front_url,pay_type,sort,
+               der.custom_id
+        from golden_goods_video video
+        left join golden_order_details der on video.goods_id = der.goods_id and der.custom_id = #{customId}
+        where video.goods_id = #{goodsId}
+        <if test="videoName!=null and videoName!=''">
+            and video.video_name like concat('%',#{videoName},'%')
+        </if>
+        order by video.sort asc
+        <if test="page != null">
+            limit #{page.offset},#{page.row}
+        </if>
+    </select>
+
+    <select id="countList" resultType="integer"
+            parameterType="com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsVideoSearchEntity">
+        select count(*) from golden_goods_video
+        where goods_id = #{goodsId}
+        <if test="videoName!=null and videoName!=''">
+            and video_name like concat('%',#{videoName},'%')
+        </if>
+    </select>
+
+    <select id="pageList" resultType="com.crm.rely.backend.model.pojo.table.GoldenGoodsVideoTable"
+            parameterType="com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsVideoSearchEntity">
+        select * from golden_goods_video
+        where goods_id = #{goodsId}
+        <if test="videoName!=null and videoName!=''">
+            and video_name like concat('%',#{videoName},'%')
+        </if>
+        order by sort asc
+        <if test="page != null">
+            limit #{page.offset},#{page.row}
+        </if>
+    </select>
+
+</mapper>

+ 31 - 0
crm-custom/src/main/resources/mapper/GoldenRewardQuestionMapper.xml

@@ -0,0 +1,31 @@
+<?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.crm.custom.dao.mapper.GoldenRewardQuestionMapper">
+
+    <select id="countList" resultType="integer"
+            parameterType="com.crm.rely.backend.model.entity.golden.question.GoldenRewardQuestionSearchEntity">
+        select count(*) from golden_reward_question
+        <where>
+            <if test="question!=null and question!=''">
+                and question like concat('%',#{question},'%')
+            </if>
+        </where>
+    </select>
+
+    <select id="pageList" resultType="com.crm.rely.backend.model.pojo.table.GoldenRewardQuestionTable"
+            parameterType="com.crm.rely.backend.model.entity.golden.question.GoldenRewardQuestionSearchEntity">
+        select * from golden_reward_question
+        <where>
+            <if test="question!=null and question!=''">
+                and question like concat('%',#{question},'%')
+            </if>
+        </where>
+        order by id desc
+        <if test="page != null">
+            limit #{page.offset},#{page.row}
+        </if>
+    </select>
+
+</mapper>

+ 53 - 0
crm-manager/src/main/java/com/crm/manager/controller/GoldenCommonQuestionController.java

@@ -0,0 +1,53 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.golden.GoldenCommonQuestionFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.model.dto.golden.question.GoldenCommonQuestionListDto;
+import com.crm.rely.backend.model.entity.golden.question.GoldenCommonQuestionAddEntity;
+import com.crm.rely.backend.model.entity.golden.question.GoldenCommonQuestionDeleteEntitys;
+import com.crm.rely.backend.model.entity.golden.question.GoldenCommonQuestionSearchEntity;
+import com.crm.rely.backend.model.entity.golden.question.GoldenCommonQuestionUpdateEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/common/question")
+public class GoldenCommonQuestionController {
+
+    @Autowired
+    private GoldenCommonQuestionFeignService goldenCommonQuestionService;
+
+    @PostMapping("/add")
+    public BaseResultDto add(@RequestBody @Validated GoldenCommonQuestionAddEntity entity) throws Exception {
+
+        return goldenCommonQuestionService.add(entity);
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated GoldenCommonQuestionDeleteEntitys entitys) throws Exception {
+        return goldenCommonQuestionService.delete(entitys);
+    }
+
+    @PostMapping("/update")
+    public BaseResultDto update(@RequestBody @Validated GoldenCommonQuestionUpdateEntity entity) throws Exception {
+
+        return goldenCommonQuestionService.update(entity);
+    }
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<GoldenCommonQuestionListDto> pageList(@RequestBody GoldenCommonQuestionSearchEntity entity) throws Exception {
+        return goldenCommonQuestionService.searchPageList(entity);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto searchSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        return goldenCommonQuestionService.searchSingle(entity);
+    }
+
+}

+ 58 - 0
crm-manager/src/main/java/com/crm/manager/controller/GoldenGoodsController.java

@@ -0,0 +1,58 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.golden.GoldenGoodsFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.model.dto.golden.goods.GoldenGoodsListDto;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsAddEntity;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsDeleteEntitys;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsSearchEntity;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsUpdateEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+@RestController
+@RequestMapping("/goods")
+public class GoldenGoodsController {
+
+    @Autowired
+    private GoldenGoodsFeignService goldenGoodsService;
+
+    @PostMapping("/add")
+    public BaseResultDto add(@RequestBody @Validated GoldenGoodsAddEntity entity) throws Exception {
+
+        return goldenGoodsService.add(entity);
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated GoldenGoodsDeleteEntitys entitys) throws Exception {
+
+
+        return goldenGoodsService.delete(entitys);
+    }
+
+    @PostMapping("/update")
+    public BaseResultDto update(@RequestBody @Validated GoldenGoodsUpdateEntity entity) throws Exception {
+
+        return goldenGoodsService.update(entity);
+    }
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<GoldenGoodsListDto> pageList(@RequestBody GoldenGoodsSearchEntity entity) throws Exception {
+        return goldenGoodsService.searchPageList(entity);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto searchSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        return goldenGoodsService.searchSingle(entity);
+    }
+
+    @PostMapping("/upload")
+    public BaseResultDto upload(@RequestParam(value = "file", required = false) MultipartFile file) throws Exception {
+        return goldenGoodsService.managerUpload(file);
+    }
+
+}

+ 59 - 0
crm-manager/src/main/java/com/crm/manager/controller/GoldenGoodsVideoController.java

@@ -0,0 +1,59 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.golden.GoldenGoodsVideoFeignService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.model.dto.golden.goods.GoldenGoodsVideoListDto;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsVideoAddEntity;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsVideoDeleteEntitys;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsVideoSearchEntity;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsVideoUpdateEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+@RestController
+@RequestMapping("/goods/video")
+public class GoldenGoodsVideoController {
+
+    @Autowired
+    private GoldenGoodsVideoFeignService goldenGoodsVideoService;
+
+    @PostMapping("/add")
+    public BaseResultDto add(@RequestBody @Validated GoldenGoodsVideoAddEntity entity) throws Exception {
+
+        return goldenGoodsVideoService.add(entity);
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated GoldenGoodsVideoDeleteEntitys entitys) throws Exception {
+
+        return goldenGoodsVideoService.delete(entitys);
+    }
+
+    @PostMapping("/update")
+    public BaseResultDto update(@RequestBody @Validated GoldenGoodsVideoUpdateEntity entity) throws Exception {
+
+        return goldenGoodsVideoService.update(entity);
+    }
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<GoldenGoodsVideoListDto> pageList(@RequestBody GoldenGoodsVideoSearchEntity entity) throws Exception {
+        return goldenGoodsVideoService.searchPageList(entity);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto searchSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        return goldenGoodsVideoService.searchSingle(entity);
+    }
+
+    @PostMapping("/upload")
+    public BaseResultDto upload(@RequestParam(value = "file", required = false) MultipartFile file,
+                                @RequestParam(value = "goodsId", required = false) Long goodsId) throws Exception {
+        return goldenGoodsVideoService.managerUpload(file, goodsId);
+    }
+
+}

+ 54 - 0
crm-manager/src/main/java/com/crm/manager/controller/GoldenRewardQuestionController.java

@@ -0,0 +1,54 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.golden.GoldenRewardQuestionFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.model.dto.golden.question.GoldenRewardQuestionListDto;
+import com.crm.rely.backend.model.entity.golden.question.GoldenRewardQuestionAddEntity;
+import com.crm.rely.backend.model.entity.golden.question.GoldenRewardQuestionDeleteEntitys;
+import com.crm.rely.backend.model.entity.golden.question.GoldenRewardQuestionSearchEntity;
+import com.crm.rely.backend.model.entity.golden.question.GoldenRewardQuestionUpdateEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/reward/question")
+public class GoldenRewardQuestionController {
+
+    @Autowired
+    private GoldenRewardQuestionFeignService goldenRewardQuestionService;
+
+    @PostMapping("/add")
+    public BaseResultDto add(@RequestBody @Validated GoldenRewardQuestionAddEntity entity) throws Exception {
+
+        return goldenRewardQuestionService.add(entity);
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated GoldenRewardQuestionDeleteEntitys entitys) throws Exception {
+
+        return goldenRewardQuestionService.delete(entitys);
+    }
+
+    @PostMapping("/update")
+    public BaseResultDto update(@RequestBody @Validated GoldenRewardQuestionUpdateEntity entity) throws Exception {
+
+        return goldenRewardQuestionService.update(entity);
+    }
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<GoldenRewardQuestionListDto> pageList(@RequestBody GoldenRewardQuestionSearchEntity entity) throws Exception {
+        return goldenRewardQuestionService.searchPageList(entity);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto searchSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        return goldenRewardQuestionService.searchSingle(entity);
+    }
+
+}

+ 33 - 0
crm-manager/src/main/java/com/crm/manager/service/golden/GoldenCommonQuestionFeignService.java

@@ -0,0 +1,33 @@
+package com.crm.manager.service.golden;
+
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.exception.ServiceException;
+import com.crm.rely.backend.model.dto.golden.question.GoldenCommonQuestionListDto;
+import com.crm.rely.backend.model.entity.golden.question.GoldenCommonQuestionAddEntity;
+import com.crm.rely.backend.model.entity.golden.question.GoldenCommonQuestionDeleteEntitys;
+import com.crm.rely.backend.model.entity.golden.question.GoldenCommonQuestionSearchEntity;
+import com.crm.rely.backend.model.entity.golden.question.GoldenCommonQuestionUpdateEntity;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+
+@FeignClient(name = "GOLDEN-CUSTOM-SERVICE", path = "/common/question/manager")
+public interface GoldenCommonQuestionFeignService {
+
+    @PostMapping("/add")
+    BaseResultDto add(GoldenCommonQuestionAddEntity entity) throws ServiceException;
+
+    @PostMapping("/delete")
+    BaseResultDto delete(GoldenCommonQuestionDeleteEntitys entitys) throws ServiceException;
+
+    @PostMapping("/update")
+    BaseResultDto update(GoldenCommonQuestionUpdateEntity entity) throws ServiceException;
+
+    @PostMapping("/search/list")
+    ResultWithPagerDto<GoldenCommonQuestionListDto> searchPageList(GoldenCommonQuestionSearchEntity entity) throws ServiceException;
+
+    @PostMapping("/search/single")
+    BaseResultDto searchSingle(SingleLongEntity entity) throws ServiceException;
+    
+}

+ 40 - 0
crm-manager/src/main/java/com/crm/manager/service/golden/GoldenGoodsFeignService.java

@@ -0,0 +1,40 @@
+package com.crm.manager.service.golden;
+
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.exception.ServiceException;
+import com.crm.rely.backend.model.dto.golden.goods.GoldenGoodsListDto;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsAddEntity;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsDeleteEntitys;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsSearchEntity;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsUpdateEntity;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestPart;
+import org.springframework.web.multipart.MultipartFile;
+
+@FeignClient(name = "GOLDEN-CUSTOM-SERVICE", path = "/goods/manager")
+public interface GoldenGoodsFeignService {
+
+    @PostMapping("/add")
+    BaseResultDto add(GoldenGoodsAddEntity entity) throws ServiceException;
+
+    @PostMapping("/delete")
+    BaseResultDto delete(GoldenGoodsDeleteEntitys entitys) throws ServiceException;
+
+    @PostMapping("/update")
+    BaseResultDto update(GoldenGoodsUpdateEntity entity) throws ServiceException;
+
+    @PostMapping("/search/list")
+    ResultWithPagerDto<GoldenGoodsListDto> searchPageList(GoldenGoodsSearchEntity entity) throws ServiceException;
+
+    @PostMapping("/search/single")
+    BaseResultDto searchSingle(SingleLongEntity entity) throws ServiceException;
+
+    @PostMapping(value = "/upload",  consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
+    BaseResultDto managerUpload(@RequestPart(value = "file") MultipartFile file) throws Exception;
+    
+}

+ 39 - 0
crm-manager/src/main/java/com/crm/manager/service/golden/GoldenGoodsVideoFeignService.java

@@ -0,0 +1,39 @@
+package com.crm.manager.service.golden;
+
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.exception.ServiceException;
+import com.crm.rely.backend.model.dto.golden.goods.GoldenGoodsVideoListDto;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsVideoAddEntity;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsVideoDeleteEntitys;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsVideoSearchEntity;
+import com.crm.rely.backend.model.entity.golden.goods.GoldenGoodsVideoUpdateEntity;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestPart;
+import org.springframework.web.multipart.MultipartFile;
+
+@FeignClient(name = "GOLDEN-CUSTOM-SERVICE", path = "/goods/video/manager")
+public interface GoldenGoodsVideoFeignService {
+
+    @PostMapping("/add")
+    BaseResultDto add(GoldenGoodsVideoAddEntity entity) throws ServiceException;
+
+    @PostMapping("/delete")
+    BaseResultDto delete(GoldenGoodsVideoDeleteEntitys entitys) throws ServiceException;
+
+    @PostMapping("/update")
+    BaseResultDto update(GoldenGoodsVideoUpdateEntity entity) throws ServiceException;
+
+    @PostMapping("/search/list")
+    ResultWithPagerDto<GoldenGoodsVideoListDto> searchPageList(GoldenGoodsVideoSearchEntity entity) throws ServiceException;
+
+    @PostMapping("/search/single")
+    BaseResultDto searchSingle(SingleLongEntity entity) throws ServiceException;
+
+    @PostMapping(value = "/upload/{goodsId}", produces = {MediaType.APPLICATION_JSON_UTF8_VALUE}, consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
+    BaseResultDto managerUpload(@RequestPart(value = "file") MultipartFile file, @PathVariable("goodsId")  Long goodsId) throws Exception;
+}

+ 33 - 0
crm-manager/src/main/java/com/crm/manager/service/golden/GoldenRewardQuestionFeignService.java

@@ -0,0 +1,33 @@
+package com.crm.manager.service.golden;
+
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.exception.ServiceException;
+import com.crm.rely.backend.model.dto.golden.question.GoldenRewardQuestionListDto;
+import com.crm.rely.backend.model.entity.golden.question.GoldenRewardQuestionAddEntity;
+import com.crm.rely.backend.model.entity.golden.question.GoldenRewardQuestionDeleteEntitys;
+import com.crm.rely.backend.model.entity.golden.question.GoldenRewardQuestionSearchEntity;
+import com.crm.rely.backend.model.entity.golden.question.GoldenRewardQuestionUpdateEntity;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+
+@FeignClient(name = "GOLDEN-CUSTOM-SERVICE", path = "/reward/question/manager")
+public interface GoldenRewardQuestionFeignService {
+
+    @PostMapping("/add")
+    BaseResultDto add(GoldenRewardQuestionAddEntity entity) throws ServiceException;
+
+    @PostMapping("/delete")
+    BaseResultDto delete(GoldenRewardQuestionDeleteEntitys entitys) throws ServiceException;
+
+    @PostMapping("/update")
+    BaseResultDto update(GoldenRewardQuestionUpdateEntity entity) throws ServiceException;
+
+    @PostMapping("/search/list")
+    ResultWithPagerDto<GoldenRewardQuestionListDto> searchPageList(GoldenRewardQuestionSearchEntity entity) throws ServiceException;
+
+    @PostMapping("/search/single")
+    BaseResultDto searchSingle(SingleLongEntity entity) throws ServiceException;
+    
+}

+ 1 - 1
crm-manager/src/main/resources/application-dev.yml

@@ -16,7 +16,7 @@ logging:
     com.crm.manager.dao.mapper: trace
 
 web:
-  upload-path: D:/server/cwg_crm/upload
+  upload-path: ..\upload
   front-path: G:\crm\trader_test_front\manager-frontend-dist
 eureka:
   client:

+ 1 - 1
crm-manager/src/main/resources/application-test.yml

@@ -22,7 +22,7 @@ eureka:
 login:
   single-sign-on: true
 web:
-  upload-path: C:\server\cwg_crm\upload
+  upload-path: ..\upload
   export-path: C:\server\cwg_crm\export
 ribbon:
   ReadTimeout: 60000

+ 56 - 0
crm-model/src/main/java/com/crm/rely/backend/model/dto/golden/goods/GoldenGoodsListDto.java

@@ -0,0 +1,56 @@
+package com.crm.rely.backend.model.dto.golden.goods;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class GoldenGoodsListDto {
+
+    private Long id;
+
+    /**
+     * 名称
+     */
+    private String goodsName;
+
+    /**
+     * 标题
+     */
+    private String title;
+
+    /**
+     * 简介
+     */
+    private String introduction;
+
+    /**
+     * 封面
+     */
+    private String frontUrl;
+
+    /**
+     * 类型 1:免费试看课程 2:实战交易课程(50节) 3:拆出章节视频*12节 4:章节视频 5:专题报告
+     */
+    private Integer goodsType;
+
+    /**
+     * 价格
+     */
+    private BigDecimal goodsPrice;
+
+    /**
+     * 下载链接
+     */
+    private String download;
+
+    private Date addTime;
+
+    /**
+     * 0:未登录 1:未购买 2:已购买
+     */
+    private Integer customType;
+
+}

+ 61 - 0
crm-model/src/main/java/com/crm/rely/backend/model/dto/golden/goods/GoldenGoodsVideoListDto.java

@@ -0,0 +1,61 @@
+package com.crm.rely.backend.model.dto.golden.goods;
+
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class GoldenGoodsVideoListDto {
+
+    private Long id;
+
+    private Long goodsId;
+
+    /**
+     * 名称
+     */
+    private String videoName;
+
+    /**
+     * 标题
+     */
+    private String title;
+
+    /**
+     * 简介
+     */
+    private String introduction;
+
+    /**
+     * 封面
+     */
+    private String frontUrl;
+
+    /**
+     * 是否收费 0:否 1:是
+     */
+    private Integer payType;
+
+    /**
+     * 1:上传视频 2:外部连接
+     */
+    private Integer fileType;
+
+    /**
+     *
+     */
+    private String fileUrl;
+
+    /**
+     * 外部连接
+     */
+    private String linkUrl;
+
+    /**
+     * 排序
+     */
+    private Integer sort;
+
+    private Date addTime;
+
+}

+ 24 - 0
crm-model/src/main/java/com/crm/rely/backend/model/dto/golden/question/GoldenCommonQuestionListDto.java

@@ -0,0 +1,24 @@
+package com.crm.rely.backend.model.dto.golden.question;
+
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class GoldenCommonQuestionListDto {
+
+    private Long id;
+
+    /**
+     * 问题
+     */
+    private String question;
+
+    /**
+     * 答案
+     */
+    private String answer;
+
+    private Date addTime;
+
+}

+ 24 - 0
crm-model/src/main/java/com/crm/rely/backend/model/dto/golden/question/GoldenRewardQuestionListDto.java

@@ -0,0 +1,24 @@
+package com.crm.rely.backend.model.dto.golden.question;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+public class GoldenRewardQuestionListDto {
+
+    private Long id;
+    /**
+     * 问题
+     */
+    private String question;
+
+    /**
+     * 答案 0:错 1:对
+     */
+    private Integer answer;
+
+    private Date addTime;
+
+}

+ 4 - 0
crm-model/src/main/java/com/crm/rely/backend/model/entity/custom/info/CustomInfoRegisterEntity.java

@@ -37,6 +37,10 @@ public class CustomInfoRegisterEntity extends BaseAddEntity {
     @NotBlank(message = Constants.EMAIL_CODE_NOT_NULL_ERROR)
     private String emailCode;
 
+    @NotNull(message = Constants.NAME_NOT_NULL)
+    @NotBlank(message = Constants.NAME_NOT_NULL)
+    private String name;
+
     /**
      * 区号
      */

+ 2 - 2
crm-model/src/main/java/com/crm/rely/backend/model/entity/custom/info/CustomInfoRegisterSendEmailCodeEntity.java

@@ -13,8 +13,8 @@ import java.util.Date;
 @Data
 public class CustomInfoRegisterSendEmailCodeEntity {
 
-    @NotNull(message = CustomConstant.COUNTRY_NOT_NULL)
-    @NotBlank(message = CustomConstant.COUNTRY_NOT_NULL)
+    //@NotNull(message = CustomConstant.COUNTRY_NOT_NULL)
+    //@NotBlank(message = CustomConstant.COUNTRY_NOT_NULL)
     private String country;
     
     @Pattern(regexp = RegexpConstants.REGEXP_EMAIL, message = Constants.EMAIL_FORMAT_ERROR)

+ 53 - 0
crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/goods/GoldenGoodsAddEntity.java

@@ -0,0 +1,53 @@
+package com.crm.rely.backend.model.entity.golden.goods;
+
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.entity.base.BaseAddEntity;
+import lombok.Data;
+import org.hibernate.validator.constraints.NotEmpty;
+
+import javax.validation.constraints.NotNull;
+import java.math.BigDecimal;
+
+@Data
+public class GoldenGoodsAddEntity extends BaseAddEntity {
+
+    /**
+     * 名称
+     */
+    @NotNull(message = Constants.NAME_NOT_NULL)
+    @NotEmpty(message = Constants.NAME_NOT_NULL)
+    private String goodsName;
+
+    /**
+     * 标题
+     */
+    @NotNull(message = Constants.PARAMETER_ERROR)
+    @NotEmpty(message = Constants.PARAMETER_ERROR)
+    private String title;
+
+    /**
+     * 简介
+     */
+    private String introduction;
+
+    /**
+     * 封面
+     */
+    private String frontUrl;
+
+    /**
+     * 类型 1:免费试看课程 2:实战交易课程(50节) 3:拆出章节视频*12节 4:章节视频 5:专题报告
+     */
+    private Integer goodsType;
+
+    /**
+     * 价格
+     */
+    private BigDecimal goodsPrice;
+
+    /**
+     * 下载链接
+     */
+    private String download;
+
+}

+ 9 - 0
crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/goods/GoldenGoodsDeleteEntitys.java

@@ -0,0 +1,9 @@
+package com.crm.rely.backend.model.entity.golden.goods;
+
+import com.crm.rely.backend.core.entity.base.BaseDeleteEntities;
+import lombok.Data;
+
+@Data
+public class GoldenGoodsDeleteEntitys extends BaseDeleteEntities {
+
+}

+ 23 - 0
crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/goods/GoldenGoodsSearchEntity.java

@@ -0,0 +1,23 @@
+package com.crm.rely.backend.model.entity.golden.goods;
+
+import com.crm.rely.backend.core.entity.base.BaseSearchPageEntity;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class GoldenGoodsSearchEntity extends BaseSearchPageEntity {
+
+    /**
+     * 名称
+     */
+    private String goodsName;
+
+    /**
+     * 类型 1:免费试看课程 2:实战交易课程(50节) 3:拆出章节视频*12节 4:章节视频 5:专题报告
+     */
+    private Integer goodsType;
+
+    private Long customId;
+
+}

+ 53 - 0
crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/goods/GoldenGoodsUpdateEntity.java

@@ -0,0 +1,53 @@
+package com.crm.rely.backend.model.entity.golden.goods;
+
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.entity.base.BaseUpdateEntity;
+import lombok.Data;
+import org.hibernate.validator.constraints.NotEmpty;
+
+import javax.validation.constraints.NotNull;
+import java.math.BigDecimal;
+
+@Data
+public class GoldenGoodsUpdateEntity extends BaseUpdateEntity {
+
+    /**
+     * 名称
+     */
+    @NotNull(message = Constants.NAME_NOT_NULL)
+    @NotEmpty(message = Constants.NAME_NOT_NULL)
+    private String goodsName;
+
+    /**
+     * 标题
+     */
+    @NotNull(message = Constants.PARAMETER_ERROR)
+    @NotEmpty(message = Constants.PARAMETER_ERROR)
+    private String title;
+
+    /**
+     * 简介
+     */
+    private String introduction;
+
+    /**
+     * 封面
+     */
+    private String frontUrl;
+
+    /**
+     * 类型 1:免费试看课程 2:实战交易课程(50节) 3:拆出章节视频*12节 4:章节视频 5:专题报告
+     */
+    private Integer goodsType;
+
+    /**
+     * 价格
+     */
+    private BigDecimal goodsPrice;
+
+    /**
+     * 下载链接
+     */
+    private String download;
+
+}

+ 64 - 0
crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/goods/GoldenGoodsVideoAddEntity.java

@@ -0,0 +1,64 @@
+package com.crm.rely.backend.model.entity.golden.goods;
+
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.entity.base.BaseAddEntity;
+import lombok.Data;
+import org.hibernate.validator.constraints.NotEmpty;
+
+import javax.validation.constraints.NotNull;
+import java.math.BigDecimal;
+
+@Data
+public class GoldenGoodsVideoAddEntity extends BaseAddEntity {
+
+    @NotNull(message = Constants.PARAMETER_ERROR)
+    private Long goodsId;
+
+    /**
+     * 名称
+     */
+    @NotNull(message = Constants.NAME_NOT_NULL)
+    @NotEmpty(message = Constants.NAME_NOT_NULL)
+    private String videoName;
+
+    /**
+     * 标题
+     */
+    private String title;
+
+    /**
+     * 简介
+     */
+    private String introduction;
+
+    /**
+     * 封面
+     */
+    private String frontUrl;
+
+    /**
+     * 是否收费 0:否 1:是
+     */
+    private Integer payType;
+
+    /**
+     * 1:上传视频 2:外部连接
+     */
+    private Integer fileType;
+
+    /**
+     *
+     */
+    private String fileUrl;
+
+    /**
+     * 外部连接
+     */
+    private String linkUrl;
+
+    /**
+     * 排序
+     */
+    private Integer sort;
+
+}

+ 9 - 0
crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/goods/GoldenGoodsVideoDeleteEntitys.java

@@ -0,0 +1,9 @@
+package com.crm.rely.backend.model.entity.golden.goods;
+
+import com.crm.rely.backend.core.entity.base.BaseDeleteEntities;
+import lombok.Data;
+
+@Data
+public class GoldenGoodsVideoDeleteEntitys extends BaseDeleteEntities {
+
+}

+ 15 - 0
crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/goods/GoldenGoodsVideoSearchEntity.java

@@ -0,0 +1,15 @@
+package com.crm.rely.backend.model.entity.golden.goods;
+
+import com.crm.rely.backend.core.entity.base.BaseSearchPageEntity;
+import lombok.Data;
+
+@Data
+public class GoldenGoodsVideoSearchEntity extends BaseSearchPageEntity {
+
+    private Long goodsId;
+
+    private String videoName;
+
+    private Long customId;
+
+}

+ 64 - 0
crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/goods/GoldenGoodsVideoUpdateEntity.java

@@ -0,0 +1,64 @@
+package com.crm.rely.backend.model.entity.golden.goods;
+
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.entity.base.BaseUpdateEntity;
+import lombok.Data;
+import org.hibernate.validator.constraints.NotEmpty;
+
+import javax.validation.constraints.NotNull;
+import java.math.BigDecimal;
+
+@Data
+public class GoldenGoodsVideoUpdateEntity extends BaseUpdateEntity {
+
+    @NotNull(message = Constants.PARAMETER_ERROR)
+    private Long goodsId;
+
+    /**
+     * 名称
+     */
+    @NotNull(message = Constants.NAME_NOT_NULL)
+    @NotEmpty(message = Constants.NAME_NOT_NULL)
+    private String videoName;
+
+    /**
+     * 标题
+     */
+    private String title;
+
+    /**
+     * 简介
+     */
+    private String introduction;
+
+    /**
+     * 封面
+     */
+    private String frontUrl;
+
+    /**
+     * 是否收费 0:否 1:是
+     */
+    private Integer payType;
+
+    /**
+     * 1:上传视频 2:外部连接
+     */
+    private Integer fileType;
+
+    /**
+     *
+     */
+    private String fileUrl;
+
+    /**
+     * 外部连接
+     */
+    private String linkUrl;
+
+    /**
+     * 排序
+     */
+    private Integer sort;
+
+}

+ 27 - 0
crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/question/GoldenCommonQuestionAddEntity.java

@@ -0,0 +1,27 @@
+package com.crm.rely.backend.model.entity.golden.question;
+
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.entity.base.BaseAddEntity;
+import lombok.Data;
+import org.hibernate.validator.constraints.NotEmpty;
+
+import javax.validation.constraints.NotNull;
+
+@Data
+public class GoldenCommonQuestionAddEntity extends BaseAddEntity {
+
+    /**
+     * 问题
+     */
+    @NotNull(message = Constants.PARAMETER_ERROR)
+    @NotEmpty(message = Constants.PARAMETER_ERROR)
+    private String question;
+
+    /**
+     * 答案
+     */
+    @NotNull(message = Constants.PARAMETER_ERROR)
+    @NotEmpty(message = Constants.PARAMETER_ERROR)
+    private String answer;
+
+}

+ 9 - 0
crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/question/GoldenCommonQuestionDeleteEntitys.java

@@ -0,0 +1,9 @@
+package com.crm.rely.backend.model.entity.golden.question;
+
+import com.crm.rely.backend.core.entity.base.BaseDeleteEntities;
+import lombok.Data;
+
+@Data
+public class GoldenCommonQuestionDeleteEntitys extends BaseDeleteEntities {
+
+}

+ 11 - 0
crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/question/GoldenCommonQuestionSearchEntity.java

@@ -0,0 +1,11 @@
+package com.crm.rely.backend.model.entity.golden.question;
+
+import com.crm.rely.backend.core.entity.base.BaseSearchPageEntity;
+import lombok.Data;
+
+@Data
+public class GoldenCommonQuestionSearchEntity extends BaseSearchPageEntity {
+
+    private String question;
+
+}

+ 27 - 0
crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/question/GoldenCommonQuestionUpdateEntity.java

@@ -0,0 +1,27 @@
+package com.crm.rely.backend.model.entity.golden.question;
+
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.entity.base.BaseUpdateEntity;
+import lombok.Data;
+import org.hibernate.validator.constraints.NotEmpty;
+
+import javax.validation.constraints.NotNull;
+
+@Data
+public class GoldenCommonQuestionUpdateEntity extends BaseUpdateEntity {
+
+    /**
+     * 问题
+     */
+    @NotNull(message = Constants.PARAMETER_ERROR)
+    @NotEmpty(message = Constants.PARAMETER_ERROR)
+    private String question;
+
+    /**
+     * 答案
+     */
+    @NotNull(message = Constants.PARAMETER_ERROR)
+    @NotEmpty(message = Constants.PARAMETER_ERROR)
+    private String answer;
+
+}

+ 26 - 0
crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/question/GoldenRewardQuestionAddEntity.java

@@ -0,0 +1,26 @@
+package com.crm.rely.backend.model.entity.golden.question;
+
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.entity.base.BaseAddEntity;
+import lombok.Data;
+import org.hibernate.validator.constraints.NotEmpty;
+
+import javax.validation.constraints.NotNull;
+
+@Data
+public class GoldenRewardQuestionAddEntity extends BaseAddEntity {
+
+    /**
+     * 问题
+     */
+    @NotNull(message = Constants.PARAMETER_ERROR)
+    @NotEmpty(message = Constants.PARAMETER_ERROR)
+    private String question;
+
+    /**
+     * 答案 0:错 1:对
+     */
+    @NotNull(message = Constants.PARAMETER_ERROR)
+    private Integer answer;
+
+}

+ 9 - 0
crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/question/GoldenRewardQuestionDeleteEntitys.java

@@ -0,0 +1,9 @@
+package com.crm.rely.backend.model.entity.golden.question;
+
+import com.crm.rely.backend.core.entity.base.BaseDeleteEntities;
+import lombok.Data;
+
+@Data
+public class GoldenRewardQuestionDeleteEntitys extends BaseDeleteEntities {
+
+}

+ 11 - 0
crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/question/GoldenRewardQuestionSearchEntity.java

@@ -0,0 +1,11 @@
+package com.crm.rely.backend.model.entity.golden.question;
+
+import com.crm.rely.backend.core.entity.base.BaseSearchPageEntity;
+import lombok.Data;
+
+@Data
+public class GoldenRewardQuestionSearchEntity extends BaseSearchPageEntity {
+
+    private String question;
+
+}

+ 26 - 0
crm-model/src/main/java/com/crm/rely/backend/model/entity/golden/question/GoldenRewardQuestionUpdateEntity.java

@@ -0,0 +1,26 @@
+package com.crm.rely.backend.model.entity.golden.question;
+
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.entity.base.BaseUpdateEntity;
+import lombok.Data;
+import org.hibernate.validator.constraints.NotEmpty;
+
+import javax.validation.constraints.NotNull;
+
+@Data
+public class GoldenRewardQuestionUpdateEntity extends BaseUpdateEntity {
+
+    /**
+     * 问题
+     */
+    @NotNull(message = Constants.PARAMETER_ERROR)
+    @NotEmpty(message = Constants.PARAMETER_ERROR)
+    private String question;
+
+    /**
+     * 答案 0:错 1:对
+     */
+    @NotNull(message = Constants.PARAMETER_ERROR)
+    private Integer answer;
+
+}

+ 24 - 0
crm-model/src/main/java/com/crm/rely/backend/model/pojo/table/GoldenCommonQuestionTable.java

@@ -0,0 +1,24 @@
+package com.crm.rely.backend.model.pojo.table;
+
+import com.crm.rely.backend.core.pojo.BaseTable;
+import lombok.Data;
+
+import javax.persistence.Entity;
+import javax.persistence.Table;
+
+@Data
+@Entity
+@Table(name = "golden_common_question")
+public class GoldenCommonQuestionTable extends BaseTable {
+
+    /**
+     * 问题
+     */
+    private String question;
+
+    /**
+     * 答案
+     */
+    private String answer;
+
+}

+ 50 - 0
crm-model/src/main/java/com/crm/rely/backend/model/pojo/table/GoldenGoodsTable.java

@@ -0,0 +1,50 @@
+package com.crm.rely.backend.model.pojo.table;
+
+import com.crm.rely.backend.core.pojo.BaseTable;
+import lombok.Data;
+
+import javax.persistence.Entity;
+import javax.persistence.Table;
+import java.math.BigDecimal;
+
+@Data
+@Entity
+@Table(name = "golden_goods")
+public class GoldenGoodsTable extends BaseTable {
+
+    /**
+     * 名称
+     */
+    private String goodsName;
+
+    /**
+     * 标题
+     */
+    private String title;
+
+    /**
+     * 简介
+     */
+    private String introduction;
+
+    /**
+     * 封面
+     */
+    private String frontUrl;
+
+    /**
+     * 类型 1:免费试看课程 2:实战交易课程(50节) 3:拆出章节视频*12节 4:章节视频 5:专题报告
+     */
+    private Integer goodsType;
+
+    /**
+     * 价格
+     */
+    private BigDecimal goodsPrice;
+
+    /**
+     * 下载链接
+     */
+    private String download;
+
+}

+ 62 - 0
crm-model/src/main/java/com/crm/rely/backend/model/pojo/table/GoldenGoodsVideoTable.java

@@ -0,0 +1,62 @@
+package com.crm.rely.backend.model.pojo.table;
+
+import com.crm.rely.backend.core.pojo.BaseTable;
+import lombok.Data;
+
+import javax.persistence.Entity;
+import javax.persistence.Table;
+import java.math.BigDecimal;
+
+@Data
+@Entity
+@Table(name = "golden_goods_video")
+public class GoldenGoodsVideoTable extends BaseTable {
+
+    private Long goodsId;
+
+    /**
+     * 名称
+     */
+    private String videoName;
+
+    /**
+     * 标题
+     */
+    private String title;
+
+    /**
+     * 封面
+     */
+    private String frontUrl;
+
+    /**
+     * 简介
+     */
+    private String introduction;
+
+    /**
+     * 是否收费 0:否 1:是
+     */
+    private Integer payType;
+
+    /**
+     * 1:上传视频 2:外部连接
+     */
+    private Integer fileType;
+
+    /**
+     *
+     */
+    private String fileUrl;
+
+    /**
+     * 外部连接
+     */
+    private String linkUrl;
+
+    /**
+     * 排序
+     */
+    private Integer sort;
+
+}

+ 25 - 0
crm-model/src/main/java/com/crm/rely/backend/model/pojo/table/GoldenRewardQuestionTable.java

@@ -0,0 +1,25 @@
+package com.crm.rely.backend.model.pojo.table;
+
+import com.crm.rely.backend.core.pojo.BaseTable;
+import lombok.Data;
+
+import javax.persistence.Entity;
+import javax.persistence.Table;
+import java.math.BigDecimal;
+
+@Data
+@Entity
+@Table(name = "golden_reward_question")
+public class GoldenRewardQuestionTable extends BaseTable {
+
+    /**
+     * 问题
+     */
+    private String question;
+
+    /**
+     * 答案 0:错 1:对
+     */
+    private Integer answer;
+
+}

+ 52 - 0
crm-model/src/main/java/com/crm/rely/backend/model/pojo/view/GoldenGoodsListView.java

@@ -0,0 +1,52 @@
+package com.crm.rely.backend.model.pojo.view;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+public class GoldenGoodsListView {
+
+    private Long id;
+
+    /**
+     * 名称
+     */
+    private String goodsName;
+
+    /**
+     * 标题
+     */
+    private String title;
+
+    /**
+     * 简介
+     */
+    private String introduction;
+
+    /**
+     * 封面
+     */
+    private String frontUrl;
+
+    /**
+     * 类型 1:免费试看课程 2:实战交易课程(50节) 3:拆出章节视频*12节 4:章节视频 5:专题报告
+     */
+    private Integer goodsType;
+
+    /**
+     * 价格
+     */
+    private BigDecimal goodsPrice;
+
+    /**
+     * 下载链接
+     */
+    private String download;
+
+    private Date addTime;
+
+    private Long customId;
+
+}

+ 58 - 0
crm-model/src/main/java/com/crm/rely/backend/model/pojo/view/GoldenGoodsVideoListView.java

@@ -0,0 +1,58 @@
+package com.crm.rely.backend.model.pojo.view;
+
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class GoldenGoodsVideoListView {
+
+    private Long id;
+
+    private Long goodsId;
+
+    /**
+     * 名称
+     */
+    private String videoName;
+
+    /**
+     * 标题
+     */
+    private String title;
+
+    /**
+     * 封面
+     */
+    private String frontUrl;
+
+    /**
+     * 是否收费 0:否 1:是
+     */
+    private Integer payType;
+
+    /**
+     * 1:上传视频 2:外部连接
+     */
+    private Integer fileType;
+
+    /**
+     *
+     */
+    private String fileUrl;
+
+    /**
+     * 外部连接
+     */
+    private String linkUrl;
+
+    /**
+     * 排序
+     */
+    private Integer sort;
+
+    private Date addTime;
+
+    private Long customId;
+
+}