Browse Source

建议-resi模块修改

master
liushaowen 5 years ago
parent
commit
2dd3615dee
  1. 10
      epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/from/MyAdviceListFormDTO.java
  2. 13
      epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/from/SubmitAdviceFormDTO.java
  3. 15
      epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/advice/controller/AdviceController.java
  4. 7
      epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/advice/service/AdviceService.java
  5. 14
      epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/advice/service/impl/AdviceServiceImpl.java
  6. 23
      epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java

10
epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/from/MyAdviceListFormDTO.java

@ -1,10 +0,0 @@
package com.epmet.resi.mine.dto.from;
/**
* @description: 我的建议列表DTO
* @author: liushaowen
* @date: 2020/11/5 10:38
*/
public class MyAdviceListFormDTO {
}

13
epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/from/SubmitAdviceFormDTO.java

@ -1,13 +0,0 @@
package com.epmet.resi.mine.dto.from;
import lombok.Data;
/**
* @description: 提交建议DTO
* @author: liushaowen
* @date: 2020/11/5 10:35
*/
@Data
public class SubmitAdviceFormDTO {
}

15
epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/advice/controller/AdviceController.java

@ -3,14 +3,16 @@ package com.epmet.modules.advice.controller;
import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.SubmitAdviceFormDTO;
import com.epmet.modules.advice.service.AdviceService;
import com.epmet.resi.mine.dto.from.MyAdviceListFormDTO;
import com.epmet.resi.mine.dto.from.SubmitAdviceFormDTO;
import org.springframework.beans.factory.annotation.Autowired;
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;
import java.util.Map;
/**
* @description: 用户建议controller
* @author: liushaowen
@ -33,21 +35,20 @@ public class AdviceController {
* @Date 2020/11/5 10:37
*/
@PostMapping("submitadvice")
public Result submitAdvice(SubmitAdviceFormDTO dto){
public Result submitAdvice(@RequestBody SubmitAdviceFormDTO dto){
ValidatorUtils.validateEntity(dto);
return adviceService.submitAdvice(dto);
}
/**
* @Description 我的建议列表
* @param dto
* @param map
* @return com.epmet.commons.tools.utils.Result
* @Author liushaowen
* @Date 2020/11/5 13:26
*/
@PostMapping("myadvicelist")
public Result getMyAdviceList(MyAdviceListFormDTO dto){
ValidatorUtils.validateEntity(dto);
return adviceService.getMyAdviceList(dto);
public Result getMyAdviceList(@RequestBody Map<String,Integer> map){
return adviceService.getMyAdviceList(map);
}
}

7
epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/advice/service/AdviceService.java

@ -1,11 +1,12 @@
package com.epmet.modules.advice.service;
import com.epmet.commons.tools.utils.Result;
import com.epmet.resi.mine.dto.from.MyAdviceListFormDTO;
import com.epmet.resi.mine.dto.from.SubmitAdviceFormDTO;
import com.epmet.dto.form.SubmitAdviceFormDTO;
import java.util.Map;
public interface AdviceService {
Result submitAdvice(SubmitAdviceFormDTO dto);
Result getMyAdviceList(MyAdviceListFormDTO dto);
Result getMyAdviceList(Map<String,Integer> map);
}

14
epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/advice/service/impl/AdviceServiceImpl.java

@ -1,13 +1,15 @@
package com.epmet.modules.advice.service.impl;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.SubmitAdviceFormDTO;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.modules.advice.service.AdviceService;
import com.epmet.resi.mine.dto.from.MyAdviceListFormDTO;
import com.epmet.resi.mine.dto.from.SubmitAdviceFormDTO;
import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* @description:
* @author: liushaowen
@ -24,18 +26,18 @@ public class AdviceServiceImpl implements AdviceService {
*/
@Override
public Result submitAdvice(SubmitAdviceFormDTO dto) {
return null;
return epmetUserOpenFeignClient.submitAdvice(dto);
}
/**
* @Description 我的建议列表
* @param dto
* @param map
* @return com.epmet.commons.tools.utils.Result
* @Author liushaowen
* @Date 2020/11/5 10:40
*/
@Override
public Result getMyAdviceList(MyAdviceListFormDTO dto) {
return null;
public Result getMyAdviceList(Map<String, Integer> map) {
return epmetUserOpenFeignClient.myAdviceList(map);
}
}

23
epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java

@ -13,6 +13,7 @@ import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
* 本服务对外开放的API,其他服务通过引用此client调用该服务
@ -50,7 +51,7 @@ public interface EpmetUserOpenFeignClient {
* @date 2020/6/2 16:11
*/
@PostMapping("/epmetuser/staffrole/staffroles/{staffId}")
Result<List<CustomerStaffRoleResultDTO>> getStaffRoles(@PathVariable String staffId);
Result<List<CustomerStaffRoleResultDTO>> getStaffRoles(@PathVariable("staffId") String staffId);
/**
* @param staffId
@ -380,4 +381,24 @@ public interface EpmetUserOpenFeignClient {
*/
@PostMapping("/epmetuser/customerstaff/getstaffbasicinfo")
Result<BasicInfoResultDTO> getStaffBasicInfo(@RequestBody StaffBasicInfoFromDTO fromDTO);
/**
* @Description 个人中心-我的建议列表
* @param map pageSize,pageNo
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.MyAdviceListResultDTO>
* @Author liushaowen
* @Date 2020/11/11 10:35
*/
@PostMapping("/epmetuser/useradvice/myadvicelist")
Result<MyAdviceListResultDTO> myAdviceList(@RequestBody Map<String,Integer> map);
/**
* @Description 个人中心-提交建议
* @param dto
* @return com.epmet.commons.tools.utils.Result
* @Author liushaowen
* @Date 2020/11/11 10:36
*/
@PostMapping("/epmetuser/useradvice/submitadvice")
Result submitAdvice(@RequestBody SubmitAdviceFormDTO dto);
}

Loading…
Cancel
Save