Browse Source

代码提交 党员亮身份-pc,小程序端bug更新:詳情查詢传参改为对象方式

master
zhangfh 4 years ago
parent
commit
95d1f8efd1
  1. 41
      epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/EpdcAppPartyMemberController.java
  2. 94
      epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserInfoController.java
  3. 31
      epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserInfoDao.java
  4. 16
      epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserInfoEntity.java
  5. 77
      epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserInfoExcel.java
  6. 47
      epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserInfoRedis.java
  7. 113
      epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserInfoService.java
  8. 113
      epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserInfoServiceImpl.java
  9. 33
      epdc-cloud-user/src/main/resources/mapper/UserInfoDao.xml

41
epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/EpdcAppPartyMemberController.java

@ -4,6 +4,7 @@ import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
import com.elink.esua.epdc.dto.epdc.form.EpdcAppIdentityDetailFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcAppShowIdentityFormDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcAppShowIdentityFormDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcAppIdentityDetailResultDTO; import com.elink.esua.epdc.dto.epdc.result.EpdcAppIdentityDetailResultDTO;
import com.elink.esua.epdc.service.UserInfoService; import com.elink.esua.epdc.service.UserInfoService;
@ -22,6 +23,13 @@ public class EpdcAppPartyMemberController {
@Autowired @Autowired
private UserInfoService userInfoService; private UserInfoService userInfoService;
/**
* 小程序-党员亮身份
* @params [formDto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
* @author zhangfenghe
* @since 2021/9/1 9:26
*/
@PostMapping("showIdentity") @PostMapping("showIdentity")
public Result saveShowIdentity(@RequestBody EpdcAppShowIdentityFormDTO formDto){ public Result saveShowIdentity(@RequestBody EpdcAppShowIdentityFormDTO formDto){
ValidatorUtils.validateEntity(formDto, AddGroup.class, DefaultGroup.class); ValidatorUtils.validateEntity(formDto, AddGroup.class, DefaultGroup.class);
@ -29,33 +37,18 @@ public class EpdcAppPartyMemberController {
return new Result(); return new Result();
} }
@GetMapping("dentityDetail/{userId}")
public Result<EpdcAppIdentityDetailResultDTO> getDentityDetail(@PathVariable("userId") String userId){
EpdcAppIdentityDetailResultDTO data = userInfoService.getDentityDetail(userId);
return new Result<EpdcAppIdentityDetailResultDTO>().ok(data);
}
/** /**
* 党建引领-党员亮身份推荐 * 小程序-党员亮身份详情查询
* @params [id] * @params [userDetail]
* @return void * @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.epdc.result.EpdcAppIdentityDetailResultDTO>
* @author zhangfenghe * @author zhangfenghe
* @since 2021/8/30 9:26 * @since 2021/9/1 9:27
*/ */
@PostMapping("brightIdentity/recommended/{id}") @GetMapping("dentityDetail")
public Result recommended(@PathVariable("id") String id){ public Result<EpdcAppIdentityDetailResultDTO> getDentityDetail(@RequestBody EpdcAppIdentityDetailFormDTO userDetail){
return userInfoService.recommended(id); ValidatorUtils.validateEntity(userDetail);
EpdcAppIdentityDetailResultDTO data = userInfoService.getDentityDetail(userDetail.getUserId());
return new Result<EpdcAppIdentityDetailResultDTO>().ok(data);
} }
/**
* 党建引领-党员亮身份取消推荐
* @params [id]
* @return void
* @author zhangfenghe
* @since 2021/8/30 9:26
*/
@PostMapping("brightIdentity/recommendedCancel/{id}")
public Result recommendedCancel(@PathVariable("id") String id){
return userInfoService.recommendedCancel(id);
}
} }

94
epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserInfoController.java

@ -0,0 +1,94 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.controller;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.dto.UserInfoDTO;
import com.elink.esua.epdc.excel.UserInfoExcel;
import com.elink.esua.epdc.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 用户信息表 用户信息表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-08-31
*/
@RestController
@RequestMapping("userinfo")
public class UserInfoController {
@Autowired
private UserInfoService userInfoService;
@GetMapping("page")
public Result<PageData<UserInfoDTO>> page(@RequestParam Map<String, Object> params){
PageData<UserInfoDTO> page = userInfoService.page(params);
return new Result<PageData<UserInfoDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<UserInfoDTO> get(@PathVariable("id") String id){
UserInfoDTO data = userInfoService.get(id);
return new Result<UserInfoDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody UserInfoDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
userInfoService.save(dto);
return new Result();
}
@PutMapping("update")
public Result update(@RequestBody UserInfoDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
userInfoService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
userInfoService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<UserInfoDTO> list = userInfoService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, UserInfoExcel.class);
}
}

31
epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserInfoDao.java

@ -1,9 +1,14 @@
package com.elink.esua.epdc.dao; package com.elink.esua.epdc.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.dto.UserInfoDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcAppIdentityDetailResultDTO; import com.elink.esua.epdc.dto.epdc.result.EpdcAppIdentityDetailResultDTO;
import com.elink.esua.epdc.entity.UserInfoEntity; import com.elink.esua.epdc.entity.UserInfoEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/** /**
* *
* 用户信息表-党员亮身份 * 用户信息表-党员亮身份
@ -14,6 +19,14 @@ import org.apache.ibatis.annotations.Mapper;
public interface UserInfoDao extends BaseDao<UserInfoEntity> { public interface UserInfoDao extends BaseDao<UserInfoEntity> {
String selectDentityIdByUserId(String userId); String selectDentityIdByUserId(String userId);
/**
* pc-党员亮身份列表查询
* @params [params]
* @return java.util.List<com.elink.esua.epdc.dto.UserInfoDTO>
* @author jyyzz
* @since 2021/9/1 9:24
*/
List<UserInfoDTO> selectListUserInfoDtos(Map<String, Object> params);
/** /**
*获取党员亮身份详情接口 *获取党员亮身份详情接口
@ -24,22 +37,4 @@ public interface UserInfoDao extends BaseDao<UserInfoEntity> {
*/ */
EpdcAppIdentityDetailResultDTO selectDentityDetail(String userId); EpdcAppIdentityDetailResultDTO selectDentityDetail(String userId);
/**
* 党建引领-党员亮身份推荐
* @params [id]
* @return void
* @author zhangfenghe
* @since 2021/8/30 9:26
*/
void recommended(String id);
/**
* 党建引领-党员亮身份取消推荐
* @params [id]
* @return void
* @author zhangfenghe
* @since 2021/8/30 9:26
*/
void recommendedCancel(String id);
} }

16
epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserInfoEntity.java

@ -5,6 +5,8 @@ import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.util.Date;
/** /**
* create by: zhangfenghe * create by: zhangfenghe
* description: 用户信息表 * description: 用户信息表
@ -16,6 +18,10 @@ import lombok.EqualsAndHashCode;
public class UserInfoEntity extends BaseEpdcEntity { public class UserInfoEntity extends BaseEpdcEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**
* 主键id
*/
private String id;
/** /**
* 用户id * 用户id
*/ */
@ -41,4 +47,14 @@ public class UserInfoEntity extends BaseEpdcEntity {
*/ */
private String serviceArea; private String serviceArea;
/**
* 推荐标识 0-1-
*/
private String recommendFlag;
/**
* 推荐时间
*/
private Date recommendTime;
} }

77
epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserInfoExcel.java

@ -0,0 +1,77 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 用户信息表 用户信息表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-08-31
*/
@Data
public class UserInfoExcel {
@Excel(name = "标识号")
private String id;
@Excel(name = "用户ID")
private String userId;
@Excel(name = "头像地址")
private String headUrl;
@Excel(name = "格言")
private String motto;
@Excel(name = "承诺")
private String promise;
@Excel(name = "服务范围")
private String serviceArea;
@Excel(name = "推荐标识 0-否,1-是")
private String recommendFlag;
@Excel(name = "推荐时间")
private Date recommendTime;
@Excel(name = "删除标识 0-否,1-是")
private String delFlag;
@Excel(name = "乐观锁")
private Integer revision;
@Excel(name = "创建人")
private String createdBy;
@Excel(name = "创建时间")
private Date createdTime;
@Excel(name = "更新人")
private String updatedBy;
@Excel(name = "更新时间")
private Date updatedTime;
}

