forked from luyan/epmet-cloud-lingshan
				
			
				 17 changed files with 754 additions and 9 deletions
			
			
		| @ -0,0 +1,20 @@ | |||||
|  | package com.epmet.dto.form; | ||||
|  | 
 | ||||
|  | import lombok.Data; | ||||
|  | import lombok.NoArgsConstructor; | ||||
|  | 
 | ||||
|  | import java.io.Serializable; | ||||
|  | 
 | ||||
|  | /** | ||||
|  |  * @author zhaoqifeng | ||||
|  |  * @dscription | ||||
|  |  * @date 2020/11/5 11:06 | ||||
|  |  */ | ||||
|  | @NoArgsConstructor | ||||
|  | @Data | ||||
|  | public class BadgeAuditFormDTO implements Serializable { | ||||
|  | 	private static final long serialVersionUID = 2209535364555130964L; | ||||
|  | 	private String recordId; | ||||
|  | 	private String auditStatus; | ||||
|  | 	private String auditRemark; | ||||
|  | } | ||||
| @ -0,0 +1,43 @@ | |||||
|  | package com.epmet.dto.result; | ||||
|  | 
 | ||||
|  | import lombok.Data; | ||||
|  | 
 | ||||
|  | import java.io.Serializable; | ||||
|  | 
 | ||||
|  | /** | ||||
|  |  * @author zhaoqifeng | ||||
|  |  * @dscription | ||||
|  |  * @date 2020/11/5 10:57 | ||||
|  |  */ | ||||
|  | @Data | ||||
|  | public class BadgeAuditRecordResultDTO implements Serializable { | ||||
|  | 	private static final long serialVersionUID = 6004101838042628105L; | ||||
|  | 	/** | ||||
|  | 	 * 徽章Id | ||||
|  | 	 */ | ||||
|  | 	private String badgeId; | ||||
|  | 	/** | ||||
|  | 	 * 徽章名称 | ||||
|  | 	 */ | ||||
|  | 	private String badgeName; | ||||
|  | 	/** | ||||
|  | 	 * 徽章图标url | ||||
|  | 	 */ | ||||
|  | 	private String badgeIcon; | ||||
|  | 	/** | ||||
|  | 	 * 用户Id | ||||
|  | 	 */ | ||||
|  | 	private String userId; | ||||
|  | 	/** | ||||
|  | 	 * 用户名 | ||||
|  | 	 */ | ||||
|  | 	private String userName; | ||||
|  | 	/** | ||||
|  | 	 * 创建时间 | ||||
|  | 	 */ | ||||
|  | 	private Long createTime; | ||||
|  | 	/** | ||||
|  | 	 * 用户名 | ||||
|  | 	 */ | ||||
|  | 	private String auditStatus; | ||||
|  | } | ||||
| @ -0,0 +1,43 @@ | |||||
|  | package com.epmet.dto.result; | ||||
|  | 
 | ||||
|  | import lombok.Data; | ||||
|  | import lombok.NoArgsConstructor; | ||||
|  | 
 | ||||
|  | import java.io.Serializable; | ||||
|  | 
 | ||||
