Commit e53b88ba by huangjinxin

修改参数

1 parent 2f4a6e0f
...@@ -707,20 +707,20 @@ public class UserService { ...@@ -707,20 +707,20 @@ public class UserService {
/** /**
* 将map转换为POJO对象 * 将map转换为POJO对象
* *
* @param map map * @param map map
* @return r * @return r
*/ */
public static UserInfoSearch mapConvertToObject(Map<String, Object> map) { public static UserInfoSearch mapConvertToObject(Map<String, Object> map) {
UserInfoSearch search = new UserInfoSearch(); UserInfoSearch search = new UserInfoSearch();
search.setId(map.containsKey("id") ? map.get("id").toString() : null); search.setId(map.containsKey("id") && ObjectUtil.isNotEmpty(map.get("id")) ? map.get("id").toString() : null);
search.setAccount(map.containsKey("account") ? map.get("account").toString() : null); search.setAccount(map.containsKey("account") && ObjectUtil.isNotEmpty(map.get("account")) ? map.get("account").toString() : null);
search.setNickname(map.containsKey("nickname") ? map.get("nickname").toString() : null); search.setNickname(map.containsKey("nickname") && ObjectUtil.isNotEmpty(map.get("nickname")) ? map.get("nickname").toString() : null);
search.setBan(map.containsKey("ban") ? Integer.parseInt(map.get("ban").toString()) : null); search.setBan(map.containsKey("ban") && ObjectUtil.isNotEmpty(map.get("ban")) ? Integer.parseInt(map.get("ban").toString()) : null);
search.setSource(map.containsKey("source") ? Integer.parseInt(map.get("source").toString()) : null); search.setSource(map.containsKey("source") && ObjectUtil.isNotEmpty(map.get("source")) ? Integer.parseInt(map.get("source").toString()) : null);
// search.setEmail(map.containsKey("email") ? map.get("email").toString() : null); search.setEmail(map.containsKey("email") && ObjectUtil.isNotEmpty(map.get("email")) ? map.get("email").toString() : null);
search.setPhone(map.containsKey("phone") ? map.get("phone").toString() : null); search.setPhone(map.containsKey("phone") && ObjectUtil.isNotEmpty(map.get("phone")) ? map.get("phone").toString() : null);
search.setEngineerCode(map.containsKey("engineer_code") ? map.get("engineer_code").toString() : null); search.setEngineerCode(map.containsKey("engineer_code") && ObjectUtil.isNotEmpty(map.get("engineer_code")) ? map.get("engineer_code").toString() : null);
search.setRoleName(map.containsKey("roleName") ? map.get("roleName").toString() : null); search.setRoleName(map.containsKey("roleName") && ObjectUtil.isNotEmpty(map.get("roleName")) ? map.get("roleName").toString() : null);
return search; return search;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!