This commit is contained in:
sunflower2014 2026-02-10 16:08:36 +08:00
commit 513fbcb71e
5 changed files with 49 additions and 28 deletions

View File

@ -26,8 +26,8 @@ public interface H5UserMapper {
void createH5UserByPhone(@Param("phone") String phone);
@Insert("<script>" +
"insert into allowlist_detail(mobile, department, name, create_by, create_time, update_time" +
") values (#{mobile}, #{department},#{name}, #{createBy}, now(), now()" +
"insert into allowlist_detail(mobile, department, name, create_by, create_time, update_time, type" +
") values (#{mobile}, #{department},#{name}, #{createBy}, now(), now(), #{type}" +
")" +
"</script>")
void createH5User(H5UserDTO h5UserDTO);
@ -65,11 +65,16 @@ public interface H5UserMapper {
"</script>" )
void updateH5User(H5UserDTO h5UserDTO);
// "<if test=\"createBy != null and createBy.trim().length() > 0 \">" +
// " and create_by = #{createBy} " +
// "</if>" +
@ResultMap("h5UserMap")
@Select("<script>" +
"select * from allowlist_detail " +
"<where>" +
"<if test=\"type != null \">" +
" and type = #{type} " +
"</if>" +
"<if test=\"mobile != null and mobile.trim().length() > 0 \">" +
" and mobile = #{mobile} " +
"</if>" +
@ -79,13 +84,8 @@ public interface H5UserMapper {
"<if test=\"status != null \">" +
" and status = #{status} " +
"</if>" +
"<if test=\"createBy != null and createBy.trim().length() > 0 \">" +
" and create_by = #{createBy} " +
"</if>" +
"</where>" +
"<if test=\"orderBy != null\">" +
"order by ${orderBy} " +
"</if>" +
"order by create_time desc " +
"limit ${size} offset ${offset}" +
"</script>")
List<H5UserVO> queryH5User(H5UserQueryParam h5UserQueryParam);
@ -93,6 +93,9 @@ public interface H5UserMapper {
@Select("<script>" +
"select count(*) from allowlist_detail " +
"<where>" +
"<if test=\"type != null \">" +
" and type = #{type} " +
"</if>" +
"<if test=\"mobile != null and mobile.trim().length() > 0 \">" +
" and mobile = #{mobile} " +
"</if>" +

View File

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

View File

@ -11,6 +11,7 @@ public class H5UserQueryParam {
private String department;
private Integer status;
private String createBy;
private Integer type;
public int getPage() {
return page;
@ -72,4 +73,11 @@ public class H5UserQueryParam {
public void setCreateBy(String 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();
h5UserQueryParam.setOffset(offset);
h5UserQueryParam.setType(1);
List<H5UserVO> h5UserList;
try {
h5UserList = h5UserMapper.queryH5User(h5UserQueryParam);
@ -91,6 +91,7 @@ public class H5UserService {
public ResultObject<Void> addOrUpdate(H5UserDTO h5UserDTO) {
if (h5UserDTO.getId() == null) {
h5UserDTO.setType(1);
h5UserMapper.createH5User(h5UserDTO);
} else {
h5UserMapper.updateH5User(h5UserDTO);
@ -143,6 +144,7 @@ public class H5UserService {
H5UserDTO h5UserDTO = new H5UserDTO();
BeanUtils.copyProperties(h5UserUploadData, h5UserDTO);
h5UserDTO.setCreateBy(createBy);
h5UserDTO.setType(1);
h5UserMapper.createH5User(h5UserDTO);
continue;
}

View File

@ -19,29 +19,29 @@ spring:
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
# 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
# password: mmTFncqmDal5HLRGY0BV
# 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
# password: mmTFncqmDal5HLRGY0BV
url: jdbc:mysql://10.127.2.207:3306/reference?autoReconnect=true&useUnicode=true&useSSL=false&allowMultiQueries=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
username: financial_prod
password: mmTFncqmDal5HLRGY0BV
redis:
# host: 192.168.0.172
# port: 6379
# password: Xgf_redis
# host: 192.168.0.172
# port: 6379
# password: Xgf_redis
host: 10.127.2.209
port: 6379
password: dMrt4kmwiW6LDJXy
elasticsearch:
scheme: http
# 111.13.176.3 部署地址
# 10.127.2.194 本地测试地址
host: 10.127.2.194
port: 9200
enable: true
username: elastic
password: ZxE,3VM@Thk0
scheme: http
# 111.13.176.3 部署地址
# 10.127.2.194 本地测试地址
host: 10.127.2.194
port: 9200
enable: true
username: elastic
password: ZxE,3VM@Thk0
mybatis:
type-handlers-package:com.jinrui.reference.core.typehandler
type-handlers-package:com.jinrui.reference.core.typehandler
api:
key: WBysu6N1z26AbA12l
key: WBysu6N1z26AbA12l