47
epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserInfoRedis.java

@ -0,0 +1,47 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.redis;
import com.elink.esua.epdc.commons.tools.redis.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 用户信息表 用户信息表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-08-31
*/
@Component
public class UserInfoRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

113
epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserInfoService.java

@ -1,40 +1,115 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.service; package com.elink.esua.epdc.service;
import com.elink.esua.epdc.commons.mybatis.service.BaseService; import com.elink.esua.epdc.commons.mybatis.service.BaseService;
import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.dto.UserInfoDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcAppShowIdentityFormDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcAppShowIdentityFormDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcAppIdentityDetailResultDTO; import com.elink.esua.epdc.dto.epdc.result.EpdcAppIdentityDetailResultDTO;
import com.elink.esua.epdc.entity.UserInfoEntity; import com.elink.esua.epdc.entity.UserInfoEntity;
import java.util.List;
import java.util.Map;
/**
* 用户信息表 用户信息表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-08-31
*/
public interface UserInfoService extends BaseService<UserInfoEntity> { public interface UserInfoService extends BaseService<UserInfoEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<UserInfoDTO>
* @author generator
* @date 2021-08-31
*/
PageData<UserInfoDTO> page(Map<String, Object> params);
/** /**
* 用户信息表 * 默认查询
* @params [dto] *
* @return void * @param params
* @author zhangfenghe * @return java.util.List<UserInfoDTO>
* @since 2021/8/29 11:00 * @author generator
*/ * @date 2021-08-31
void save(EpdcAppShowIdentityFormDTO dto); */
List<UserInfoDTO> list(Map<String, Object> params);
EpdcAppIdentityDetailResultDTO getDentityDetail(String userId); /**
* 单条查询
*
* @param id
* @return UserInfoDTO
* @author generator
* @date 2021-08-31
*/
UserInfoDTO get(String id);
/** /**
* 党建引领-党员亮身份推荐 * 默认保存
* @params [id] *
* @param dto
* @return void * @return void
* @author zhangfenghe * @author generator
* @since 2021/8/30 9:26 * @date 2021-08-31
*/ */
Result recommended(String id); void save(UserInfoDTO dto);
/** /**
* 党建引领-党员亮身份取消推荐 * 默认更新
* @params [id] *
* @param dto
* @return void
* @author generator
* @date 2021-08-31
*/
void update(UserInfoDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-08-31
*/
void delete(String[] ids);
/**
* 用户信息表
* @params [dto]
* @return void * @return void
* @author zhangfenghe * @author zhangfenghe
* @since 2021/8/30 9:26 * @since 2021/8/29 11:00
*/ */
Result recommendedCancel(String id); void save(EpdcAppShowIdentityFormDTO dto);
/**
* 党员亮身份详情查询
* @params [userId]
* @return com.elink.esua.epdc.dto.epdc.result.EpdcAppIdentityDetailResultDTO
* @author zhangfenghe
* @since 2021/9/1 9:23
*/
EpdcAppIdentityDetailResultDTO getDentityDetail(String userId);
} }

113
epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserInfoServiceImpl.java

@ -1,26 +1,117 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.service.impl; package com.elink.esua.epdc.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.security.user.SecurityUser;
import com.elink.esua.epdc.commons.tools.security.user.UserDetail;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
import com.elink.esua.epdc.dao.UserInfoDao; import com.elink.esua.epdc.dao.UserInfoDao;
import com.elink.esua.epdc.dto.UserInfoDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcAppShowIdentityFormDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcAppShowIdentityFormDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcAppIdentityDetailResultDTO; import com.elink.esua.epdc.dto.epdc.result.EpdcAppIdentityDetailResultDTO;
import com.elink.esua.epdc.entity.UserInfoEntity; import com.elink.esua.epdc.entity.UserInfoEntity;
import com.elink.esua.epdc.redis.UserInfoRedis;
import com.elink.esua.epdc.service.UserInfoService; import com.elink.esua.epdc.service.UserInfoService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;
/** /**
* 用户信息表 用户信息表
* *
* create by: zhangfenghe * @author qu qu@elink-cn.com
* description: 党员亮身份 * @since v1.0.0 2021-08-31
* create time: 2021/8/29$ 11:27$
*/ */
@Service @Service
public class UserInfoServiceImpl extends BaseServiceImpl<UserInfoDao, UserInfoEntity> implements UserInfoService { public class UserInfoServiceImpl extends BaseServiceImpl<UserInfoDao, UserInfoEntity> implements UserInfoService {
@Autowired
private UserInfoRedis userInfoRedis;
@Override
public PageData<UserInfoDTO> page(Map<String, Object> params) {
UserDetail userDetail = SecurityUser.getUser();
params.put("deptIds",userDetail.getDeptIdList());
IPage<UserInfoDTO> iPage = this.getPage(params);
List<UserInfoDTO> userDtoList = this.baseDao.selectListUserInfoDtos(params);
return new PageData<>(userDtoList, iPage.getTotal());
}
@Override
public List<UserInfoDTO> list(Map<String, Object> params) {
List<UserInfoEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, UserInfoDTO.class);
}
private QueryWrapper<UserInfoEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<UserInfoEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public UserInfoDTO get(String id) {
UserInfoEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, UserInfoDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(UserInfoDTO dto) {
UserInfoEntity entity = ConvertUtils.sourceToTarget(dto, UserInfoEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(UserInfoDTO dto) {
if("1".equals(dto.getRecommendFlag())){
dto.setRecommendFlag("0");
}else{
dto.setRecommendTime(new Date());
dto.setRecommendFlag("1");
}
UserInfoEntity entity = ConvertUtils.sourceToTarget(dto, UserInfoEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void save(EpdcAppShowIdentityFormDTO dto) { public void save(EpdcAppShowIdentityFormDTO dto) {
@ -40,17 +131,5 @@ public class UserInfoServiceImpl extends BaseServiceImpl<UserInfoDao, UserInfoEn
return dentityDetail; return dentityDetail;
} }
@Override
public Result recommended(String id) {
AssertUtils.isBlank(id,"id");
baseDao.recommended(id);
return new Result();
}
@Override
public Result recommendedCancel(String id) {
AssertUtils.isBlank(id,"id");
baseDao.recommendedCancel(id);
return new Result();
}
} }

33
epdc-cloud-user/src/main/resources/mapper/UserInfoDao.xml

@ -14,6 +14,39 @@
AND ui.DEL_FLAG = '0' AND ui.DEL_FLAG = '0'
</select> </select>
<select id="selectListUserInfoDtos" resultType="com.elink.esua.epdc.dto.UserInfoDTO">
SELECT
u.REAL_NAME,
u.MOBILE,
u.ALL_DEPT_NAMES AS deptName,
ui.ID,
ui.HEAD_URL,
ui.MOTTO,
ui.USER_ID,
ui.PROMISE,
ui.SERVICE_AREA,
ui.RECOMMEND_FLAG
FROM epdc_user u
LEFT JOIN epdc_user_info ui ON u.ID = ui.USER_ID
WHERE u.DEL_FLAG = 0
AND ui.DEL_FLAG = 0
<if test="realName != '' and realName != null">
AND u.REAL_NAME like '%${realName}%'
</if>
<if test="mobile != '' and mobile != null">
AND u.MOBILE LIKE '%${mobile}%'
</if>
<if test="deptIds != null and deptIds.size>0">
AND u.DEPT_ID IN
<foreach collection="deptIds" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="deptId != null and deptId.trim() != ''">
AND u.ALL_DEPT_IDS LIKE CONCAT( '%', #{deptId}, '%' )
</if>
ORDER BY ui.CREATED_TIME DESC
</select>
<select id="selectDentityIdByUserId" resultType="String"> <select id="selectDentityIdByUserId" resultType="String">
SELECT SELECT
id id

Loading…
Cancel
Save