|  | /** | ||||
|  |  * @author zhaoqifeng | ||||
|  |  * @dscription | ||||
|  |  * @date 2020/11/5 9:34 | ||||
|  |  */ | ||||
|  | @NoArgsConstructor | ||||
|  | @Data | ||||
|  | public class BadgeAuditingResultDTO implements Serializable { | ||||
|  | 
 | ||||
|  | 	private static final long serialVersionUID = -361914591952483084L; | ||||
|  | 	/** | ||||
|  | 	 * 徽章Id | ||||
|  | 	 */ | ||||
|  | 	private String badgeId; | ||||
|  | 	/** | ||||
|  | 	 * 徽章名称 | ||||
|  | 	 */ | ||||
|  | 	private String badgeName; | ||||
|  | 	/** | ||||
|  | 	 * 徽章图标url | ||||
|  | 	 */ | ||||
|  | 	private String badgeIcon; | ||||
|  | 	/** | ||||
|  | 	 * 用户Id | ||||
|  | 	 */ | ||||
|  | 	private String userId; | ||||
|  | 	/** | ||||
|  | 	 * 用户名 | ||||
|  | 	 */ | ||||
|  | 	private String userName; | ||||
|  | 	/** | ||||
|  | 	 * 创建时间 | ||||
|  | 	 */ | ||||
|  | 	private Long createTime; | ||||
|  | 
 | ||||
|  | } | ||||
| @ -0,0 +1,33 @@ | |||||
|  | /** | ||||
|  |  * 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.epmet.dao; | ||||
|  | 
 | ||||
|  | import com.epmet.commons.mybatis.dao.BaseDao; | ||||
|  | import com.epmet.entity.UserBadgeCertificateRecordEntity; | ||||
|  | import org.apache.ibatis.annotations.Mapper; | ||||
|  | 
 | ||||
|  | /** | ||||
|  |  * 用户认证徽章记录表 | ||||
|  |  * | ||||
|  |  * @author generator generator@elink-cn.com | ||||
|  |  * @since v1.0.0 2020-11-05 | ||||
|  |  */ | ||||
|  | @Mapper | ||||
|  | public interface UserBadgeCertificateRecordDao extends BaseDao<UserBadgeCertificateRecordEntity> { | ||||
|  | 	 | ||||
|  | } | ||||
| @ -0,0 +1,116 @@ | |||||
|  | /** | ||||
|  |  * 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.epmet.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 generator generator@elink-cn.com | ||||
|  |  * @since v1.0.0 2020-11-05 | ||||
|  |  */ | ||||
|  | @Data | ||||
|  | @EqualsAndHashCode(callSuper=false) | ||||
|  | @TableName("user_badge_certificate_record") | ||||
|  | public class UserBadgeCertificateRecordEntity extends BaseEpmetEntity { | ||||
|  | 
 | ||||
|  | 	private static final long serialVersionUID = 1L; | ||||
|  | 
 | ||||
|  |     /** | ||||
|  |      * 客户Id  | ||||
|  |      */ | ||||
|  | 	private String customerId; | ||||
|  | 
 | ||||
|  |     /** | ||||
|  |      * 用户注册网格ID | ||||
|  |      */ | ||||
|  | 	private String gridId; | ||||
|  | 
 | ||||
|  |     /** | ||||
|  |      * 用户ID | ||||
|  |      */ | ||||
|  | 	private String userId; | ||||
|  | 
 | ||||
|  |     /** | ||||
|  |      * 徽章ID | ||||
|  |      */ | ||||
|  | 	private String badgeId; | ||||
|  | 
 | ||||
|  |     /** | ||||
|  |      * 姓 | ||||
|  |      */ | ||||
|  | 	private String surname; | ||||
|  | 
 | ||||
|  |     /** | ||||
|  |      * 名 | ||||
|  |      */ | ||||
|  | 	private String name; | ||||
|  | 
 | ||||
|  |     /** | ||||
|  |      * 手机号 | ||||
|  |      */ | ||||
|  | 	private String mobile; | ||||
|  | 
 | ||||
|  |     /** | ||||
|  |      * 身份证号 网格内去重 | ||||
|  |      */ | ||||
|  | 	private String idNum; | ||||
|  | 
 | ||||
|  |     /** | ||||
|  |      * 认证证件图片 | ||||
|  |      */ | ||||
|  | 	private String certificationImg; | ||||
|  | 
 | ||||
|  |     /** | ||||
|  |      * 认证说明(备注) | ||||
|  |      */ | ||||
|  | 	private String remaek; | ||||
|  | 
 | ||||
|  |     /** | ||||
|  |      * 审核状态 approved:审核通过,rejected:审核驳回;auditing:审核中 | ||||
|  |      */ | ||||
|  | 	private String auditStatus; | ||||
|  | 
 | ||||
|  |     /** | ||||
|  |      * 审核意见 | ||||
|  |      */ | ||||
|  | 	private String auditRemark; | ||||
|  | 
 | ||||
|  |     /** | ||||
|  |      * 审核人 审核人Id | ||||
|  |      */ | ||||
|  | 	private String staffId; | ||||
|  | 
 | ||||
|  |     /** | ||||
|  |      * 审核时间 | ||||
|  |      */ | ||||
|  | 	private Date auditTime; | ||||
|  | 
 | ||||
|  |     /** | ||||
|  |      * 是否是最新纪录:yes:最新纪录,no:非最新纪录 | ||||
|  |      */ | ||||
|  | 	private String isLast; | ||||
|  | 
 | ||||
|  | } | ||||
| @ -0,0 +1,95 @@ | |||||
|  | /** | ||||
|  |  * 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.epmet.service; | ||||
|  | 
 | ||||
|  | import com.epmet.commons.mybatis.service.BaseService; | ||||
|  | import com.epmet.commons.tools.page.PageData; | ||||
|  | import com.epmet.dto.UserBadgeCertificateRecordDTO; | ||||
|  | import com.epmet.entity.UserBadgeCertificateRecordEntity; | ||||
|  | 
 | ||||
|  | import java.util.List; | ||||
|  | import java.util.Map; | ||||
|  | 
 | ||||
|  | /** | ||||
|  |  * 用户认证徽章记录表 | ||||
|  |  * | ||||
|  |  * @author generator generator@elink-cn.com | ||||
|  |  * @since v1.0.0 2020-11-05 | ||||
|  |  */ | ||||
|  | public interface UserBadgeCertificateRecordService extends BaseService<UserBadgeCertificateRecordEntity> { | ||||
|  | 
 | ||||
|  |     /** | ||||
|  |      * 默认分页 | ||||
|  |      * | ||||
|  |      * @param params | ||||
|  |      * @return PageData<UserBadgeCertificateRecordDTO> | ||||
|  |      * @author generator | ||||
|  |      * @date 2020-11-05 | ||||
|  |      */ | ||||
|  |     PageData<UserBadgeCertificateRecordDTO> page(Map<String, Object> params); | ||||
|  | 
 | ||||
|  |     /** | ||||
|  |      * 默认查询 | ||||
|  |      * | ||||
|  |      * @param params | ||||
|  |      * @return java.util.List<UserBadgeCertificateRecordDTO> | ||||
|  |      * @author generator | ||||
|  |      * @date 2020-11-05 | ||||
|  |      */ | ||||
|  |     List<UserBadgeCertificateRecordDTO> list(Map<String, Object> params); | ||||
|  | 
 | ||||
|  |     /** | ||||
|  |      * 单条查询 | ||||
|  |      * | ||||
|  |      * @param id | ||||
|  |      * @return UserBadgeCertificateRecordDTO | ||||
|  |      * @author generator | ||||
|  |      * @date 2020-11-05 | ||||
|  |      */ | ||||
|  |     UserBadgeCertificateRecordDTO get(String id); | ||||
|  | 
 | ||||
|  |     /** | ||||
|  |      * 默认保存 | ||||
|  |      * | ||||
|  |      * @param dto | ||||
|  |      * @return void | ||||
|  |      * @author generator | ||||
|  |      * @date 2020-11-05 | ||||
|  |      */ | ||||
|  |     void save(UserBadgeCertificateRecordDTO dto); | ||||
|  | 
 | ||||
|  |     /** | ||||
|  |      * 默认更新 | ||||
|  |      * | ||||
|  |      * @param dto | ||||
|  |      * @return void | ||||
|  |      * @author generator | ||||
|  |      * @date 2020-11-05 | ||||
|  |      */ | ||||
|  |     void update(UserBadgeCertificateRecordDTO dto); | ||||
|  | 
 | ||||
|  |     /** | ||||
|  |      * 批量删除 | ||||
|  |      * | ||||
|  |      * @param ids | ||||
|  |      * @return void | ||||
|  |      * @author generator | ||||
|  |      * @date 2020-11-05 | ||||
|  |      */ | ||||
|  |     void delete(String[] ids); | ||||
|  | } | ||||
| @ -0,0 +1,100 @@ | |||||
|  | /** | ||||
|  |  * 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.epmet.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.dao.UserBadgeCertificateRecordDao; | ||||
|  | import com.epmet.dto.UserBadgeCertificateRecordDTO; | ||||
|  | import com.epmet.entity.UserBadgeCertificateRecordEntity; | ||||
|  | import com.epmet.service.UserBadgeCertificateRecordService; | ||||
|  | import org.apache.commons.lang3.StringUtils; | ||||
|  | import org.springframework.stereotype.Service; | ||||
|  | import org.springframework.transaction.annotation.Transactional; | ||||
|  | 
 | ||||
|  | import java.util.Arrays; | ||||
|  | import java.util.List; | ||||
|  | import java.util.Map; | ||||
|  | 
 | ||||
|  | /** | ||||
|  |  * 用户认证徽章记录表 | ||||
|  |  * | ||||
|  |  * @author generator generator@elink-cn.com | ||||
|  |  * @since v1.0.0 2020-11-05 | ||||
|  |  */ | ||||
|  | @Service | ||||
|  | public class UserBadgeCertificateRecordServiceImpl extends BaseServiceImpl<UserBadgeCertificateRecordDao, UserBadgeCertificateRecordEntity> implements UserBadgeCertificateRecordService { | ||||
|  | 
 | ||||
|  | 
 | ||||
|  |     @Override | ||||
|  |     public PageData<UserBadgeCertificateRecordDTO> page(Map<String, Object> params) { | ||||
|  |         IPage<UserBadgeCertificateRecordEntity> page = baseDao.selectPage( | ||||
|  |                 getPage(params, FieldConstant.CREATED_TIME, false), | ||||
|  |                 getWrapper(params) | ||||
|  |         ); | ||||
|  |         return getPageData(page, UserBadgeCertificateRecordDTO.class); | ||||
|  |     } | ||||
|  | 
 | ||||
|  |     @Override | ||||
|  |     public List<UserBadgeCertificateRecordDTO> list(Map<String, Object> params) { | ||||
|  |         List<UserBadgeCertificateRecordEntity> entityList = baseDao.selectList(getWrapper(params)); | ||||
|  | 
 | ||||
|  |         return ConvertUtils.sourceToTarget(entityList, UserBadgeCertificateRecordDTO.class); | ||||
|  |     } | ||||
|  | 
 | ||||
|  |     private QueryWrapper<UserBadgeCertificateRecordEntity> getWrapper(Map<String, Object> params){ | ||||
|  |         String id = (String)params.get(FieldConstant.ID_HUMP); | ||||
|  | 
 | ||||
|  |         QueryWrapper<UserBadgeCertificateRecordEntity> wrapper = new QueryWrapper<>(); | ||||
|  |         wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); | ||||
|  | 
 | ||||
|  |         return wrapper; | ||||
|  |     } | ||||
|  | 
 | ||||
