|
|
@@ -19,6 +19,7 @@ import com.goafanti.common.dao.UserMapper;
|
|
|
import com.goafanti.common.dao.UserRoleMapper;
|
|
|
import com.goafanti.common.enums.CertifySubmitType;
|
|
|
import com.goafanti.common.enums.IdentityAuditStatus;
|
|
|
+import com.goafanti.common.enums.IdentityProcess;
|
|
|
import com.goafanti.common.enums.NoticeReadStatus;
|
|
|
import com.goafanti.common.enums.NoticeStatus;
|
|
|
import com.goafanti.common.enums.UserLevel;
|
|
|
@@ -92,14 +93,26 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public int updateUserDetail(UserIdentity u, String saveSign, Integer level) {
|
|
|
+ public int updateUserDetail(UserIdentity u, String saveSign, Integer level, Boolean insertFlag) {
|
|
|
User user = userMapper.selectByPrimaryKey(u.getUid());
|
|
|
- user.setLvl(level);
|
|
|
- userMapper.updateByPrimaryKey(user);
|
|
|
+ if (!UserLevel.GENERAL.getCode().equals(user.getLvl())
|
|
|
+ && !CertifySubmitType.SUBMIT.getCode().equals(saveSign)) {
|
|
|
+ user.setLvl(level);
|
|
|
+ userMapper.updateByPrimaryKey(user);
|
|
|
+ }
|
|
|
if (CertifySubmitType.SUBMIT.getCode().equals(saveSign)) {
|
|
|
createAuditorNotice(user);
|
|
|
}
|
|
|
- return userIdentityMapper.updateByPrimaryKeySelective(u);
|
|
|
+ if (insertFlag) {
|
|
|
+ if (!CertifySubmitType.SUBMIT.getCode().equals(saveSign)) {
|
|
|
+ u.setProcess(IdentityProcess.UNCOMMITTED.getCode());
|
|
|
+ u.setAuditStatus(IdentityAuditStatus.UNCOMMITTED.getCode());
|
|
|
+ }
|
|
|
+ userIdentityMapper.insert(u);
|
|
|
+ } else {
|
|
|
+ userIdentityMapper.updateByPrimaryKeySelective(u);
|
|
|
+ }
|
|
|
+ return 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -139,10 +152,10 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
|
|
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
@Override
|
|
|
- public Pagination<UserSubscriberListBo> listSubscriber(String name, Integer level, String field, Integer province, Integer city,
|
|
|
- Integer area, Integer pNo, Integer pSize) {
|
|
|
+ public Pagination<UserSubscriberListBo> listSubscriber(String name, Integer level, String field, Integer province,
|
|
|
+ Integer city, Integer area, Integer pNo, Integer pSize) {
|
|
|
Map<String, Object> params = new HashMap<>();
|
|
|
-
|
|
|
+
|
|
|
if (StringUtils.isNotBlank(name)) {
|
|
|
params.put("name", name);
|
|
|
}
|
|
|
@@ -158,15 +171,15 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
|
|
|
if (null != province) {
|
|
|
params.put("province", province);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (null != city) {
|
|
|
params.put("city", city);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (null != area) {
|
|
|
params.put("area", area);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (pNo == null || pNo < 0) {
|
|
|
pNo = 1;
|
|
|
}
|