瀏覽代碼

资料审核

change 3 年之前
父節點
當前提交
b6fb06e76d

+ 2 - 0
zhongzheng-admin/src/main/java/com/zhongzheng/controller/base/ProfileTpController.java

@@ -120,4 +120,6 @@ public class ProfileTpController extends BaseController {
     public AjaxResult<Void> remove(@PathVariable Long[] profileTpIds) {
         return toAjax(iProfileTpService.deleteWithValidByIds(Arrays.asList(profileTpIds), true) ? 1 : 0);
     }*/
+
+
 }

+ 17 - 19
zhongzheng-admin/src/main/java/com/zhongzheng/controller/base/ProfileTpUserController.java → zhongzheng-admin/src/main/java/com/zhongzheng/controller/base/UserProfileController.java

@@ -18,11 +18,11 @@ import com.zhongzheng.common.annotation.Log;
 import com.zhongzheng.common.core.controller.BaseController;
 import com.zhongzheng.common.core.domain.AjaxResult;
 import com.zhongzheng.common.enums.BusinessType;
-import com.zhongzheng.modules.base.vo.ProfileTpUserVo;
-import com.zhongzheng.modules.base.bo.ProfileTpUserQueryBo;
-import com.zhongzheng.modules.base.bo.ProfileTpUserAddBo;
-import com.zhongzheng.modules.base.bo.ProfileTpUserEditBo;
-import com.zhongzheng.modules.base.service.IProfileTpUserService;
+import com.zhongzheng.modules.base.vo.UserProfileVo;
+import com.zhongzheng.modules.base.bo.UserProfileQueryBo;
+import com.zhongzheng.modules.base.bo.UserProfileAddBo;
+import com.zhongzheng.modules.base.bo.UserProfileEditBo;
+import com.zhongzheng.modules.base.service.IUserProfileService;
 import com.zhongzheng.common.utils.poi.ExcelUtil;
 import com.zhongzheng.common.core.page.TableDataInfo;
 import io.swagger.annotations.Api;
@@ -37,44 +37,42 @@ import io.swagger.annotations.ApiOperation;
 @Api(value = "填写资料审核控制器", tags = {"填写资料审核管理"})
 @RequiredArgsConstructor(onConstructor_ = @Autowired)
 @RestController
