区分江南行和普通白名单

This commit is contained in:
34701892@qq.com 2026-01-06 19:03:39 +08:00
parent f7021c3952
commit b1cf3a6939
5 changed files with 35 additions and 15 deletions

View File

@ -26,8 +26,8 @@ public interface H5UserMapper {
void createH5UserByPhone(@Param("phone") String phone); void createH5UserByPhone(@Param("phone") String phone);
@Insert("<script>" + @Insert("<script>" +
"insert into allowlist_detail(mobile, department, name, create_by, create_time, update_time" + "insert into allowlist_detail(mobile, department, name, create_by, create_time, update_time, type" +
") values (#{mobile}, #{department},#{name}, #{createBy}, now(), now()" + ") values (#{mobile}, #{department},#{name}, #{createBy}, now(), now(), #{type}" +
")" + ")" +
"</script>") "</script>")
void createH5User(H5UserDTO h5UserDTO); void createH5User(H5UserDTO h5UserDTO);
@ -72,6 +72,9 @@ public interface H5UserMapper {
@Select("<script>" + @Select("<script>" +
"select * from allowlist_detail " + "select * from allowlist_detail " +
"<where>" + "<where>" +
"<if test=\"type != null \">" +
" and type = #{type} " +
"</if>" +
"<if test=\"mobile != null and mobile.trim().length() > 0 \">" + "<if test=\"mobile != null and mobile.trim().length() > 0 \">" +
" and mobile = #{mobile} " + " and mobile = #{mobile} " +
"</if>" + "</if>" +
@ -81,7 +84,6 @@ public interface H5UserMapper {
"<if test=\"status != null \">" + "<if test=\"status != null \">" +
" and status = #{status} " + " and status = #{status} " +
"</if>" + "</if>" +
"</where>" + "</where>" +
"order by create_time desc " + "order by create_time desc " +
"limit ${size} offset ${offset}" + "limit ${size} offset ${offset}" +
@ -91,6 +93,9 @@ public interface H5UserMapper {
@Select("<script>" + @Select("<script>" +
"select count(*) from allowlist_detail " + "select count(*) from allowlist_detail " +
"<where>" + "<where>" +
"<if test=\"type != null \">" +
" and type = #{type} " +
"</if>" +
"<if test=\"mobile != null and mobile.trim().length() > 0 \">" + "<if test=\"mobile != null and mobile.trim().length() > 0 \">" +
" and mobile = #{mobile} " + " and mobile = #{mobile} " +
"</if>" + "</if>" +

View File

@ -7,7 +7,8 @@ public class H5UserDTO {
private String department; private String department;
private Integer status; private Integer status;
private String createBy; private String createBy;
private Integer type;
public Long getId() { public Long getId() {
return id; return id;
} }
@ -44,4 +45,11 @@ public class H5UserDTO {
public void setCreateBy(String createBy) { public void setCreateBy(String createBy) {
this.createBy = createBy; this.createBy = createBy;
} }
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
} }

View File

@ -11,7 +11,8 @@ public class H5UserQueryParam {
private String department; private String department;
private Integer status; private Integer status;
private String createBy; private String createBy;
private Integer type;
public int getPage() { public int getPage() {
return page; return page;
} }
@ -72,4 +73,11 @@ public class H5UserQueryParam {
public void setCreateBy(String createBy) { public void setCreateBy(String createBy) {
this.createBy = createBy; this.createBy = createBy;
} }
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
} }

View File

@ -55,7 +55,7 @@ public class H5UserService {
} }
int page = h5UserQueryParam.getPage(); int page = h5UserQueryParam.getPage();
h5UserQueryParam.setOffset(offset); h5UserQueryParam.setOffset(offset);
h5UserQueryParam.setType(1);
List<H5UserVO> h5UserList; List<H5UserVO> h5UserList;
try { try {
h5UserList = h5UserMapper.queryH5User(h5UserQueryParam); h5UserList = h5UserMapper.queryH5User(h5UserQueryParam);
@ -91,6 +91,7 @@ public class H5UserService {
public ResultObject<Void> addOrUpdate(H5UserDTO h5UserDTO) { public ResultObject<Void> addOrUpdate(H5UserDTO h5UserDTO) {
if (h5UserDTO.getId() == null) { if (h5UserDTO.getId() == null) {
h5UserDTO.setType(1);
h5UserMapper.createH5User(h5UserDTO); h5UserMapper.createH5User(h5UserDTO);
} else { } else {
h5UserMapper.updateH5User(h5UserDTO); h5UserMapper.updateH5User(h5UserDTO);
@ -143,6 +144,7 @@ public class H5UserService {
H5UserDTO h5UserDTO = new H5UserDTO(); H5UserDTO h5UserDTO = new H5UserDTO();
BeanUtils.copyProperties(h5UserUploadData, h5UserDTO); BeanUtils.copyProperties(h5UserUploadData, h5UserDTO);
h5UserDTO.setCreateBy(createBy); h5UserDTO.setCreateBy(createBy);
h5UserDTO.setType(1);
h5UserMapper.createH5User(h5UserDTO); h5UserMapper.createH5User(h5UserDTO);
continue; continue;
} }

View File

@ -1,6 +1,3 @@
logging:
level:
root: DEBUG
server: server:
port: 13579 port: 13579
compression: compression:
@ -25,21 +22,21 @@ spring:
# url: jdbc:mysql://192.168.0.142:3306/reference?autoReconnect=true&useUnicode=true&useSSL=false&allowMultiQueries=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai # url: jdbc:mysql://192.168.0.142:3306/reference?autoReconnect=true&useUnicode=true&useSSL=false&allowMultiQueries=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
# username: financial_prod # username: financial_prod
# password: mmTFncqmDal5HLRGY0BV # password: mmTFncqmDal5HLRGY0BV
url: jdbc:mysql://121.37.185.246:3306/reference?autoReconnect=true&useUnicode=true&useSSL=false&allowMultiQueries=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai url: jdbc:mysql://10.127.2.207:3306/reference?autoReconnect=true&useUnicode=true&useSSL=false&allowMultiQueries=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
username: root username: financial_prod
password: Xgf_8000 password: mmTFncqmDal5HLRGY0BV
redis: redis:
# host: 192.168.0.172 # host: 192.168.0.172
# port: 6379 # port: 6379
# password: Xgf_redis # password: Xgf_redis
host: 123.60.153.169 host: 10.127.2.209
port: 6379 port: 6379
password: Xgf_redis password: dMrt4kmwiW6LDJXy
elasticsearch: elasticsearch:
scheme: http scheme: http
# 111.13.176.3 部署地址 # 111.13.176.3 部署地址
# 10.127.2.194 本地测试地址 # 10.127.2.194 本地测试地址
host: 111.13.176.3 host: 10.127.2.194
port: 9200 port: 9200
enable: true enable: true
username: elastic username: elastic