|  |     @Override | ||||
|  |     public UserBadgeCertificateRecordDTO get(String id) { | ||||
|  |         UserBadgeCertificateRecordEntity entity = baseDao.selectById(id); | ||||
|  |         return ConvertUtils.sourceToTarget(entity, UserBadgeCertificateRecordDTO.class); | ||||
|  |     } | ||||
|  | 
 | ||||
|  |     @Override | ||||
|  |     @Transactional(rollbackFor = Exception.class) | ||||
|  |     public void save(UserBadgeCertificateRecordDTO dto) { | ||||
|  |         UserBadgeCertificateRecordEntity entity = ConvertUtils.sourceToTarget(dto, UserBadgeCertificateRecordEntity.class); | ||||
|  |         insert(entity); | ||||
|  |     } | ||||
|  | 
 | ||||
|  |     @Override | ||||
|  |     @Transactional(rollbackFor = Exception.class) | ||||
|  |     public void update(UserBadgeCertificateRecordDTO dto) { | ||||
|  |         UserBadgeCertificateRecordEntity entity = ConvertUtils.sourceToTarget(dto, UserBadgeCertificateRecordEntity.class); | ||||
|  |         updateById(entity); | ||||
|  |     } | ||||
|  | 
 | ||||
|  |     @Override | ||||
|  |     @Transactional(rollbackFor = Exception.class) | ||||
|  |     public void delete(String[] ids) { | ||||
|  |         // 逻辑删除(@TableLogic 注解)
 | ||||
|  |         baseDao.deleteBatchIds(Arrays.asList(ids)); | ||||
|  |     } | ||||
|  | 
 | ||||