-@RequestMapping("/system/ProfileTpUser")
-public class ProfileTpUserController extends BaseController {
+@RequestMapping("/system/profile")
+public class UserProfileController extends BaseController {
 
-    private final IProfileTpUserService iProfileTpUserService;
+    private final IUserProfileService iUserProfileService;
 
     /**
      * 查询填写资料审核列表
      */
     @ApiOperation("查询填写资料审核列表")
-    @PreAuthorize("@ss.hasPermi('system:user:list')")
+    @PreAuthorize("@ss.hasPermi('system:profile:list')")
     @GetMapping("/list")
-    public TableDataInfo<ProfileTpUserVo> list(ProfileTpUserQueryBo bo) {
+    public TableDataInfo<UserProfileVo> list(UserProfileQueryBo bo) {
         startPage();
-        List<ProfileTpUserVo> list = iProfileTpUserService.queryList(bo);
+        List<UserProfileVo> list = iUserProfileService.queryList(bo);
         return getDataTable(list);
     }
 
-
     /**
      * 获取填写资料审核详细信息
      */
     @ApiOperation("获取填写资料审核详细信息")
-    @PreAuthorize("@ss.hasPermi('system:user:query')")
+    @PreAuthorize("@ss.hasPermi('system:profile:query')")
     @GetMapping("/{id}")
-    public AjaxResult<ProfileTpUserVo> getInfo(@PathVariable("id" ) Long id) {
-        return AjaxResult.success(iProfileTpUserService.queryById(id));
+    public AjaxResult<UserProfileVo> getInfo(@PathVariable("id" ) Long id) {
+        return AjaxResult.success(iUserProfileService.queryById(id));
     }
 
-
     /**
      * 修改填写资料审核
      */
     @ApiOperation("修改填写资料审核")
-    @PreAuthorize("@ss.hasPermi('system:user:edit')")
+    @PreAuthorize("@ss.hasPermi('system:profile:edit')")
     @Log(title = "填写资料审核", businessType = BusinessType.UPDATE)
     @PostMapping()
-    public AjaxResult<Void> edit(@RequestBody ProfileTpUserEditBo bo) {
-        return toAjax(iProfileTpUserService.updateByEditBo(bo) ? 1 : 0);
+    public AjaxResult<Void> edit(@RequestBody UserProfileEditBo bo) {
+        return toAjax(iUserProfileService.updateByEditBo(bo) ? 1 : 0);
     }
 
 }

+ 7 - 10
zhongzheng-api/src/main/java/com/zhongzheng/controller/base/ProfileTpController.java

@@ -1,24 +1,19 @@
 package com.zhongzheng.controller.base;
 
-import com.zhongzheng.common.annotation.Log;
 import com.zhongzheng.common.core.controller.BaseController;
 import com.zhongzheng.common.core.domain.AjaxResult;
 import com.zhongzheng.common.core.page.TableDataInfo;
-import com.zhongzheng.common.enums.BusinessType;
 import com.zhongzheng.common.utils.ServletUtils;
-import com.zhongzheng.common.utils.poi.ExcelUtil;
 import com.zhongzheng.framework.web.service.WxTokenService;
 import com.zhongzheng.modules.base.bo.*;
 import com.zhongzheng.modules.base.service.IProfileTpService;
-import com.zhongzheng.modules.base.service.IProfileTpUserService;
-import com.zhongzheng.modules.base.vo.ProfileTpUserVo;
+import com.zhongzheng.modules.base.service.IUserProfileService;
 import com.zhongzheng.modules.base.vo.ProfileTpVo;
 import com.zhongzheng.modules.user.entity.ClientLoginUser;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.RequiredArgsConstructor;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
@@ -36,9 +31,12 @@ import java.util.List;
 public class ProfileTpController extends BaseController {
 
     private final IProfileTpService iProfileTpService;
-    private final IProfileTpUserService iProfileTpUserService;
+
+
     private final WxTokenService wxTokenService;
 
+    private final IUserProfileService iUserProfileService;
+
     /**
      * 查询资料模板列表
      */
@@ -65,11 +63,10 @@ public class ProfileTpController extends BaseController {
      * 新增填写资料审核
      */
     @ApiOperation("新增填写资料审核")
-    @Log(title = "填写资料审核", businessType = BusinessType.INSERT)
     @PostMapping()
-    public AjaxResult<Void> add(@RequestBody ProfileTpUserAddBo bo) {
+    public AjaxResult<Void> add(@RequestBody UserProfileAddBo bo) {
         ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
         bo.setUserId(loginUser.getUser().getUserId());
-        return toAjax(iProfileTpUserService.insertByAddBo(bo) ? 1 : 0);
+        return toAjax(iUserProfileService.insertByAddBo(bo) ? 1 : 0);
     }
 }

+ 2 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/bo/ProfileTpUserAddBo.java → zhongzheng-system/src/main/java/com/zhongzheng/modules/base/bo/UserProfileAddBo.java

@@ -9,14 +9,14 @@ import java.util.Date;
 
 
 /**
- * 填写资料审核添加对象 profile_tp_user
+ * 填写资料审核添加对象 user_profile
  *
  * @author ruoyi
  * @date 2021-12-20
  */
 @Data
 @ApiModel("填写资料审核添加对象")
-public class ProfileTpUserAddBo {
+public class UserProfileAddBo {
 
     /** 用户ID */
     @ApiModelProperty("用户ID")

+ 2 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/bo/ProfileTpUserEditBo.java → zhongzheng-system/src/main/java/com/zhongzheng/modules/base/bo/UserProfileEditBo.java

@@ -8,14 +8,14 @@ import java.util.Date;
 
 
 /**
- * 填写资料审核编辑对象 profile_tp_user
+ * 填写资料审核编辑对象 user_profile
  *
  * @author ruoyi
  * @date 2021-12-20
  */
 @Data
 @ApiModel("填写资料审核编辑对象")
-public class ProfileTpUserEditBo {
+public class UserProfileEditBo {
 
     /** $column.columnComment */
     @ApiModelProperty("$column.columnComment")

+ 2 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/bo/ProfileTpUserQueryBo.java → zhongzheng-system/src/main/java/com/zhongzheng/modules/base/bo/UserProfileQueryBo.java

@@ -12,7 +12,7 @@ import java.util.HashMap;
 import com.zhongzheng.common.core.domain.BaseEntity;
 
 /**
- * 填写资料审核分页查询对象 profile_tp_user
+ * 填写资料审核分页查询对象 user_profile
  *
  * @author ruoyi
  * @date 2021-12-20
@@ -20,7 +20,7 @@ import com.zhongzheng.common.core.domain.BaseEntity;
 @Data
 @EqualsAndHashCode(callSuper = true)
 @ApiModel("填写资料审核分页查询对象")
-public class ProfileTpUserQueryBo extends BaseEntity {
+public class UserProfileQueryBo extends BaseEntity {
 
 	/** 分页大小 */
 	@ApiModelProperty("分页大小")

+ 53 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/domain/UserProfile.java

@@ -0,0 +1,53 @@
+package com.zhongzheng.modules.base.domain;
+
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+import java.io.Serializable;
+import java.util.Date;
+import java.math.BigDecimal;
+import com.zhongzheng.common.annotation.Excel;
+
+/**
+ * 填写资料审核对象 user_profile
+ *
+ * @author ruoyi
+ * @date 2021-12-20
+ */
+@Data
+@NoArgsConstructor
+@Accessors(chain = true)
+@TableName("user_profile")
+public class UserProfile implements Serializable {
+
+private static final long serialVersionUID=1L;
+
+    /** $column.columnComment */
+    @TableId(value = "id")
+    private Long id;
+    /** 用户ID */
+    private Long userId;
+    /** 商品ID */
+    private Long goodsId;
+    /** 审核状态  1通过 0不通过 2待审 */
+    private Integer status;
+    /** 添加时间 */
+    @TableField(fill = FieldFill.INSERT)
+    private Long createTime;
+    /** 修改时间 */
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    private Long updateTime;
+    /** 第一次提交时间 */
+    private Long oneTime;
+    /** 最后一次提交时间 */
+    private Long lastTime;
+    /** key值 */
+    private String keyValue;
+    /** 指派操作者 */
+    private String createByName;
+    /** 当前状态 1为当前 2为审核记录 */
+    private Long currentStatus;
+    /** 变更状态 0变更 1否 */
+    private Integer changeStatus;
+}

+ 14 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/mapper/UserProfileMapper.java

@@ -0,0 +1,14 @@
+package com.zhongzheng.modules.base.mapper;
+
+import com.zhongzheng.modules.base.domain.UserProfile;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * 填写资料审核Mapper接口
+ *
+ * @author ruoyi
+ * @date 2021-12-20
+ */
+public interface UserProfileMapper extends BaseMapper<UserProfile> {
+
+}

+ 10 - 12
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/IProfileTpUserService.java → zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/IUserProfileService.java

@@ -1,10 +1,10 @@
 package com.zhongzheng.modules.base.service;
 
-import com.zhongzheng.modules.base.domain.ProfileTpUser;
-import com.zhongzheng.modules.base.vo.ProfileTpUserVo;
-import com.zhongzheng.modules.base.bo.ProfileTpUserQueryBo;
-import com.zhongzheng.modules.base.bo.ProfileTpUserAddBo;
-import com.zhongzheng.modules.base.bo.ProfileTpUserEditBo;
+import com.zhongzheng.modules.base.domain.UserProfile;
+import com.zhongzheng.modules.base.vo.UserProfileVo;
+import com.zhongzheng.modules.base.bo.UserProfileQueryBo;
+import com.zhongzheng.modules.base.bo.UserProfileAddBo;
+import com.zhongzheng.modules.base.bo.UserProfileEditBo;
 import com.baomidou.mybatisplus.extension.service.IService;
 
 import java.util.Collection;
@@ -16,31 +16,31 @@ import java.util.List;
  * @author ruoyi
  * @date 2021-12-20
  */
-public interface IProfileTpUserService extends IService<ProfileTpUser> {
+public interface IUserProfileService extends IService<UserProfile> {
 	/**
 	 * 查询单个
 	 * @return
 	 */
-	ProfileTpUserVo queryById(Long id);
+	UserProfileVo queryById(Long id);
 
 	/**
 	 * 查询列表
 	 */
-	List<ProfileTpUserVo> queryList(ProfileTpUserQueryBo bo);
+	List<UserProfileVo> queryList(UserProfileQueryBo bo);
 
 	/**
 	 * 根据新增业务对象插入填写资料审核
 	 * @param bo 填写资料审核新增业务对象
 	 * @return
 	 */
-	Boolean insertByAddBo(ProfileTpUserAddBo bo);
+	Boolean insertByAddBo(UserProfileAddBo bo);
 
 	/**
 	 * 根据编辑业务对象修改填写资料审核
 	 * @param bo 填写资料审核编辑业务对象
 	 * @return
 	 */
-	Boolean updateByEditBo(ProfileTpUserEditBo bo);
+	Boolean updateByEditBo(UserProfileEditBo bo);
 
 	/**
 	 * 校验并删除数据
@@ -49,6 +49,4 @@ public interface IProfileTpUserService extends IService<ProfileTpUser> {
 	 * @return
 	 */
 	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
-
-    String filename(ProfileTpUserQueryBo bo);
 }

+ 4 - 4
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/ProfileTpServiceImpl.java

@@ -5,10 +5,7 @@ import cn.hutool.core.lang.Validator;
 import cn.hutool.core.util.StrUtil;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.ServletUtils;
-import com.zhongzheng.modules.base.bo.ProfileTpAddBo;
-import com.zhongzheng.modules.base.bo.ProfileTpBusinessAddBo;
-import com.zhongzheng.modules.base.bo.ProfileTpEditBo;
-import com.zhongzheng.modules.base.bo.ProfileTpQueryBo;
+import com.zhongzheng.modules.base.bo.*;
 import com.zhongzheng.modules.base.domain.ProfileTp;
 import com.zhongzheng.modules.base.domain.ProfileTpBusiness;
 import com.zhongzheng.modules.base.mapper.ProfileTpMapper;
@@ -46,6 +43,7 @@ public class ProfileTpServiceImpl extends ServiceImpl<ProfileTpMapper, ProfileTp
     @Autowired
     private ProfileTpMapper profileTpMapper;
 
+
     @Override
     public ProfileTpVo queryById(Long profileTpId){
         ProfileTp db = this.baseMapper.selectById(profileTpId);
@@ -164,4 +162,6 @@ public class ProfileTpServiceImpl extends ServiceImpl<ProfileTpMapper, ProfileTp
         profileTpQueryBo.setGoodsId(goodsId);
         return profileTpMapper.selectList(profileTpQueryBo).get(0);
     }
+
+
 }

+ 0 - 148
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/ProfileTpUserServiceImpl.java

@@ -1,148 +0,0 @@
-package com.zhongzheng.modules.base.service.impl;
-
-import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.io.FileUtil;
-import cn.hutool.core.util.StrUtil;
-import cn.hutool.poi.word.Word07Writer;
-import com.zhongzheng.common.utils.DateUtils;
-import com.zhongzheng.common.utils.SecurityUtils;
-import org.apache.poi.xwpf.usermodel.ParagraphAlignment;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.pagehelper.Page;
-import com.zhongzheng.modules.base.bo.ProfileTpUserAddBo;
-import com.zhongzheng.modules.base.bo.ProfileTpUserQueryBo;
-import com.zhongzheng.modules.base.bo.ProfileTpUserEditBo;
-import com.zhongzheng.modules.base.domain.ProfileTpUser;
-import com.zhongzheng.modules.base.mapper.ProfileTpUserMapper;
-import com.zhongzheng.modules.base.vo.ProfileTpUserVo;
-import com.zhongzheng.modules.base.service.IProfileTpUserService;
-
-import java.awt.*;
-import java.io.File;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * 填写资料审核Service业务层处理
- *
- * @author ruoyi
- * @date 2021-12-20
- */
-@Service
-public class ProfileTpUserServiceImpl extends ServiceImpl<ProfileTpUserMapper, ProfileTpUser> implements IProfileTpUserService {
-
-    @Override
-    public ProfileTpUserVo queryById(Long id){
-        ProfileTpUser db = this.baseMapper.selectById(id);
-        return BeanUtil.toBean(db, ProfileTpUserVo.class);
-    }
-
-    @Override
-    public List<ProfileTpUserVo> queryList(ProfileTpUserQueryBo bo) {
-        LambdaQueryWrapper<ProfileTpUser> lqw = Wrappers.lambdaQuery();
-        lqw.eq(bo.getUserId() != null, ProfileTpUser::getUserId, bo.getUserId());
-        lqw.eq(bo.getGoodsId() != null, ProfileTpUser::getGoodsId, bo.getGoodsId());
-        lqw.eq(bo.getStatus() != null, ProfileTpUser::getStatus, bo.getStatus());
-        lqw.eq(bo.getOneTime() != null, ProfileTpUser::getOneTime, bo.getOneTime());
-        lqw.eq(bo.getLastTime() != null, ProfileTpUser::getLastTime, bo.getLastTime());
-        lqw.eq(StrUtil.isNotBlank(bo.getKeyValue()), ProfileTpUser::getKeyValue, bo.getKeyValue());
-        lqw.eq(bo.getCurrentStatus() != null, ProfileTpUser::getCurrentStatus, bo.getCurrentStatus());
-        lqw.eq(bo.getChangeStatus() != null, ProfileTpUser::getChangeStatus, bo.getChangeStatus());
-        return entity2Vo(this.list(lqw));
-    }
-
-    /**
-    * 实体类转化成视图对象
-    *
-    * @param collection 实体类集合
-    * @return
-    */
-    private List<ProfileTpUserVo> entity2Vo(Collection<ProfileTpUser> collection) {
-        List<ProfileTpUserVo> voList = collection.stream()
-                .map(any -> BeanUtil.toBean(any, ProfileTpUserVo.class))
-                .collect(Collectors.toList());
-        if (collection instanceof Page) {
-            Page<ProfileTpUser> page = (Page<ProfileTpUser>)collection;
-            Page<ProfileTpUserVo> pageVo = new Page<>();
-            BeanUtil.copyProperties(page,pageVo);
-            pageVo.addAll(voList);
-            voList = pageVo;
-        }
-        return voList;
-    }
-
-    @Override
-    public Boolean insertByAddBo(ProfileTpUserAddBo bo) {
-        ProfileTpUser add = BeanUtil.toBean(bo, ProfileTpUser.class);
-        validEntityBeforeSave(add);
-        add.setCreateTime(DateUtils.getNowTime());
-        add.setUpdateTime(DateUtils.getNowTime());
-        add.setChangeStatus(0);
-        add.setOneTime(DateUtils.getNowTime());
-        add.setLastTime(DateUtils.getNowTime());
-        add.setUserId(bo.getUserId());
-        add.setCurrentStatus(1L);
-        add.setStatus(2);
-        return this.save(add);
-    }
-
-    @Override
-    public Boolean updateByEditBo(ProfileTpUserEditBo bo) {
-        ProfileTpUser update = BeanUtil.toBean(bo, ProfileTpUser.class);
-        validEntityBeforeSave(update);
-        update.setUpdateTime(DateUtils.getNowTime());
-        return this.updateById(update);
-    }
-
-    /**
-     * 保存前的数据校验
-     *
-     * @param entity 实体类数据
-     */
-    private void validEntityBeforeSave(ProfileTpUser entity){
-        //TODO 做一些数据校验,如唯一约束
-    }
-
-    @Override
-    public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
-        if(isValid){
-            //TODO 做一些业务上的校验,判断是否需要校验
-        }
-        return this.removeByIds(ids);
-    }
-
-    @Override
-    public String filename(ProfileTpUserQueryBo bo) {
-        Word07Writer writer = new Word07Writer();
-
-        // 添加段落(标题)
-        writer.addText(new Font("方正小标宋简体", Font.PLAIN, 22), "我是第一部分", "我是第二部分");
-        // 添加段落(正文)
-        writer.addText(new Font("宋体", Font.PLAIN, 22), "我是正文第一部分", "我是正文第二部分");
-        // 写出到文件
-        writer.flush(FileUtil.file("e:/wordWrite.docx"));
-        // 关闭
-        writer.close();
-        return "11";
-    }
-
-    public static void main(String[] args) {
-
-        Word07Writer writer = new Word07Writer();
-        // 添加段落(标题)
-        writer.addText(new Font("方正小标宋简体", Font.PLAIN, 22), "我是第一部分", "我是第二部分");
-        // 添加段落(标题)居中
-        //writer.addTable(ParagraphAlignment.CENTER,new Font("方正小标宋简体", Font.PLAIN, 15), "18旅游政策法规");
-
-
-        // 写出到文件
-        writer.flush(FileUtil.file("D:\\Download/wordWrite.docx"));
-        // 关闭
-        writer.close();
-    }
-}

+ 111 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/UserProfileServiceImpl.java

@@ -0,0 +1,111 @@
+package com.zhongzheng.modules.base.service.impl;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.StrUtil;
+import com.zhongzheng.common.utils.DateUtils;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.github.pagehelper.Page;
+import com.zhongzheng.modules.base.bo.UserProfileAddBo;
+import com.zhongzheng.modules.base.bo.UserProfileQueryBo;
+import com.zhongzheng.modules.base.bo.UserProfileEditBo;
+import com.zhongzheng.modules.base.domain.UserProfile;
+import com.zhongzheng.modules.base.mapper.UserProfileMapper;
+import com.zhongzheng.modules.base.vo.UserProfileVo;
+import com.zhongzheng.modules.base.service.IUserProfileService;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 填写资料审核Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2021-12-20
+ */
+@Service
+public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserProfile> implements IUserProfileService {
+
+    @Override
+    public UserProfileVo queryById(Long id){
+        UserProfile db = this.baseMapper.selectById(id);
+        return BeanUtil.toBean(db, UserProfileVo.class);
+    }
+
+    @Override
+    public List<UserProfileVo> queryList(UserProfileQueryBo bo) {
+        LambdaQueryWrapper<UserProfile> lqw = Wrappers.lambdaQuery();
+        lqw.eq(bo.getUserId() != null, UserProfile::getUserId, bo.getUserId());
+        lqw.eq(bo.getGoodsId() != null, UserProfile::getGoodsId, bo.getGoodsId());
+        lqw.eq(bo.getStatus() != null, UserProfile::getStatus, bo.getStatus());
+        lqw.eq(bo.getOneTime() != null, UserProfile::getOneTime, bo.getOneTime());
+        lqw.eq(bo.getLastTime() != null, UserProfile::getLastTime, bo.getLastTime());
+        lqw.eq(StrUtil.isNotBlank(bo.getKeyValue()), UserProfile::getKeyValue, bo.getKeyValue());
+        lqw.eq(bo.getCurrentStatus() != null, UserProfile::getCurrentStatus, bo.getCurrentStatus());
+        lqw.eq(bo.getChangeStatus() != null, UserProfile::getChangeStatus, bo.getChangeStatus());
+        return entity2Vo(this.list(lqw));
+    }
+
+    /**
+    * 实体类转化成视图对象
+    *
+    * @param collection 实体类集合
+    * @return
+    */
+    private List<UserProfileVo> entity2Vo(Collection<UserProfile> collection) {
+        List<UserProfileVo> voList = collection.stream()
+                .map(any -> BeanUtil.toBean(any, UserProfileVo.class))
+                .collect(Collectors.toList());
+        if (collection instanceof Page) {
+            Page<UserProfile> page = (Page<UserProfile>)collection;
+            Page<UserProfileVo> pageVo = new Page<>();
+            BeanUtil.copyProperties(page,pageVo);
+            pageVo.addAll(voList);
+            voList = pageVo;
+        }
+        return voList;
+    }
+
+    @Override
+    public Boolean insertByAddBo(UserProfileAddBo bo) {
+        UserProfile add = BeanUtil.toBean(bo, UserProfile.class);
+        validEntityBeforeSave(add);
+        add.setCreateTime(DateUtils.getNowTime());
+        add.setUpdateTime(DateUtils.getNowTime());
+        add.setStatus(2);
+        add.setOneTime(DateUtils.getNowTime());
+        add.setLastTime(DateUtils.getNowTime());
+        add.setCurrentStatus(1L);
+        add.setChangeStatus(1);
+        return this.save(add);
+    }
+
+    @Override
+    public Boolean updateByEditBo(UserProfileEditBo bo) {
+        UserProfile update = BeanUtil.toBean(bo, UserProfile.class);
+        validEntityBeforeSave(update);
+        update.setUpdateTime(DateUtils.getNowTime());
+        return this.updateById(update);
+    }
+
+    /**
+     * 保存前的数据校验
+     *
+     * @param entity 实体类数据
+     */
+    private void validEntityBeforeSave(UserProfile entity){
+        //TODO 做一些数据校验,如唯一约束
+    }
+
+    @Override
+    public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
+        if(isValid){
+            //TODO 做一些业务上的校验,判断是否需要校验
+        }
+        return this.removeByIds(ids);
+    }
+}

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/vo/ProfileTpUserVo.java → zhongzheng-system/src/main/java/com/zhongzheng/modules/base/vo/UserProfileVo.java

@@ -17,7 +17,7 @@ import java.util.Date;
  */
 @Data
 @ApiModel("填写资料审核视图对象")
-public class ProfileTpUserVo {
+public class UserProfileVo {
 	private static final long serialVersionUID = 1L;
 
 	/** $pkColumn.columnComment */

+ 2 - 2
zhongzheng-system/src/main/resources/mapper/modules/base/ProfileTpUserMapper.xml → zhongzheng-system/src/main/resources/mapper/modules/base/UserProfileMapper.xml

@@ -2,9 +2,9 @@
 <!DOCTYPE mapper
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.zhongzheng.modules.basem.mapper.ProfileTpUserMapper">
+<mapper namespace="com.zhongzheng.modules.base.mapper.UserProfileMapper">
 
-    <resultMap type="com.zhongzheng.modules.base.domain.ProfileTpUser" id="ProfileTpUserResult">
+    <resultMap type="com.zhongzheng.modules.base.domain.UserProfile" id="UserProfileResult">
         <result property="id" column="id"/>
         <result property="userId" column="user_id"/>
         <result property="goodsId" column="goods_id"/>