diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/ScreenEnterpriseOutputDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/ScreenEnterpriseOutputDTO.java new file mode 100644 index 0000000000..f2eb5838a1 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/ScreenEnterpriseOutputDTO.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.resi.partymember.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 用于上报蔬菜的企业 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2024-03-22 + */ +@Data +public class ScreenEnterpriseOutputDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 蔬菜类别: + */ + private String vegetableCategory; + + /** + * 企业名称 + */ + private String placeOrgName; + + /** + * 产量 + */ + private String output; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 种植时间 + */ + private Date growTime; + + /** + * 上市时间 + */ + private Date marketTime; + +} \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/vegetableFormDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/vegetableFormDTO.java new file mode 100644 index 0000000000..5894e66ed9 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/vegetableFormDTO.java @@ -0,0 +1,44 @@ +package com.epmet.resi.partymember.dto.partymember.form; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + +/** + * + * @description: 企业上报蔬菜 + * @author qushutong + * @date 2024/3/22 15:08 + * @param + * @return + * @Version1.0 + **/ +@Data +public class vegetableFormDTO implements Serializable { + + private static final long serialVersionUID = 7719236439989973549L; + /** + * vegetableList : [{"output":"产量","placeOrgName":"企业名称","vegetableCategory":"白菜","growTime":"2020-01-02 09:27:06","marketTime":"2020-01-02 09:27:06"},{"output":"产量","placeOrgName":"企业名称","vegetableCategory":"小白菜","growTime":"2020-01-02 09:27:06","marketTime":"2020-01-02 09:27:06"}] + */ + private List vegetableList; + + @Data + public static class VegetableListEntity { + + public VegetableListEntity(){} + /** + * output : 产量 + * placeOrgName : 企业名称 + * vegetableCategory : 白菜 + * growTime : 2020-01-02 09:27:06 + * marketTime : 2020-01-02 09:27:06 + */ + private String output; + private String placeOrgName; + private String vegetableCategory; + private Date growTime; + private Date marketTime; + } +} diff --git a/epmet-module/resi-partymember/resi-partymember-server/pom.xml b/epmet-module/resi-partymember/resi-partymember-server/pom.xml index f09932e0a4..7a40e8628c 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/pom.xml +++ b/epmet-module/resi-partymember/resi-partymember-server/pom.xml @@ -182,8 +182,8 @@ - epmet - EpmEt_yfz@@ + root + root 0 192.168.1.140 @@ -236,8 +236,8 @@ - epmet - EpmEt_yfz@@ + root + root 0 192.168.1.140 diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/ScreenEnterpriseOutputController.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/ScreenEnterpriseOutputController.java new file mode 100644 index 0000000000..c0ca9f9d8d --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/ScreenEnterpriseOutputController.java @@ -0,0 +1,104 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.partymember.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +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.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.Map; + + +/** + * 用于上报蔬菜的企业 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2024-03-22 + */ +@RestController +@RequestMapping("screenenterpriseoutput") +public class ScreenEnterpriseOutputController { + + @Autowired + private ScreenEnterpriseOutputService screenEnterpriseOutputService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = screenEnterpriseOutputService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + ScreenEnterpriseOutputDTO data = screenEnterpriseOutputService.get(id); + return new Result().ok(data); + } + + + /** + * + * @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){ + //效验数据 +// ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + screenEnterpriseOutputService.submitOutput(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody ScreenEnterpriseOutputDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + screenEnterpriseOutputService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + screenEnterpriseOutputService.delete(ids); + return new Result(); + } + + + @PostMapping + public Result save(@RequestBody ScreenEnterpriseOutputDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + screenEnterpriseOutputService.save(dto); + return new Result(); + } + +} \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/ScreenReportEnterpriseController.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/ScreenReportEnterpriseController.java index 450545df14..ce251c2f70 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/ScreenReportEnterpriseController.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/ScreenReportEnterpriseController.java @@ -42,24 +42,24 @@ import java.util.Map; @RestController @RequestMapping("screenreportenterprise") public class ScreenReportEnterpriseController { - + @Autowired private ScreenReportEnterpriseService screenReportEnterpriseService; @GetMapping("page") - public Result> page(@RequestParam Map params){ + public Result> page(@RequestParam Map params) { PageData page = screenReportEnterpriseService.page(params); return new Result>().ok(page); } @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ + public Result get(@PathVariable("id") String id) { ScreenReportEnterpriseDTO data = screenReportEnterpriseService.get(id); return new Result().ok(data); } @PostMapping - public Result save(@RequestBody ScreenReportEnterpriseDTO dto){ + public Result save(@RequestBody ScreenReportEnterpriseDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); screenReportEnterpriseService.save(dto); @@ -67,7 +67,7 @@ public class ScreenReportEnterpriseController { } @PutMapping - public Result update(@RequestBody ScreenReportEnterpriseDTO dto){ + public Result update(@RequestBody ScreenReportEnterpriseDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); screenReportEnterpriseService.update(dto); @@ -75,12 +75,24 @@ public class ScreenReportEnterpriseController { } @DeleteMapping - public Result delete(@RequestBody String[] ids){ + public Result delete(@RequestBody String[] ids) { //效验数据 AssertUtils.isArrayEmpty(ids, "id"); screenReportEnterpriseService.delete(ids); return new Result(); } + /** + * @param + * @return com.epmet.commons.tools.utils.Result + * @description: 企业登录 + * @author qushutong + * @date 2024/3/22 10:46 + * @Version1.0 + **/ + @PostMapping("yifengScreen/login") + public Result login(@RequestBody ScreenReportEnterpriseDTO formDto) { + return screenReportEnterpriseService.login(formDto); + } } \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/ScreenEnterpriseOutputDao.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/ScreenEnterpriseOutputDao.java new file mode 100644 index 0000000000..99946a4bb2 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/ScreenEnterpriseOutputDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.partymember.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.modules.partymember.entity.ScreenEnterpriseOutputEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 用于上报蔬菜的企业 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2024-03-22 + */ +@Mapper +public interface ScreenEnterpriseOutputDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/ScreenEnterpriseOutputEntity.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/ScreenEnterpriseOutputEntity.java new file mode 100644 index 0000000000..db9747637e --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/ScreenEnterpriseOutputEntity.java @@ -0,0 +1,66 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.partymember.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 用于上报蔬菜的企业 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2024-03-22 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_enterprise_output") +public class ScreenEnterpriseOutputEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 蔬菜类别: + */ + private String vegetableCategory; + + /** + * 企业名称 + */ + private String placeOrgName; + + /** + * 产量 + */ + private String output; + + /** + * 种植时间 + */ + private Date growTime; + + /** + * 上市时间 + */ + private Date marketTime; + +} \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/ScreenEnterpriseOutputService.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/ScreenEnterpriseOutputService.java new file mode 100644 index 0000000000..a304c022a6 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/ScreenEnterpriseOutputService.java @@ -0,0 +1,99 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.partymember.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.Result; +import com.epmet.modules.partymember.entity.ScreenEnterpriseOutputEntity; +import com.epmet.resi.partymember.dto.ScreenEnterpriseOutputDTO; +import com.epmet.resi.partymember.dto.partymember.form.vegetableFormDTO; + +import java.util.List; +import java.util.Map; + +/** + * 用于上报蔬菜的企业 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2024-03-22 + */ +public interface ScreenEnterpriseOutputService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2024-03-22 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2024-03-22 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ScreenEnterpriseOutputDTO + * @author generator + * @date 2024-03-22 + */ + ScreenEnterpriseOutputDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2024-03-22 + */ + void save(ScreenEnterpriseOutputDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2024-03-22 + */ + void update(ScreenEnterpriseOutputDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2024-03-22 + */ + void delete(String[] ids); + + Result submitOutput(vegetableFormDTO dto); +} \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/ScreenReportEnterpriseService.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/ScreenReportEnterpriseService.java index fe42f56453..11763e7199 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/ScreenReportEnterpriseService.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/ScreenReportEnterpriseService.java @@ -20,6 +20,7 @@ package com.epmet.modules.partymember.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.Result; import com.epmet.modules.partymember.entity.ScreenReportEnterpriseEntity; import com.epmet.resi.partymember.dto.ScreenReportEnterpriseDTO; @@ -93,4 +94,7 @@ public interface ScreenReportEnterpriseService extends BaseService + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.partymember.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.modules.partymember.dao.ScreenEnterpriseOutputDao; +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.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 用于上报蔬菜的企业 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2024-03-22 + */ +@Service +public class ScreenEnterpriseOutputServiceImpl extends BaseServiceImpl implements ScreenEnterpriseOutputService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ScreenEnterpriseOutputDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ScreenEnterpriseOutputDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public ScreenEnterpriseOutputDTO get(String id) { + ScreenEnterpriseOutputEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ScreenEnterpriseOutputDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ScreenEnterpriseOutputDTO dto) { + ScreenEnterpriseOutputEntity entity = ConvertUtils.sourceToTarget(dto, ScreenEnterpriseOutputEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ScreenEnterpriseOutputDTO dto) { + ScreenEnterpriseOutputEntity entity = ConvertUtils.sourceToTarget(dto, ScreenEnterpriseOutputEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public Result submitOutput(vegetableFormDTO dto) { + String placeOrgName = dto.getVegetableList().get(0).getPlaceOrgName(); + Map map = new HashMap(); + map.put("PLACE_ORG_NAME",placeOrgName); + baseDao.deleteByMap(map); + List vegetableList = dto.getVegetableList(); + List screenEnterpriseOutputEntities = ConvertUtils.sourceToTarget(vegetableList, ScreenEnterpriseOutputEntity.class); + this.insertBatch(screenEnterpriseOutputEntities); + return new Result(); + } + +} \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/ScreenReportEnterpriseServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/ScreenReportEnterpriseServiceImpl.java index 74f7cdd373..9d64f9972a 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/ScreenReportEnterpriseServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/ScreenReportEnterpriseServiceImpl.java @@ -22,15 +22,15 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.security.password.PasswordUtils; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.Result; import com.epmet.modules.partymember.dao.ScreenReportEnterpriseDao; import com.epmet.modules.partymember.entity.ScreenReportEnterpriseEntity; import com.epmet.modules.partymember.service.ScreenReportEnterpriseService; import com.epmet.resi.partymember.dto.ScreenReportEnterpriseDTO; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -64,8 +64,8 @@ public class ScreenReportEnterpriseServiceImpl extends BaseServiceImpl getWrapper(Map params){ - String id = (String)params.get(FieldConstant.ID_HUMP); + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); @@ -100,4 +100,19 @@ public class ScreenReportEnterpriseServiceImpl extends BaseServiceImpl() + .eq("del_flag", 0) + .eq("PLACE_ORG_NAME", formDto.getPlaceOrgName())); + if(null==screenReportEnterpriseEntity){ + return new Result().error("账号不存在,请重新输入"); + } + if (!formDto.getPassword().equals(screenReportEnterpriseEntity.getPassword())) { + return new Result().error("密码错误,请重新输入"); + } + return new Result(); + } + } \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/ScreenEnterpriseOutputDao.xml b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/ScreenEnterpriseOutputDao.xml new file mode 100644 index 0000000000..f2da83d5bf --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/ScreenEnterpriseOutputDao.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file