Merge remote-tracking branch 'origin/master'

This commit is contained in:
jjLv 2025-04-29 09:49:03 +08:00
commit 3f4ed89707
9 changed files with 22 additions and 10 deletions

View File

@ -1,8 +1,8 @@
package com.bonus.common.houqin.constant;
public enum DelFlagEnum {
DEL_TRUE(2, "删除"),
DEL_FALSE(0, "正常");
DEL_FALSE(0, "正常"),
DEL_TRUE(2, "删除");
private final Integer key;
private final String value;

View File

@ -18,6 +18,8 @@ public interface AllocAreaMapper {
*/
public AllocArea selectAllocAreaByAreaId(Long areaId);
public AllocArea selectAllocAreaByAreaName(String areaName);
/**
* 查询区域列表
*

View File

@ -3,6 +3,7 @@ package com.bonus.canteen.core.alloc.service.impl;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
import com.bonus.canteen.core.common.domain.TreeSelect;
import com.bonus.canteen.core.alloc.mapper.AllocAreaMapper;
@ -63,9 +64,13 @@ public class AllocAreaServiceImpl implements IAllocAreaService {
public int insertAllocArea(AllocArea allocArea) {
allocArea.setCreateTime(DateUtils.getNowDate());
try {
AllocArea checkResult = allocAreaMapper.selectAllocAreaByAreaName(allocArea.getAreaName());
if (Objects.nonNull(checkResult)) {
throw new ServiceException("区域名称已存在");
}
return allocAreaMapper.insertAllocArea(allocArea);
} catch (Exception e) {
throw new ServiceException("错误信息描述");
throw new ServiceException("新增异常," + e.getMessage());
}
}

View File

@ -432,7 +432,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{accStatus}
</foreach>
<if test="accountInfoQueryParam.searchValue != null and accountInfoQueryParam.searchValue != ''">
and (t2.nick_name = #{accountInfoQueryParam.searchValue}
and (t2.nick_name like CONCAT('%',#{accountInfoQueryParam.searchValue},'%')
or t2.phonenumber = #{encryptedSearchValue}
)
</if>

View File

@ -35,7 +35,7 @@
and aop.create_by like #{param.createBy}
</if>
<if test="param.searchValue != null and param.searchValue != '' ">
and (su.nick_name = #{param.searchValue}
and (su.nick_name like CONCAT('%',#{param.searchValue},'%')
or su.phonenumber = #{encryptedSearchValue}
)
</if>

View File

@ -264,7 +264,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</if>
<if test="param.searchValue != null and param.searchValue != ''">
and (su.nick_name = #{param.searchValue}
and (su.nick_name like CONCAT('%',#{param.searchValue},'%')
or su.phonenumber = #{encryptedSearchValue}
or su.user_id like CONCAT('%',#{param.searchValue},'%')
)

View File

@ -42,6 +42,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where area_id = #{areaId}
</select>
<select id="selectAllocAreaByAreaName" parameterType="String" resultMap="AllocAreaResult">
<include refid="selectAllocAreaVo"/>
where area_name = #{areaName}
</select>
<insert id="insertAllocArea" parameterType="com.bonus.canteen.core.alloc.domain.AllocArea" useGeneratedKeys="true" keyProperty="areaId">
insert into alloc_area
<trim prefix="(" suffix=")" suffixOverrides=",">

View File

@ -41,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and atwd.trade_time <![CDATA[ >= ]]> #{param.startDateTime}
and atwd.trade_time <![CDATA[ <= ]]> #{param.endDateTime}
<if test="param.searchValue != null and param.searchValue != ''">
and (su.nick_name = #{param.searchValue}
and (su.nick_name like CONCAT('%',#{param.searchValue},'%')
or su.user_id like CONCAT('%',#{param.searchValue},'%')
)
</if>
@ -205,7 +205,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where
1 = 1
<if test="param.searchValue != null and param.searchValue != ''">
and (b.nick_name = #{param.searchValue}
and (b.nick_name like CONCAT('%',#{param.searchValue},'%')
or b.phonenumber = #{encryptedSearchValue}
or c.user_id like CONCAT('%',#{param.searchValue},'%')
)

View File

@ -47,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
<if test="param.searchValue != null and param.searchValue != ''">
and (
su.nick_name = #{param.searchValue}
su.nick_name like CONCAT('%',#{param.searchValue},'%')
or su.phonenumber = #{encryptedSearchValue}
or su.user_id like concat('%', #{param.searchValue}, '%')
)
@ -311,7 +311,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
<if test="param.searchValue != null and param.searchValue != ''">
and (
su.nick_name = #{param.searchValue}
su.nick_name like CONCAT('%',#{param.searchValue},'%')
or su.phonenumber = #{encryptedSearchValue}
or su.user_id like concat('%', #{param.searchValue}, '%')
)