Browse Source

公众号页面相关接口

master
qushutong 1 year ago
parent
commit
5e36c6690c
  1. 26
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/ScreenEnterpriseOutputController.java
  2. 2
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/ScreenEnterpriseOutputService.java
  3. 16
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/ScreenEnterpriseOutputServiceImpl.java

26
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/ScreenEnterpriseOutputController.java

@ -24,12 +24,14 @@ import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.modules.partymember.entity.ScreenEnterpriseOutputEntity;
import com.epmet.modules.partymember.service.ScreenEnterpriseOutputService;
import com.epmet.resi.partymember.dto.ScreenEnterpriseOutputDTO;
import com.epmet.resi.partymember.dto.partymember.form.vegetableFormDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
@ -47,37 +49,42 @@ public class ScreenEnterpriseOutputController {
private ScreenEnterpriseOutputService screenEnterpriseOutputService;
@GetMapping("page")
public Result<PageData<ScreenEnterpriseOutputDTO>> page(@RequestParam Map<String, Object> params){
public Result<PageData<ScreenEnterpriseOutputDTO>> page(@RequestParam Map<String, Object> params) {
PageData<ScreenEnterpriseOutputDTO> page = screenEnterpriseOutputService.page(params);
return new Result<PageData<ScreenEnterpriseOutputDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<ScreenEnterpriseOutputDTO> get(@PathVariable("id") String id){
public Result<ScreenEnterpriseOutputDTO> get(@PathVariable("id") String id) {
ScreenEnterpriseOutputDTO data = screenEnterpriseOutputService.get(id);
return new Result<ScreenEnterpriseOutputDTO>().ok(data);
}
/**
*
* @param
* @return com.epmet.commons.tools.utils.Result
* @description: 上报
* @author qushutong
* @date 2024/3/22 14:52
* @param
* @return com.epmet.commons.tools.utils.Result
* @Version1.0
**/
@PostMapping("yifengScreen/submitOutput")
public Result submitOutput(@RequestBody vegetableFormDTO dto){
public Result submitOutput(@RequestBody vegetableFormDTO dto) {
//效验数据
// ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
screenEnterpriseOutputService.submitOutput(dto);
return new Result();
}
@GetMapping("yifengScreen/getVegetableByEnterprise/{placeOrgName}")
public Result<List<ScreenEnterpriseOutputEntity>> getVegetableByEnterprise(@PathVariable("placeOrgName") String placeOrgName) {
return new Result<List<ScreenEnterpriseOutputEntity>>().ok(screenEnterpriseOutputService.getListVegetable(placeOrgName));
}
@PutMapping
public Result update(@RequestBody ScreenEnterpriseOutputDTO dto){
public Result update(@RequestBody ScreenEnterpriseOutputDTO dto) {
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
screenEnterpriseOutputService.update(dto);
@ -85,7 +92,7 @@ public class ScreenEnterpriseOutputController {
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
public Result delete(@RequestBody String[] ids) {
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
screenEnterpriseOutputService.delete(ids);
@ -94,11 +101,12 @@ public class ScreenEnterpriseOutputController {
@PostMapping
public Result save(@RequestBody ScreenEnterpriseOutputDTO dto){
public Result save(@RequestBody ScreenEnterpriseOutputDTO dto) {
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
screenEnterpriseOutputService.save(dto);
return new Result();
}
}

2
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/ScreenEnterpriseOutputService.java

@ -96,4 +96,6 @@ public interface ScreenEnterpriseOutputService extends BaseService<ScreenEnterpr
void delete(String[] ids);
Result submitOutput(vegetableFormDTO dto);
List<ScreenEnterpriseOutputEntity> getListVegetable(String placeOrgName);
}

16
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/ScreenEnterpriseOutputServiceImpl.java

@ -65,8 +65,8 @@ public class ScreenEnterpriseOutputServiceImpl extends BaseServiceImpl<ScreenEnt
return ConvertUtils.sourceToTarget(entityList, ScreenEnterpriseOutputDTO.class);
}
private QueryWrapper<ScreenEnterpriseOutputEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
private QueryWrapper<ScreenEnterpriseOutputEntity> getWrapper(Map<String, Object> params) {
String id = (String) params.get(FieldConstant.ID_HUMP);
QueryWrapper<ScreenEnterpriseOutputEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
@ -105,7 +105,7 @@ public class ScreenEnterpriseOutputServiceImpl extends BaseServiceImpl<ScreenEnt
public Result submitOutput(vegetableFormDTO dto) {
String placeOrgName = dto.getVegetableList().get(0).getPlaceOrgName();
Map map = new HashMap();
map.put("PLACE_ORG_NAME",placeOrgName);
map.put("PLACE_ORG_NAME", placeOrgName);
baseDao.deleteByMap(map);
List<vegetableFormDTO.VegetableListEntity> vegetableList = dto.getVegetableList();
List<ScreenEnterpriseOutputEntity> screenEnterpriseOutputEntities = ConvertUtils.sourceToTarget(vegetableList, ScreenEnterpriseOutputEntity.class);
@ -113,4 +113,14 @@ public class ScreenEnterpriseOutputServiceImpl extends BaseServiceImpl<ScreenEnt
return new Result();
}
@Override
public List<ScreenEnterpriseOutputEntity> getListVegetable(String placeOrgName) {
Map map = new HashMap();
map.put("DEL_FLAG", "0");
map.put("PLACE_ORG_NAME", placeOrgName);
List<ScreenEnterpriseOutputEntity> entityList = baseDao.selectByMap(map);
return entityList;
}
}
Loading…
Cancel
Save