增加用户不喜欢列表功能
This commit is contained in:
parent
c22cce2106
commit
ce3a93b935
|
|
@ -0,0 +1,28 @@
|
|||
package com.ruoyi.web.controller.app;
|
||||
|
||||
import com.ruoyi.common.core.domain.Result;
|
||||
import com.ruoyi.system.domain.TbUserBlock;
|
||||
import com.ruoyi.system.service.ITbUserBlockService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@Api(tags = "App*不喜欢列表")
|
||||
@RestController
|
||||
@RequestMapping(value = "/app/block")
|
||||
public class TbUserBlockAppController {
|
||||
|
||||
@Autowired
|
||||
private ITbUserBlockService tbUserBlockService;
|
||||
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "新增不喜欢", httpMethod = "POST")
|
||||
public Result<String> addSave(@RequestBody TbUserBlock tbUserBlock)
|
||||
{
|
||||
tbUserBlockService.insertTbUserBlock(tbUserBlock);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,18 +1,13 @@
|
|||
package com.ruoyi.web.controller.app;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.ruoyi.common.core.domain.Result;
|
||||
import com.ruoyi.system.domain.TbMatchSingleSay;
|
||||
import com.ruoyi.system.domain.TbUserFollow;
|
||||
import com.ruoyi.system.domain.TbUserImg;
|
||||
import com.ruoyi.system.domain.TbUserSingle;
|
||||
import com.ruoyi.system.service.ITbMatchSingleSayService;
|
||||
import com.ruoyi.system.service.ITbUserFollowService;
|
||||
import com.ruoyi.system.service.ITbUserImgService;
|
||||
import com.ruoyi.system.service.ITbUserSingleService;
|
||||
import com.ruoyi.system.domain.*;
|
||||
import com.ruoyi.system.service.*;
|
||||
import com.ruoyi.web.request.UserSingleRecommendReq;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
|
|
@ -24,6 +19,7 @@ import org.springframework.web.bind.annotation.*;
|
|||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>登陆相关接口</p>
|
||||
|
|
@ -46,6 +42,9 @@ public class TbUserSingleAppController {
|
|||
@Autowired
|
||||
private ITbMatchSingleSayService tbMatchSingleSayService;
|
||||
|
||||
@Autowired
|
||||
private ITbUserBlockService tbUserBlockService;
|
||||
|
||||
@ResponseBody
|
||||
@PostMapping("/add")
|
||||
@ApiOperation(value = "填写用户信息", httpMethod = "POST")
|
||||
|
|
@ -138,10 +137,15 @@ public class TbUserSingleAppController {
|
|||
}else {
|
||||
notExcludeSex = recommendReq.getSex();
|
||||
}
|
||||
// 查询当前人的不喜欢列表
|
||||
List<TbUserBlock> tbUserBlocks = tbUserBlockService.lambdaQuery()
|
||||
.eq(TbUserBlock::getTbUserId, userSingle.getUserId()).list();
|
||||
List<Long> blockIds = tbUserBlocks.stream().map(TbUserBlock::getBlockUserId).collect(Collectors.toList());
|
||||
int randomPageNum = 1 + (int) (18 * Math.random());
|
||||
PageHelper.startPage(randomPageNum, pageSize);
|
||||
List<TbUserSingle> list = tbUserSingleService.lambdaQuery()
|
||||
.ne(ObjectUtil.isNotEmpty(notExcludeSex), TbUserSingle::getSex, notExcludeSex)
|
||||
.notIn(CollectionUtil.isNotEmpty(blockIds), TbUserSingle::getUserId, blockIds)
|
||||
.orderByDesc(TbUserSingle::getStatus)
|
||||
.list();
|
||||
list.forEach(model->{
|
||||
|
|
|
|||
|
|
@ -0,0 +1,127 @@
|
|||
package com.ruoyi.web.controller.system;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.system.domain.TbUserBlock;
|
||||
import com.ruoyi.system.service.ITbUserBlockService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 单身用户不喜欢列Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-02-18
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/system/block")
|
||||
public class TbUserBlockController extends BaseController
|
||||
{
|
||||
private String prefix = "system/block";
|
||||
|
||||
@Autowired
|
||||
private ITbUserBlockService tbUserBlockService;
|
||||
|
||||
@RequiresPermissions("system:block:view")
|
||||
@GetMapping()
|
||||
public String block()
|
||||
{
|
||||
return prefix + "/block";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询单身用户不喜欢列列表
|
||||
*/
|
||||
@RequiresPermissions("system:block:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(TbUserBlock tbUserBlock)
|
||||
{
|
||||
startPage();
|
||||
List<TbUserBlock> list = tbUserBlockService.selectTbUserBlockList(tbUserBlock);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出单身用户不喜欢列列表
|
||||
*/
|
||||
@RequiresPermissions("system:block:export")
|
||||
@Log(title = "单身用户不喜欢列", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(TbUserBlock tbUserBlock)
|
||||
{
|
||||
List<TbUserBlock> list = tbUserBlockService.selectTbUserBlockList(tbUserBlock);
|
||||
ExcelUtil<TbUserBlock> util = new ExcelUtil<TbUserBlock>(TbUserBlock.class);
|
||||
return util.exportExcel(list, "单身用户不喜欢列数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增单身用户不喜欢列
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存单身用户不喜欢列
|
||||
*/
|
||||
@RequiresPermissions("system:block:add")
|
||||
@Log(title = "单身用户不喜欢列", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(TbUserBlock tbUserBlock)
|
||||
{
|
||||
return toAjax(tbUserBlockService.insertTbUserBlock(tbUserBlock));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改单身用户不喜欢列
|
||||
*/
|
||||
@RequiresPermissions("system:block:edit")
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||
{
|
||||
TbUserBlock tbUserBlock = tbUserBlockService.selectTbUserBlockById(id);
|
||||
mmap.put("tbUserBlock", tbUserBlock);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存单身用户不喜欢列
|
||||
*/
|
||||
@RequiresPermissions("system:block:edit")
|
||||
@Log(title = "单身用户不喜欢列", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(TbUserBlock tbUserBlock)
|
||||
{
|
||||
return toAjax(tbUserBlockService.updateTbUserBlock(tbUserBlock));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除单身用户不喜欢列
|
||||
*/
|
||||
@RequiresPermissions("system:block:remove")
|
||||
@Log(title = "单身用户不喜欢列", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(tbUserBlockService.deleteTbUserBlockByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -310,6 +310,8 @@ public class ShiroConfig
|
|||
filterChainDefinitionMap.put("/app/img/**", "anon");
|
||||
// app关注接口
|
||||
filterChainDefinitionMap.put("/app/follow/**", "anon");
|
||||
// app不喜欢接口
|
||||
filterChainDefinitionMap.put("/app/block/**", "anon");
|
||||
// app支付接口
|
||||
filterChainDefinitionMap.put("/app/matchOrder/**", "anon");
|
||||
// app合伙人推荐接口
|
||||
|
|
|
|||
|
|
@ -0,0 +1,39 @@
|
|||
package com.ruoyi.system.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 单身用户不喜欢列对象 tb_user_block
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-02-18
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "单身用户不喜欢")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName(value = "tb_user_block")
|
||||
public class TbUserBlock extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 当前用户id */
|
||||
@Excel(name = "当前用户id")
|
||||
@ApiModelProperty(value = "当前用户id")
|
||||
private Long tbUserId;
|
||||
|
||||
/** 不喜欢用户id */
|
||||
@Excel(name = "不喜欢用户id")
|
||||
@ApiModelProperty(value = "不喜欢用户id")
|
||||
private Long blockUserId;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -48,6 +48,10 @@ public class TbUserSingle extends BaseEntity
|
|||
@ApiModelProperty(value = "微信账号")
|
||||
private String wxNumber;
|
||||
|
||||
@Excel(name = "微信状态")
|
||||
@ApiModelProperty(value = "微信状态 1.开启 0/空.关闭")
|
||||
private String wxStatus;
|
||||
|
||||
/** 真实姓名 */
|
||||
@Excel(name = "真实姓名")
|
||||
@ApiModelProperty(value = "真实姓名")
|
||||
|
|
|
|||
|
|
@ -0,0 +1,62 @@
|
|||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.TbUserBlock;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 单身用户不喜欢列Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-02-18
|
||||
*/
|
||||
public interface TbUserBlockMapper extends BaseMapper<TbUserBlock>
|
||||
{
|
||||
/**
|
||||
* 查询单身用户不喜欢列
|
||||
*
|
||||
* @param id 单身用户不喜欢列主键
|
||||
* @return 单身用户不喜欢列
|
||||
*/
|
||||
public TbUserBlock selectTbUserBlockById(Long id);
|
||||
|
||||
/**
|
||||
* 查询单身用户不喜欢列列表
|
||||
*
|
||||
* @param tbUserBlock 单身用户不喜欢列
|
||||
* @return 单身用户不喜欢列集合
|
||||
*/
|
||||
public List<TbUserBlock> selectTbUserBlockList(TbUserBlock tbUserBlock);
|
||||
|
||||
/**
|
||||
* 新增单身用户不喜欢列
|
||||
*
|
||||
* @param tbUserBlock 单身用户不喜欢列
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTbUserBlock(TbUserBlock tbUserBlock);
|
||||
|
||||
/**
|
||||
* 修改单身用户不喜欢列
|
||||
*
|
||||
* @param tbUserBlock 单身用户不喜欢列
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTbUserBlock(TbUserBlock tbUserBlock);
|
||||
|
||||
/**
|
||||
* 删除单身用户不喜欢列
|
||||
*
|
||||
* @param id 单身用户不喜欢列主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTbUserBlockById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除单身用户不喜欢列
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTbUserBlockByIds(String[] ids);
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.TbUserBlock;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 单身用户不喜欢列Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-02-18
|
||||
*/
|
||||
public interface ITbUserBlockService extends IService<TbUserBlock>
|
||||
{
|
||||
/**
|
||||
* 查询单身用户不喜欢列
|
||||
*
|
||||
* @param id 单身用户不喜欢列主键
|
||||
* @return 单身用户不喜欢列
|
||||
*/
|
||||
public TbUserBlock selectTbUserBlockById(Long id);
|
||||
|
||||
/**
|
||||
* 查询单身用户不喜欢列列表
|
||||
*
|
||||
* @param tbUserBlock 单身用户不喜欢列
|
||||
* @return 单身用户不喜欢列集合
|
||||
*/
|
||||
public List<TbUserBlock> selectTbUserBlockList(TbUserBlock tbUserBlock);
|
||||
|
||||
/**
|
||||
* 新增单身用户不喜欢列
|
||||
*
|
||||
* @param tbUserBlock 单身用户不喜欢列
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTbUserBlock(TbUserBlock tbUserBlock);
|
||||
|
||||
/**
|
||||
* 修改单身用户不喜欢列
|
||||
*
|
||||
* @param tbUserBlock 单身用户不喜欢列
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTbUserBlock(TbUserBlock tbUserBlock);
|
||||
|
||||
/**
|
||||
* 批量删除单身用户不喜欢列
|
||||
*
|
||||
* @param ids 需要删除的单身用户不喜欢列主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTbUserBlockByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除单身用户不喜欢列信息
|
||||
*
|
||||
* @param id 单身用户不喜欢列主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTbUserBlockById(Long id);
|
||||
}
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.TbUserBlockMapper;
|
||||
import com.ruoyi.system.domain.TbUserBlock;
|
||||
import com.ruoyi.system.service.ITbUserBlockService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* 单身用户不喜欢列Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-02-18
|
||||
*/
|
||||
@Service
|
||||
public class TbUserBlockServiceImpl extends ServiceImpl<TbUserBlockMapper, TbUserBlock> implements ITbUserBlockService
|
||||
{
|
||||
@Autowired
|
||||
private TbUserBlockMapper tbUserBlockMapper;
|
||||
|
||||
/**
|
||||
* 查询单身用户不喜欢列
|
||||
*
|
||||
* @param id 单身用户不喜欢列主键
|
||||
* @return 单身用户不喜欢列
|
||||
*/
|
||||
@Override
|
||||
public TbUserBlock selectTbUserBlockById(Long id)
|
||||
{
|
||||
return tbUserBlockMapper.selectTbUserBlockById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询单身用户不喜欢列列表
|
||||
*
|
||||
* @param tbUserBlock 单身用户不喜欢列
|
||||
* @return 单身用户不喜欢列
|
||||
*/
|
||||
@Override
|
||||
public List<TbUserBlock> selectTbUserBlockList(TbUserBlock tbUserBlock)
|
||||
{
|
||||
return tbUserBlockMapper.selectTbUserBlockList(tbUserBlock);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增单身用户不喜欢列
|
||||
*
|
||||
* @param tbUserBlock 单身用户不喜欢列
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertTbUserBlock(TbUserBlock tbUserBlock)
|
||||
{
|
||||
tbUserBlock.setCreateTime(DateUtils.getNowDate());
|
||||
return tbUserBlockMapper.insertTbUserBlock(tbUserBlock);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改单身用户不喜欢列
|
||||
*
|
||||
* @param tbUserBlock 单身用户不喜欢列
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateTbUserBlock(TbUserBlock tbUserBlock)
|
||||
{
|
||||
tbUserBlock.setUpdateTime(DateUtils.getNowDate());
|
||||
return tbUserBlockMapper.updateTbUserBlock(tbUserBlock);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除单身用户不喜欢列
|
||||
*
|
||||
* @param ids 需要删除的单身用户不喜欢列主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTbUserBlockByIds(String ids)
|
||||
{
|
||||
return tbUserBlockMapper.deleteTbUserBlockByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除单身用户不喜欢列信息
|
||||
*
|
||||
* @param id 单身用户不喜欢列主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTbUserBlockById(Long id)
|
||||
{
|
||||
return tbUserBlockMapper.deleteTbUserBlockById(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
<?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.ruoyi.system.mapper.TbUserBlockMapper">
|
||||
|
||||
<resultMap type="TbUserBlock" id="TbUserBlockResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="tbUserId" column="tb_user_id" />
|
||||
<result property="blockUserId" column="block_user_id" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectTbUserBlockVo">
|
||||
select id, tb_user_id, block_user_id, create_time, update_time, remark from tb_user_block
|
||||
</sql>
|
||||
|
||||
<select id="selectTbUserBlockList" parameterType="TbUserBlock" resultMap="TbUserBlockResult">
|
||||
<include refid="selectTbUserBlockVo"/>
|
||||
<where>
|
||||
<if test="tbUserId != null "> and tb_user_id = #{tbUserId}</if>
|
||||
<if test="blockUserId != null "> and block_user_id = #{blockUserId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectTbUserBlockById" parameterType="Long" resultMap="TbUserBlockResult">
|
||||
<include refid="selectTbUserBlockVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertTbUserBlock" parameterType="TbUserBlock" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into tb_user_block
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="tbUserId != null">tb_user_id,</if>
|
||||
<if test="blockUserId != null">block_user_id,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="tbUserId != null">#{tbUserId},</if>
|
||||
<if test="blockUserId != null">#{blockUserId},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateTbUserBlock" parameterType="TbUserBlock">
|
||||
update tb_user_block
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="tbUserId != null">tb_user_id = #{tbUserId},</if>
|
||||
<if test="blockUserId != null">block_user_id = #{blockUserId},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteTbUserBlockById" parameterType="Long">
|
||||
delete from tb_user_block where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteTbUserBlockByIds" parameterType="String">
|
||||
delete from tb_user_block where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -32,10 +32,17 @@
|
|||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="wxNumber" column="wx_number" />
|
||||
<result property="wxStatus" column="wx_status" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectTbUserSingleVo">
|
||||
select id, user_id, nick_name, real_name, sex, status, birthday, height, weight, education, school, marriage, job, income, native_place, work_place, province_id, city_id, house_property, car_property, self_introduce, family_background, hobby, choosing_standard, create_time, update_time, remark from tb_user_single
|
||||
select id, user_id, nick_name,
|
||||
real_name, sex, status, birthday, height, weight,
|
||||
education, school, marriage, job, income, native_place,
|
||||
work_place, province_id, city_id, house_property, car_property,
|
||||
self_introduce, family_background, hobby, choosing_standard, create_time,
|
||||
update_time, remark, wx_number, wx_status from tb_user_single
|
||||
</sql>
|
||||
|
||||
<select id="selectTbUserSingleList" parameterType="TbUserSingle" resultMap="TbUserSingleResult">
|
||||
|
|
@ -115,6 +122,8 @@
|
|||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="wxNumber != null">wx_number,</if>
|
||||
<if test="wxStatus != null">wx_status,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
|
|
@ -141,6 +150,8 @@
|
|||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="wxNumber != null">#{wxNumber},</if>
|
||||
<if test="wxStatus != null">#{wxStatus},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
|
@ -152,6 +163,8 @@
|
|||
<if test="realName != null">real_name = #{realName},</if>
|
||||
<if test="sex != null">sex = #{sex},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="wxNumber != null">wx_number = #{wxNumber},</if>
|
||||
<if test="wxStatus != null">wx_status = #{wxStatus},</if>
|
||||
<if test="birthday != null">birthday = #{birthday},</if>
|
||||
<if test="height != null">height = #{height},</if>
|
||||
<if test="weight != null">weight = #{weight},</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue