Commit 681717168b11f292877596ea8c91c5477a4395e6

Authored by weiliwhereareyou@163.com
1 parent 4c2380a3

登录接口和绑定激光推送号 ,T_REGISTER_NO_MAPPER 增加userType字段

mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/RegisterNoMapper.java
@@ -23,6 +23,10 @@ public class RegisterNoMapper extends BaseDomain { @@ -23,6 +23,10 @@ public class RegisterNoMapper extends BaseDomain {
23 */ 23 */
24 private Long userid; 24 private Long userid;
25 /** 25 /**
  26 + * 用户类型:10-买家,20-卖家
  27 + */
  28 + private Integer userType;
  29 + /**
26 * 注册ID 30 * 注册ID
27 */ 31 */
28 private String registerNo; 32 private String registerNo;
@@ -36,6 +40,15 @@ public class RegisterNoMapper extends BaseDomain { @@ -36,6 +40,15 @@ public class RegisterNoMapper extends BaseDomain {
36 */ 40 */
37 private Integer deviceType; 41 private Integer deviceType;
38 42
  43 +
  44 + public Integer getUserType() {
  45 + return userType;
  46 + }
  47 +
  48 + public void setUserType(Integer userType) {
  49 + this.userType = userType;
  50 + }
  51 +
39 public void setUserid(Long userid) { 52 public void setUserid(Long userid) {
40 this.userid = userid; 53 this.userid = userid;
41 } 54 }
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/common/Constant.java
@@ -121,8 +121,11 @@ public class Constant { @@ -121,8 +121,11 @@ public class Constant {
121 /** 121 /**
122 * 用户 122 * 用户
123 */ 123 */
124 - public static final long USER_ROLE_BUYER = 10L;//买家  
125 - public static final long USER_ROLE_SELLER = 20L;//卖家 124 + public static final int USER_ROLE_BUYER = 10;//买家
  125 + public static final int USER_ROLE_SELLER = 20;//卖家
  126 +
  127 + public static final String USER_ROLE_SIGN_BUYER = "buyer";//买家
  128 + public static final String USER_ROLE_SIGN_SELLER = "seller";//卖家
126 public static final int USER_TYPE_PERSONAL = 1; 129 public static final int USER_TYPE_PERSONAL = 1;
127 public static final int USER_TYPE_COMPANY = 2; 130 public static final int USER_TYPE_COMPANY = 2;
128 public static final int USER_AUTH_RESULT_NOTAUTH = 100;//未认证 131 public static final int USER_AUTH_RESULT_NOTAUTH = 100;//未认证
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/user/GetRegisterNoReq.java
@@ -21,15 +21,15 @@ public class GetRegisterNoReq { @@ -21,15 +21,15 @@ public class GetRegisterNoReq {
21 private Long userId; 21 private Long userId;
22 22
23 @ApiModelProperty(value = "用户角色:10买家,20卖家") 23 @ApiModelProperty(value = "用户角色:10买家,20卖家")
24 - private Long userRole; 24 + private Long userType;
25 25
26 26
27 - public Long getUserRole() {  
28 - return userRole; 27 + public Long getUserType() {
  28 + return userType;
29 } 29 }
30 30
31 - public void setUserRole(Long userRole) {  
32 - this.userRole = userRole; 31 + public void setUserType(Long userType) {
  32 + this.userType = userType;
33 } 33 }
34 34
35 public Long getUserId() { 35 public Long getUserId() {
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/user/GetRegisterNobyUidsReq.java
@@ -26,15 +26,15 @@ public class GetRegisterNobyUidsReq { @@ -26,15 +26,15 @@ public class GetRegisterNobyUidsReq {
26 private Integer platform; 26 private Integer platform;
27 27
28 @ApiModelProperty(value = "用户角色:10买家,20卖家") 28 @ApiModelProperty(value = "用户角色:10买家,20卖家")
29 - private Long userRole; 29 + private Long userType;
30 30
31 31
32 - public Long getUserRole() {  
33 - return userRole; 32 + public Long getUserType() {
  33 + return userType;
34 } 34 }
35 35
36 - public void setUserRole(Long userRole) {  
37 - this.userRole = userRole; 36 + public void setUserType(Long userType) {
  37 + this.userType = userType;
38 } 38 }
39 39
40 public List<Long> getUserIds() { 40 public List<Long> getUserIds() {
mobsite-getway-manager/src/main/java/com/diligrp/mobsite/getway/manager/common/RegisterNoMapperManager.java
@@ -32,12 +32,13 @@ public interface RegisterNoMapperManager { @@ -32,12 +32,13 @@ public interface RegisterNoMapperManager {
32 RegisterNoMapper bindRegisterNo(RegisterNoMapper mapper); 32 RegisterNoMapper bindRegisterNo(RegisterNoMapper mapper);
33 void unBindRegisterNo(RegisterNoMapper mapper); 33 void unBindRegisterNo(RegisterNoMapper mapper);
34 34
35 - public List<RegisterNoMapper> getRegisterNo(Long userid); 35 + // public List<RegisterNoMapper> getRegisterNo(Long userid);
36 /** 36 /**
37 * 批量查询 37 * 批量查询
38 * @param baseQuery 38 * @param baseQuery
39 * @return 39 * @return
40 */ 40 */
41 public List<RegisterNoMapper> batchQuery(Map<String, Object> baseQuery); 41 public List<RegisterNoMapper> batchQuery(Map<String, Object> baseQuery);
42 - 42 +
  43 + List<RegisterNoMapper> getRegisterNo(Long userType, Long userId);
43 } 44 }
mobsite-getway-manager/src/main/java/com/diligrp/mobsite/getway/manager/common/impl/RegisterNoMapperManagerImpl.java
@@ -59,9 +59,11 @@ public class RegisterNoMapperManagerImpl implements RegisterNoMapperManager { @@ -59,9 +59,11 @@ public class RegisterNoMapperManagerImpl implements RegisterNoMapperManager {
59 public RegisterNoMapper bindRegisterNo(RegisterNoMapper mapper) { 59 public RegisterNoMapper bindRegisterNo(RegisterNoMapper mapper) {
60 final List<RegisterNoMapper> registerNoMappers = registerNoMapperDao.listByConditionNoYn(new BaseQuery() 60 final List<RegisterNoMapper> registerNoMappers = registerNoMapperDao.listByConditionNoYn(new BaseQuery()
61 .addParam("registerNo", mapper.getRegisterNo()) 61 .addParam("registerNo", mapper.getRegisterNo())
  62 + .addParam("userType", mapper.getUserType()+"")
62 .addParam("sysFlag", mapper.getSysFlag() + "")); 63 .addParam("sysFlag", mapper.getSysFlag() + ""));
63 final List<RegisterNoMapper> otherRegisterNoMappers = findByQuery(new BaseQuery() 64 final List<RegisterNoMapper> otherRegisterNoMappers = findByQuery(new BaseQuery()
64 .addParam("userid", mapper.getUserid().toString()) 65 .addParam("userid", mapper.getUserid().toString())
  66 + .addParam("userType", mapper.getUserType()+"")
65 .addParam("sysFlag", mapper.getSysFlag() + "")); 67 .addParam("sysFlag", mapper.getSysFlag() + ""));
66 if (!Validator.isEmpty(otherRegisterNoMappers)) { 68 if (!Validator.isEmpty(otherRegisterNoMappers)) {
67 for (RegisterNoMapper registerNoMapper : otherRegisterNoMappers) { 69 for (RegisterNoMapper registerNoMapper : otherRegisterNoMappers) {
@@ -75,8 +77,9 @@ public class RegisterNoMapperManagerImpl implements RegisterNoMapperManager { @@ -75,8 +77,9 @@ public class RegisterNoMapperManagerImpl implements RegisterNoMapperManager {
75 if (!Validator.isEmpty(registerNoMappers)) { 77 if (!Validator.isEmpty(registerNoMappers)) {
76 oldMapper = registerNoMappers.get(0); 78 oldMapper = registerNoMappers.get(0);
77 newMapper = new RegisterNoMapper(); 79 newMapper = new RegisterNoMapper();
78 - newMapper.setUserid(mapper.getUserid());  
79 newMapper.setId(oldMapper.getId()); 80 newMapper.setId(oldMapper.getId());
  81 + newMapper.setUserid(mapper.getUserid());
  82 + newMapper.setUserType(mapper.getUserType());
80 newMapper.setRegisterNo(mapper.getRegisterNo()); 83 newMapper.setRegisterNo(mapper.getRegisterNo());
81 newMapper.setSysFlag(mapper.getSysFlag()); 84 newMapper.setSysFlag(mapper.getSysFlag());
82 newMapper.setDeviceType(mapper.getDeviceType()); 85 newMapper.setDeviceType(mapper.getDeviceType());
@@ -87,17 +90,6 @@ public class RegisterNoMapperManagerImpl implements RegisterNoMapperManager { @@ -87,17 +90,6 @@ public class RegisterNoMapperManagerImpl implements RegisterNoMapperManager {
87 }else { 90 }else {
88 return oldMapper; 91 return oldMapper;
89 } 92 }
90 -// if (mapper.getUserid().equals(oldMapper.getUserid())) {  
91 -// return null;  
92 -// }else {  
93 -// newMapper.setUserid(mapper.getUserid());  
94 -// newMapper.setId(oldMapper.getId());  
95 -// newMapper.setRegisterNo(mapper.getRegisterNo());  
96 -// newMapper.setSysFlag(mapper.getSysFlag());  
97 -// newMapper.setDeviceType(mapper.getDeviceType());  
98 -// }  
99 -// update(newMapper);  
100 -// return oldMapper;  
101 } 93 }
102 save(mapper); 94 save(mapper);
103 return null; 95 return null;
@@ -108,6 +100,7 @@ public class RegisterNoMapperManagerImpl implements RegisterNoMapperManager { @@ -108,6 +100,7 @@ public class RegisterNoMapperManagerImpl implements RegisterNoMapperManager {
108 100
109 final List<RegisterNoMapper> registerNoMappers = findByQuery(new BaseQuery() 101 final List<RegisterNoMapper> registerNoMappers = findByQuery(new BaseQuery()
110 .addParam("userid", mapper.getUserid().toString()) 102 .addParam("userid", mapper.getUserid().toString())
  103 + .addParam("userType", mapper.getUserType().toString())
111 .addParam("sysFlag", mapper.getSysFlag() + "")); 104 .addParam("sysFlag", mapper.getSysFlag() + ""));
112 if (!Validator.isEmpty(registerNoMappers)) { 105 if (!Validator.isEmpty(registerNoMappers)) {
113 for (RegisterNoMapper registerNoMapper : registerNoMappers) { 106 for (RegisterNoMapper registerNoMapper : registerNoMappers) {
@@ -117,11 +110,19 @@ public class RegisterNoMapperManagerImpl implements RegisterNoMapperManager { @@ -117,11 +110,19 @@ public class RegisterNoMapperManagerImpl implements RegisterNoMapperManager {
117 } 110 }
118 } 111 }
119 112
120 - @Override  
121 - public List<RegisterNoMapper> getRegisterNo(Long userid) {  
122 - return registerNoMapperDao.getByUserId(userid);  
123 - } 113 + //@Override
  114 + //public List<RegisterNoMapper> getRegisterNo(Long userid) {
  115 + // return registerNoMapperDao.getByUserId(userid);
  116 + //}
124 117
  118 + @Override
  119 + public List<RegisterNoMapper> getRegisterNo(Long userType, Long userId) {
  120 + final List<RegisterNoMapper> registerNoMappers = findByQuery(new BaseQuery()
  121 + .addParam("userid", userId+"")
  122 + .addParam("userType", userType+"")
  123 + );
  124 + return registerNoMappers;
  125 + }
125 126
126 127
127 @Override 128 @Override
@@ -130,4 +131,6 @@ public class RegisterNoMapperManagerImpl implements RegisterNoMapperManager { @@ -130,4 +131,6 @@ public class RegisterNoMapperManagerImpl implements RegisterNoMapperManager {
130 return registerNoMapperDao.batchQuery(baseQuery); 131 return registerNoMapperDao.batchQuery(baseQuery);
131 } 132 }
132 133
  134 +
  135 +
133 } 136 }
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/buyer/user/impl/UserServiceImpl.java
@@ -73,7 +73,7 @@ public class UserServiceImpl implements UserService { @@ -73,7 +73,7 @@ public class UserServiceImpl implements UserService {
73 73
74 if (!Validator.isEmpty(req.getRegisterNo())) { 74 if (!Validator.isEmpty(req.getRegisterNo())) {
75 // 缓存 75 // 缓存
76 - String redisKey = redisUtil.makeKey(RedisKey.USER_REGISTERNO,Constant.USER_ROLE_BUYER+ 76 + String redisKey = redisUtil.makeKey(RedisKey.USER_REGISTERNO,Constant.USER_ROLE_SIGN_BUYER+
77 String.valueOf(resp.getAccountId())); 77 String.valueOf(resp.getAccountId()));
78 78
79 GetRegisterNoResp mappers = redisUtil.getObject(redisKey, 79 GetRegisterNoResp mappers = redisUtil.getObject(redisKey,
@@ -83,6 +83,7 @@ public class UserServiceImpl implements UserService { @@ -83,6 +83,7 @@ public class UserServiceImpl implements UserService {
83 mapper.setRegisterNo(req.getRegisterNo()); 83 mapper.setRegisterNo(req.getRegisterNo());
84 mapper.setSysFlag(RegisterNoMapper.SYS_FLAG_JPUSH); 84 mapper.setSysFlag(RegisterNoMapper.SYS_FLAG_JPUSH);
85 mapper.setUserid(resp.getAccountId()); 85 mapper.setUserid(resp.getAccountId());
  86 + mapper.setUserType(Constant.USER_ROLE_BUYER);
86 mapper.setDeviceType(req.getDeviceType()); 87 mapper.setDeviceType(req.getDeviceType());
87 try { 88 try {
88 //清除当前极光号userid缓存 89 //清除当前极光号userid缓存
@@ -108,7 +109,7 @@ public class UserServiceImpl implements UserService { @@ -108,7 +109,7 @@ public class UserServiceImpl implements UserService {
108 RegisterNoMapper oldmapper = registerNoMapperManager 109 RegisterNoMapper oldmapper = registerNoMapperManager
109 .bindRegisterNo(mapper); 110 .bindRegisterNo(mapper);
110 if (!Validator.isNull(oldmapper)){ 111 if (!Validator.isNull(oldmapper)){
111 - String oldKey = redisUtil.makeKey(RedisKey.USER_REGISTERNO, 112 + String oldKey = redisUtil.makeKey(RedisKey.USER_REGISTERNO,Constant.USER_ROLE_SIGN_BUYER+
112 String.valueOf(oldmapper.getUserid())); 113 String.valueOf(oldmapper.getUserid()));
113 redisUtil.deleteByKey(oldKey); 114 redisUtil.deleteByKey(oldKey);
114 } 115 }
@@ -357,12 +358,13 @@ public class UserServiceImpl implements UserService { @@ -357,12 +358,13 @@ public class UserServiceImpl implements UserService {
357 358
358 String userId = req.getUserId().toString(); 359 String userId = req.getUserId().toString();
359 //先清缓存再清数据库 360 //先清缓存再清数据库
360 - String reNOCache = redisUtil.makeKey(RedisKey.USER_REGISTERNO, Constant.USER_ROLE_BUYER+userId); 361 + String reNOCache = redisUtil.makeKey(RedisKey.USER_REGISTERNO, Constant.USER_ROLE_SIGN_BUYER+userId);
361 362
362 RegisterNoMapper mapper = new RegisterNoMapper(); 363 RegisterNoMapper mapper = new RegisterNoMapper();
363 mapper.setRegisterNo(req.getRegisterNo()); 364 mapper.setRegisterNo(req.getRegisterNo());
364 mapper.setSysFlag(RegisterNoMapper.SYS_FLAG_JPUSH); 365 mapper.setSysFlag(RegisterNoMapper.SYS_FLAG_JPUSH);
365 mapper.setUserid(req.getUserId()); 366 mapper.setUserid(req.getUserId());
  367 + mapper.setUserType(Constant.USER_ROLE_BUYER);
366 mapper.setDeviceType(req.getDeviceType()); 368 mapper.setDeviceType(req.getDeviceType());
367 try { 369 try {
368 redisUtil.deleteByKey(reNOCache); 370 redisUtil.deleteByKey(reNOCache);
@@ -433,18 +435,23 @@ public class UserServiceImpl implements UserService { @@ -433,18 +435,23 @@ public class UserServiceImpl implements UserService {
433 @Override 435 @Override
434 public GetRegisterNoResp getRegisterNo(GetRegisterNoReq req) { 436 public GetRegisterNoResp getRegisterNo(GetRegisterNoReq req) {
435 GetRegisterNoResp resp = new GetRegisterNoResp(); 437 GetRegisterNoResp resp = new GetRegisterNoResp();
436 - if (Validator.isNull(req.getUserId())||Validator.isNull(req.getUserRole())) { 438 + if (Validator.isNull(req.getUserId())||Validator.isNull(req.getUserType())) {
437 resp.setCode(ResultCode.REQUET_PARAMS_ERROR); 439 resp.setCode(ResultCode.REQUET_PARAMS_ERROR);
438 - resp.setMsg("用户ID和用户角色不能为空"); 440 + resp.setMsg("用户ID和用户类型不能为空");
439 return resp; 441 return resp;
440 } 442 }
441 //先从缓存取 443 //先从缓存取
442 - String redisKey = redisUtil.makeKey(RedisKey.USER_REGISTERNO, req.getUserRole()+String.valueOf(req.getUserId())); 444 + String redisKey="";
  445 + if (req.getUserType()==Constant.USER_ROLE_BUYER){
  446 + redisKey = redisUtil.makeKey(RedisKey.USER_REGISTERNO, Constant.USER_ROLE_SIGN_BUYER+String.valueOf(req.getUserId()));
  447 + }else if (req.getUserType()==Constant.USER_ROLE_SELLER){
  448 + redisKey = redisUtil.makeKey(RedisKey.USER_REGISTERNO, Constant.USER_ROLE_SIGN_SELLER+String.valueOf(req.getUserId()));
  449 + }
443 GetRegisterNoResp recache = redisUtil.getObject(redisKey, GetRegisterNoResp.class); 450 GetRegisterNoResp recache = redisUtil.getObject(redisKey, GetRegisterNoResp.class);
444 if (!Validator.isNull(recache) && !Validator.isEmpty(recache.getRegisterNos())) { 451 if (!Validator.isNull(recache) && !Validator.isEmpty(recache.getRegisterNos())) {
445 resp.setRegisterNos(recache.getRegisterNos()); 452 resp.setRegisterNos(recache.getRegisterNos());
446 }else { 453 }else {
447 - List<RegisterNoMapper> mapppers = registerNoMapperManager.getRegisterNo(req.getUserId()); 454 + List<RegisterNoMapper> mapppers = registerNoMapperManager.getRegisterNo(req.getUserType(),req.getUserId());
448 if (!Validator.isEmpty(mapppers)) { 455 if (!Validator.isEmpty(mapppers)) {
449 456
450 resp.setRegisterNos(mapppers); 457 resp.setRegisterNos(mapppers);
@@ -462,6 +469,7 @@ public class UserServiceImpl implements UserService { @@ -462,6 +469,7 @@ public class UserServiceImpl implements UserService {
462 GetRegisterNobyUidsResp resp = new GetRegisterNobyUidsResp(); 469 GetRegisterNobyUidsResp resp = new GetRegisterNobyUidsResp();
463 Map<String, Object> param = new HashMap<String, Object>(); 470 Map<String, Object> param = new HashMap<String, Object>();
464 param.put("userids", req.getUserIds()); 471 param.put("userids", req.getUserIds());
  472 + param.put("userType",req.getUserType());
465 if (!Validator.isNull(req.getPlatform())) { 473 if (!Validator.isNull(req.getPlatform())) {
466 param.put("device_type",req.getPlatform().toString()); 474 param.put("device_type",req.getPlatform().toString());
467 } 475 }
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/seller/impl/SellerUserServiceImpl.java
@@ -74,7 +74,7 @@ public class SellerUserServiceImpl implements SellerUserService { @@ -74,7 +74,7 @@ public class SellerUserServiceImpl implements SellerUserService {
74 74
75 if (!Validator.isEmpty(req.getRegisterNo())) { 75 if (!Validator.isEmpty(req.getRegisterNo())) {
76 // 缓存 76 // 缓存
77 - String redisKey = redisUtil.makeKey(RedisKey.USER_REGISTERNO,Constant.USER_ROLE_SELLER+ 77 + String redisKey = redisUtil.makeKey(RedisKey.USER_REGISTERNO,Constant.USER_ROLE_SIGN_SELLER+
78 String.valueOf(resp.getSellerId())); 78 String.valueOf(resp.getSellerId()));
79 79
80 GetRegisterNoResp mappers = redisUtil.getObject(redisKey, 80 GetRegisterNoResp mappers = redisUtil.getObject(redisKey,
@@ -84,6 +84,7 @@ public class SellerUserServiceImpl implements SellerUserService { @@ -84,6 +84,7 @@ public class SellerUserServiceImpl implements SellerUserService {
84 mapper.setRegisterNo(req.getRegisterNo()); 84 mapper.setRegisterNo(req.getRegisterNo());
85 mapper.setSysFlag(RegisterNoMapper.SYS_FLAG_JPUSH); 85 mapper.setSysFlag(RegisterNoMapper.SYS_FLAG_JPUSH);
86 mapper.setUserid(resp.getSellerId()); 86 mapper.setUserid(resp.getSellerId());
  87 + mapper.setUserType(Constant.USER_ROLE_SELLER);
87 mapper.setDeviceType(req.getDeviceType()); 88 mapper.setDeviceType(req.getDeviceType());
88 try { 89 try {
89 //清除当前极光号userid缓存 90 //清除当前极光号userid缓存
@@ -108,7 +109,7 @@ public class SellerUserServiceImpl implements SellerUserService { @@ -108,7 +109,7 @@ public class SellerUserServiceImpl implements SellerUserService {
108 RegisterNoMapper oldmapper = registerNoMapperManager 109 RegisterNoMapper oldmapper = registerNoMapperManager
109 .bindRegisterNo(mapper); 110 .bindRegisterNo(mapper);
110 if (!Validator.isNull(oldmapper)){ 111 if (!Validator.isNull(oldmapper)){
111 - String oldKey = redisUtil.makeKey(RedisKey.USER_REGISTERNO, 112 + String oldKey = redisUtil.makeKey(RedisKey.USER_REGISTERNO,Constant.USER_ROLE_SIGN_SELLER+
112 String.valueOf(oldmapper.getUserid())); 113 String.valueOf(oldmapper.getUserid()));
113 redisUtil.deleteByKey(oldKey); 114 redisUtil.deleteByKey(oldKey);
114 } 115 }
@@ -327,12 +328,13 @@ public class SellerUserServiceImpl implements SellerUserService { @@ -327,12 +328,13 @@ public class SellerUserServiceImpl implements SellerUserService {
327 328
328 String userId = req.getUserId().toString(); 329 String userId = req.getUserId().toString();
329 //先清缓存再清数据库 330 //先清缓存再清数据库
330 - String reNOCache = redisUtil.makeKey(RedisKey.USER_REGISTERNO, Constant.USER_ROLE_SELLER+userId); 331 + String reNOCache = redisUtil.makeKey(RedisKey.USER_REGISTERNO, Constant.USER_ROLE_SIGN_SELLER+userId);
331 332
332 RegisterNoMapper mapper = new RegisterNoMapper(); 333 RegisterNoMapper mapper = new RegisterNoMapper();
333 mapper.setRegisterNo(req.getRegisterNo()); 334 mapper.setRegisterNo(req.getRegisterNo());
334 mapper.setSysFlag(RegisterNoMapper.SYS_FLAG_JPUSH); 335 mapper.setSysFlag(RegisterNoMapper.SYS_FLAG_JPUSH);
335 mapper.setUserid(req.getUserId()); 336 mapper.setUserid(req.getUserId());
  337 + mapper.setUserType(Constant.USER_ROLE_SELLER);
336 mapper.setDeviceType(req.getDeviceType()); 338 mapper.setDeviceType(req.getDeviceType());
337 try { 339 try {
338 redisUtil.deleteByKey(reNOCache); 340 redisUtil.deleteByKey(reNOCache);
mobsite-getway-web/src/main/resources/mybatis/sqlmap/RegisterNoMapperDao.xml
@@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
7 <result property="registerNo" column="register_no"/> 7 <result property="registerNo" column="register_no"/>
8 <result property="sysFlag" column="sys_flag"/> 8 <result property="sysFlag" column="sys_flag"/>
9 <result property="deviceType" column="device_type"/> 9 <result property="deviceType" column="device_type"/>
  10 + <result property="userType" column="user_type"/>
10 <result property="yn" column="yn"/> 11 <result property="yn" column="yn"/>
11 <result property="created" column="created"/> 12 <result property="created" column="created"/>
12 <result property="modified" column="modified"/> 13 <result property="modified" column="modified"/>
@@ -55,11 +56,13 @@ @@ -55,11 +56,13 @@
55 ,register_no 56 ,register_no
56 ,sys_flag 57 ,sys_flag
57 ,device_type 58 ,device_type
  59 + ,user_type
58 ) VALUES( 60 ) VALUES(
59 #{userid} 61 #{userid}
60 ,#{registerNo} 62 ,#{registerNo}
61 ,#{sysFlag} 63 ,#{sysFlag}
62 ,#{deviceType} 64 ,#{deviceType}
  65 + ,#{userType}
63 ) 66 )
64 ]]> 67 ]]>
65 </insert> 68 </insert>
@@ -88,6 +91,9 @@ @@ -88,6 +91,9 @@
88 <if test="param.userid != null and param.userid != ''"> 91 <if test="param.userid != null and param.userid != ''">
89 and userid = #{param.userid} 92 and userid = #{param.userid}
90 </if> 93 </if>
  94 + <if test="param.userType != null and param.userType != ''">
  95 + and userType = #{param.userType}
  96 + </if>
91 <if test="param.registerNo != null and param.registerNo != ''"> 97 <if test="param.registerNo != null and param.registerNo != ''">
92 and register_no = #{param.registerNo} 98 and register_no = #{param.registerNo}
93 </if> 99 </if>
@@ -126,6 +132,9 @@ @@ -126,6 +132,9 @@
126 <if test="param.userid != null and param.userid != ''"> 132 <if test="param.userid != null and param.userid != ''">
127 and userid = #{param.userid} 133 and userid = #{param.userid}
128 </if> 134 </if>
  135 + <if test="param.userType != null and param.userType != ''">
  136 + and userType = #{param.userType}
  137 + </if>
129 <if test="param.registerNo != null and param.registerNo != ''"> 138 <if test="param.registerNo != null and param.registerNo != ''">
130 and register_no = #{param.registerNo} 139 and register_no = #{param.registerNo}
131 </if> 140 </if>
@@ -170,6 +179,9 @@ @@ -170,6 +179,9 @@
170 <if test="param.userid != null and param.userid != ''"> 179 <if test="param.userid != null and param.userid != ''">
171 and userid = #{param.userid} 180 and userid = #{param.userid}
172 </if> 181 </if>
  182 + <if test="param.userType != null and param.userType != ''">
  183 + and userType = #{param.userType}
  184 + </if>
173 <if test="param.registerNo != null and param.registerNo != ''"> 185 <if test="param.registerNo != null and param.registerNo != ''">
174 and register_no = #{param.registerNo} 186 and register_no = #{param.registerNo}
175 </if> 187 </if>
@@ -212,6 +224,9 @@ @@ -212,6 +224,9 @@
212 #{userid} 224 #{userid}
213 </foreach> 225 </foreach>
214 </if> 226 </if>
  227 + <if test="param.userType != null and param.userType != ''">
  228 + and userType = #{param.userType}
  229 + </if>
215 <if test="device_type != null and device_type != ''"> 230 <if test="device_type != null and device_type != ''">
216 and device_type = #{device_type} 231 and device_type = #{device_type}
217 </if> 232 </if>