|  | } | ||||
| @ -0,0 +1,32 @@ | |||||
|  | <?xml version="1.0" encoding="UTF-8"?> | ||||
|  | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||||
|  | 
 | ||||
|  | <mapper namespace="com.epmet.dao.UserBadgeCertificateRecordDao"> | ||||
|  | 
 | ||||
|  |     <resultMap type="com.epmet.entity.UserBadgeCertificateRecordEntity" id="userBadgeCertificateRecordMap"> | ||||
|  |         <result property="id" column="ID"/> | ||||
|  |         <result property="customerId" column="CUSTOMER_ID"/> | ||||
|  |         <result property="gridId" column="GRID_ID"/> | ||||
|  |         <result property="userId" column="USER_ID"/> | ||||
|  |         <result property="badgeId" column="BADGE_ID"/> | ||||
|  |         <result property="surname" column="SURNAME"/> | ||||
|  |         <result property="name" column="NAME"/> | ||||
|  |         <result property="mobile" column="MOBILE"/> | ||||
|  |         <result property="idNum" column="ID_NUM"/> | ||||
|  |         <result property="certificationImg" column="CERTIFICATION_IMG"/> | ||||
|  |         <result property="remaek" column="REMAEK"/> | ||||
|  |         <result property="auditStatus" column="AUDIT_STATUS"/> | ||||
|  |         <result property="auditRemark" column="AUDIT_REMARK"/> | ||||
|  |         <result property="staffId" column="STAFF_ID"/> | ||||
|  |         <result property="auditTime" column="AUDIT_TIME"/> | ||||
|  |         <result property="isLast" column="IS_LAST"/> | ||||
|  |         <result property="delFlag" column="DEL_FLAG"/> | ||||
|  |         <result property="revision" column="REVISION"/> | ||||
|  |         <result property="createdBy" column="CREATED_BY"/> | ||||
|  |         <result property="createdTime" column="CREATED_TIME"/> | ||||
|  |         <result property="updatedBy" column="UPDATED_BY"/> | ||||
|  |         <result property="updatedTime" column="UPDATED_TIME"/> | ||||
|  |     </resultMap> | ||||
|  | 
 | ||||
|  | 
 | ||||
|  | </mapper> | ||||
					Loading…
					
					
				
		Reference in new issue