Merge branch 'master' of https://gitee.com/xpecya/reference.git
This commit is contained in:
commit
513fbcb71e
|
|
@ -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>" +
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue