Browse Source

Merge branch 'dev_guidance' into develop

master
zhaoqifeng 4 years ago
parent
commit
17cd89355a
  1. 9
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideModuleController.java
  2. 9
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideModuleService.java
  3. 19
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideModuleServiceImpl.java

9
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideModuleController.java

@ -17,7 +17,9 @@
package com.epmet.controller; package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.ValidatorUtils;
@ -25,10 +27,12 @@ import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.GuideModuleDTO; import com.epmet.dto.GuideModuleDTO;
import com.epmet.dto.ModuleDTO;
import com.epmet.service.GuideModuleService; import com.epmet.service.GuideModuleService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map; import java.util.Map;
@ -81,4 +85,9 @@ public class GuideModuleController {
return new Result(); return new Result();
} }
@PostMapping()
public Result<List<ModuleDTO>> getModuleList(@LoginUser TokenDto tokenDto) {
return new Result<List<ModuleDTO>>().ok(guideModuleService.getModuleList(tokenDto.getCustomerId()));
}
} }

9
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideModuleService.java

@ -112,4 +112,13 @@ public interface GuideModuleService extends BaseService<GuideModuleEntity> {
* @Date 2021/9/8 10:13 * @Date 2021/9/8 10:13
*/ */
List<ModuleDTO> getByGuideId(String customerId, String guideId); List<ModuleDTO> getByGuideId(String customerId, String guideId);
/**
* @Description 获取模块列表
* @Param customerId
* @Return {@link List< ModuleDTO>}
* @Author zhaoqifeng
* @Date 2021/9/9 14:46
*/
List<ModuleDTO> getModuleList(String customerId);
} }

19
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideModuleServiceImpl.java

@ -28,14 +28,14 @@ import com.epmet.dao.GuideModuleDao;
import com.epmet.dto.GuideModuleDTO; import com.epmet.dto.GuideModuleDTO;
import com.epmet.dto.ModuleDTO; import com.epmet.dto.ModuleDTO;
import com.epmet.entity.GuideModuleEntity; import com.epmet.entity.GuideModuleEntity;
import com.epmet.service.GuideModuleDictService;
import com.epmet.service.GuideModuleService; import com.epmet.service.GuideModuleService;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -48,6 +48,8 @@ import java.util.Map;
@Service @Service
public class GuideModuleServiceImpl extends BaseServiceImpl<GuideModuleDao, GuideModuleEntity> implements GuideModuleService { public class GuideModuleServiceImpl extends BaseServiceImpl<GuideModuleDao, GuideModuleEntity> implements GuideModuleService {
@Resource
private GuideModuleDictService guideModuleDictService;
@Override @Override
public PageData<GuideModuleDTO> page(Map<String, Object> params) { public PageData<GuideModuleDTO> page(Map<String, Object> params) {
@ -129,4 +131,17 @@ public class GuideModuleServiceImpl extends BaseServiceImpl<GuideModuleDao, Guid
return baseDao.selectByGuideId(customerId, guideId); return baseDao.selectByGuideId(customerId, guideId);
} }
/**
* @param customerId
* @Description 获取模块列表
* @Param customerId
* @Return {@link List< ModuleDTO>}
* @Author zhaoqifeng
* @Date 2021/9/9 14:46
*/
@Override
public List<ModuleDTO> getModuleList(String customerId) {
return guideModuleDictService.getModuleList(customerId);
}
} }
Loading…
Cancel
Save