fanli/src/main/java/com/yeshi/fanli/controller/admin/UserInfoAdminController.java
@@ -1158,7 +1158,7 @@ forbiddenUserIdentifyCode.setIdentifyCode(currentInfo.getWxUnionId()); forbiddenUserIdentifyCode.setBeiZhu(currentInfo.getWxName()); try { forbiddenUserIdentifyCodeService.addIdentifyCode(forbiddenUserIdentifyCode); forbiddenUserIdentifyCodeService.forbiddenIdentifyCode(forbiddenUserIdentifyCode); } catch (ForbiddenUserIdentifyCodeException e) { e.printStackTrace(); } @@ -1168,7 +1168,7 @@ forbiddenUserIdentifyCode.setType(ForbiddenUserIdentifyCodeTypeEnum.phone); forbiddenUserIdentifyCode.setIdentifyCode(currentInfo.getPhone()); try { forbiddenUserIdentifyCodeService.addIdentifyCode(forbiddenUserIdentifyCode); forbiddenUserIdentifyCodeService.forbiddenIdentifyCode(forbiddenUserIdentifyCode); } catch (ForbiddenUserIdentifyCodeException e) { e.printStackTrace(); } @@ -1180,7 +1180,7 @@ forbiddenUserIdentifyCode.setType(ForbiddenUserIdentifyCodeTypeEnum.taobaoUid); forbiddenUserIdentifyCode.setIdentifyCode(taoBao.getTaoBaoUid()); try { forbiddenUserIdentifyCodeService.addIdentifyCode(forbiddenUserIdentifyCode); forbiddenUserIdentifyCodeService.forbiddenIdentifyCode(forbiddenUserIdentifyCode); } catch (ForbiddenUserIdentifyCodeException e) { e.printStackTrace(); } @@ -1196,7 +1196,7 @@ forbiddenUserIdentifyCode.setIdentifyCode(ba.getAccount()); forbiddenUserIdentifyCode.setBeiZhu(ba.getName()); try { forbiddenUserIdentifyCodeService.addIdentifyCode(forbiddenUserIdentifyCode); forbiddenUserIdentifyCodeService.forbiddenIdentifyCode(forbiddenUserIdentifyCode); } catch (ForbiddenUserIdentifyCodeException e) { e.printStackTrace(); } @@ -1288,8 +1288,9 @@ @RequestMapping(value = "saveForbiddenInfo") public void saveForbiddenInfo(String callback, String code, Integer type, PrintWriter out) { try { if (code == null || code.trim().length() == 0 || type == null) { if (code == null || code.trim().length() == 0 || type == null ||"NULL".equalsIgnoreCase(code)) { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("参数不能为空")); return; } forbiddenUserIdentifyCodeService.saveForbiddenInfo(code, type); fanli/src/main/java/com/yeshi/fanli/mapping/UserInfoMapper.xml
@@ -64,11 +64,12 @@ <result column="totalOrder" property="totalOrder" jdbcType="BIGINT" /> <result column="monthOrder" property="monthOrder" jdbcType="BIGINT" /> <result column="taoBaoUid" property="taoBaoUid" jdbcType="VARCHAR" /> <result column="f_wxUnionId" property="f_wxUnionId" jdbcType="VARCHAR" /> <result column="f_taobaoUid" property="f_taobaoUid" jdbcType="VARCHAR" /> <result column="f_phone" property="f_phone" jdbcType="VARCHAR" /> <result column="f_alipayAccount" property="f_alipayAccount" jdbcType="VARCHAR" /> <result column="wxUnionIdInvalid" property="wxUnionIdInvalid" jdbcType="VARCHAR" /> <result column="taobaoUidInvalid" property="taobaoUidInvalid" jdbcType="VARCHAR" /> <result column="phoneInvalid" property="phoneInvalid" jdbcType="VARCHAR" /> <result column="alipayAccountInvalid" property="alipayAccountInvalid" jdbcType="VARCHAR" /> </resultMap> @@ -264,17 +265,19 @@ LEFT JOIN yeshi_ec_binding_account b ON u.`id` = b.`uid` LEFT JOIN yeshi_ec_user_info_extra ext ON u.`id` = ext.uie_uid LEFT JOIN yeshi_ec_user_rank rak ON rak.ur_id = ext.uie_rank_id LEFT JOIN yeshi_ec_user_info_extra_taobao tb ON tb.`uiet_uid` = u.id <if test="userState == 2"> <!-- 封禁用户 --> LEFT JOIN (SELECT A.uid AS buid,MAX(A.f_wxUnionId) AS f_wxUnionId ,MAX(A.f_taobaoUid) AS f_taobaoUid,MAX(A.f_phone) AS f_phone,MAX(A.f_alipayAccount) AS f_alipayAccount FROM (SELECT A.uid AS buid,MAX(A.f_wxUnionId) AS wxUnionIdInvalid ,MAX(A.f_taobaoUid) AS taobaoUidInvalid,MAX(A.f_phone) AS phoneInvalid,MAX(A.f_alipayAccount) AS alipayAccountInvalid FROM (SELECT u.`id`AS uid,b.account AS alipayAccount,b.name AS alipayAccountName,fu.* FROM yeshi_ec_user u LEFT JOIN yeshi_ec_binding_account b ON b.`uid` = u.`id` LEFT JOIN yeshi_ec_user_info_extra_taobao tb ON tb.`uiet_uid` = u.id LEFT JOIN (SELECT fc.fuc_effective,IF(fc.`fuc_type` = 'wxUnionId',fc.`fuc_identify_code`,NULL)AS f_wxUnionId, IF(fc.`fuc_type` = 'taobaoUid',fc.`fuc_identify_code`,NULL)AS f_taobaoUid, IF(fc.`fuc_type` = 'phone',fc.`fuc_identify_code`,NULL)AS f_phone, IF(fc.`fuc_type` = 'alipayAccount',fc.`fuc_identify_code`,NULL)AS f_alipayAccount FROM yeshi_ec_forbidden_user_identify_code fc)fu ON (fu.f_wxUnionId = u.`wx_union_id` OR fu.f_taobaoUid = u.`identifycode` OR fu.f_phone = u.`phone` OR fu.f_alipayAccount = b.`account`) FROM yeshi_ec_forbidden_user_identify_code fc)fu ON (fu.f_wxUnionId = u.`wx_union_id` OR fu.f_taobaoUid = tb.`uiet_taobao_uid` OR fu.f_phone = u.`phone` OR fu.f_alipayAccount = b.`account`) WHERE b.`type`= 1 AND fu.fuc_effective = 1 )A GROUP BY A.uid) B ON u.id= B.buid </if> fanli/src/main/java/com/yeshi/fanli/service/impl/user/ForbiddenUserIdentifyCodeServiceImpl.java
@@ -21,15 +21,16 @@ private ForbiddenUserIdentifyCodeMapper forbiddenUserIdentifyCodeMapper; @Override public void addIdentifyCode(ForbiddenUserIdentifyCode identifyCode) throws ForbiddenUserIdentifyCodeException { public void forbiddenIdentifyCode(ForbiddenUserIdentifyCode identifyCode) throws ForbiddenUserIdentifyCodeException { if (identifyCode == null || identifyCode.getType() == null || StringUtil.isNullOrEmpty(identifyCode.getIdentifyCode())) throw new ForbiddenUserIdentifyCodeException(1, "信息不完整"); ForbiddenUserIdentifyCode old = listByTypeAndIdentifyCode(identifyCode.getType(), identifyCode.getIdentifyCode()); if (old != null) throw new ForbiddenUserIdentifyCodeException(2, "信息已存在"); if (old != null) { identifyCode.setId(old.getId()); } identifyCode.setCreateTime(new Date()); identifyCode.setEffective(true); @@ -82,12 +83,9 @@ typeEnum = ForbiddenUserIdentifyCodeTypeEnum.alipayAccount; break; default: break; throw new ForbiddenUserIdentifyCodeException(1, "类型不匹配"); } if (typeEnum == null) { throw new ForbiddenUserIdentifyCodeException(1, "类型不匹配"); } ForbiddenUserIdentifyCode codeObject = listByTypeAndIdentifyCode(typeEnum ,identifyCode); if (codeObject == null) { @@ -101,8 +99,17 @@ forbiddenUserIdentifyCodeMapper.insertSelective(codeObject); } else { // 解封 codeObject.setEffective(false); Boolean effective = codeObject.getEffective(); if (effective) { // 解封 codeObject.setEffective(false); } else { // 封禁 codeObject.setEffective(true); } codeObject.setUpdateTime(new Date()); forbiddenUserIdentifyCodeMapper.updateByPrimaryKeySelective(codeObject); } fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserInfoServiceImpl.java
@@ -45,6 +45,7 @@ import com.yeshi.fanli.service.inter.count.HongBaoV2CountService; import com.yeshi.fanli.service.inter.hongbao.ThreeSaleSerivce; import com.yeshi.fanli.service.inter.user.UserInfoService; import com.yeshi.fanli.service.inter.user.UserRankService; import com.yeshi.fanli.util.Constant; import com.yeshi.fanli.util.StringUtil; import com.yeshi.fanli.util.ThreadUtil; @@ -89,6 +90,10 @@ @Resource private HongBaoV2CountService hongBaoV2CountService; @Resource private UserRankService userRankService; public UserInfo getUserByLoginTypeAndOpenId(int loginType, String openid, String appid) { List<UserInfo> list = null; @@ -644,7 +649,7 @@ if (userList == null || userList.size() == 0) { return null; } for (UserInfoVO userInfoVO : userList) { // 数据加工处理 convertUserInfoVOData(userInfoVO); @@ -654,22 +659,29 @@ } public void convertUserInfoVOData(UserInfoVO userInfoVO) { String f_alipayAccount = userInfoVO.getF_alipayAccount(); String rankName = userInfoVO.getRankName(); if (rankName == null || rankName.trim().length() == 0) { userInfoVO.setRankName("青铜"); userInfoVO.setRankPicture("http://img.flqapp.com/resource/rank/rank_picture_new_1.png"); } String f_alipayAccount = userInfoVO.getAlipayAccountInvalid(); if (f_alipayAccount != null && f_alipayAccount.trim().length() > 0) { userInfoVO.setAlipayAccountState(1); } String f_phone = userInfoVO.getF_phone(); String f_phone = userInfoVO.getPhoneInvalid(); if (f_phone != null && f_phone.trim().length() > 0) { userInfoVO.setPhoneState(1); } String f_taobaoUid = userInfoVO.getF_taobaoUid(); String f_taobaoUid = userInfoVO.getTaobaoUidInvalid(); if (f_taobaoUid != null && f_taobaoUid.trim().length() > 0) { userInfoVO.setTaobaoUidState(1); } String f_wxUnionId = userInfoVO.getF_wxUnionId(); String f_wxUnionId = userInfoVO.getWxUnionIdInvalid(); if (f_wxUnionId != null && f_wxUnionId.trim().length() > 0) { userInfoVO.setWxUnionIdState(1); } @@ -680,9 +692,20 @@ userInfoVO.setLastLoginTime(null); } String wxUnionId = userInfoVO.getWxUnionId(); if (wxUnionId == null || wxUnionId.trim().length() == 0) { userInfoVO.setWxName(null); } String taoBaoUid = userInfoVO.getTaoBaoUid(); if (taoBaoUid == null || taoBaoUid.trim().length() == 0) { userInfoVO.setTbName(null); } Long uid = userInfoVO.getId(); /* 绑定收款账号信息 */ List<BindingAccount> account = bindingAccountMapper.selectByUid(uid); if (account != null && account.size() > 0) { fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserRankServiceImpl.java
@@ -20,4 +20,9 @@ public List<UserRank> getAllRank(){ return userRankMapper.getAllRank(); } @Override public UserRank getbyRankName(String rankName){ return userRankMapper.getbyRankName(rankName); } } fanli/src/main/java/com/yeshi/fanli/service/inter/user/ForbiddenUserIdentifyCodeService.java
@@ -7,12 +7,12 @@ public interface ForbiddenUserIdentifyCodeService { /** * 添加禁止标识 * 封禁账号 * * @param identifyCode * @throws ForbiddenUserIdentifyCodeException */ public void addIdentifyCode(ForbiddenUserIdentifyCode identifyCode) throws ForbiddenUserIdentifyCodeException; public void forbiddenIdentifyCode(ForbiddenUserIdentifyCode identifyCode) throws ForbiddenUserIdentifyCodeException; /** * 通过类型与唯一标识获取列表 fanli/src/main/java/com/yeshi/fanli/service/inter/user/UserRankService.java
@@ -11,5 +11,12 @@ * @return */ public List<UserRank> getAllRank(); /** * 根据等级名称查询 * @param rankName * @return */ public UserRank getbyRankName(String rankName); } fanli/src/main/java/com/yeshi/fanli/vo/user/UserInfoVO.java
@@ -59,9 +59,8 @@ private String accountNameWX; // 累计转账-微信 private double totalMoneyWX; private int wxUnionIdState; // 微信unionId状态 private int taobaoUidState; // 淘宝ID状态 @@ -72,16 +71,37 @@ /* 封禁账号 */ private String f_wxUnionId; // 微信unionId private String wxUnionIdInvalid; // 微信unionId private String f_taobaoUid; // 淘宝ID private String taobaoUidInvalid; // 淘宝ID private String f_phone; // 手机号 private String phoneInvalid; // 手机号 private String f_alipayAccount; // 支付宝账号 private String alipayAccountInvalid; // 支付宝账号 public String getRankId() { return rankId; } public void setRankId(String rankId) { this.rankId = rankId; } public String getRankName() { return rankName; } public void setRankName(String rankName) { this.rankName = rankName; } public String getRankPicture() { return rankPicture; } public void setRankPicture(String rankPicture) { this.rankPicture = rankPicture; } public String getUnaccountedMoney() { return unaccountedMoney; @@ -131,11 +151,11 @@ this.totalOrder = totalOrder; } public long getLastOrderTime() { public Long getLastOrderTime() { return lastOrderTime; } public void setLastOrderTime(long lastOrderTime) { public void setLastOrderTime(Long lastOrderTime) { this.lastOrderTime = lastOrderTime; } @@ -267,60 +287,36 @@ this.alipayAccountState = alipayAccountState; } public String getF_wxUnionId() { return f_wxUnionId; public String getWxUnionIdInvalid() { return wxUnionIdInvalid; } public void setF_wxUnionId(String f_wxUnionId) { this.f_wxUnionId = f_wxUnionId; public void setWxUnionIdInvalid(String wxUnionIdInvalid) { this.wxUnionIdInvalid = wxUnionIdInvalid; } public String getF_taobaoUid() { return f_taobaoUid; public String getTaobaoUidInvalid() { return taobaoUidInvalid; } public void setF_taobaoUid(String f_taobaoUid) { this.f_taobaoUid = f_taobaoUid; public void setTaobaoUidInvalid(String taobaoUidInvalid) { this.taobaoUidInvalid = taobaoUidInvalid; } public String getF_phone() { return f_phone; public String getPhoneInvalid() { return phoneInvalid; } public void setF_phone(String f_phone) { this.f_phone = f_phone; public void setPhoneInvalid(String phoneInvalid) { this.phoneInvalid = phoneInvalid; } public String getF_alipayAccount() { return f_alipayAccount; public String getAlipayAccountInvalid() { return alipayAccountInvalid; } public void setF_alipayAccount(String f_alipayAccount) { this.f_alipayAccount = f_alipayAccount; } public String getRankId() { return rankId; } public void setRankId(String rankId) { this.rankId = rankId; } public String getRankName() { return rankName; } public void setRankName(String rankName) { this.rankName = rankName; } public String getRankPicture() { return rankPicture; } public void setRankPicture(String rankPicture) { this.rankPicture = rankPicture; public void setAlipayAccountInvalid(String alipayAccountInvalid) { this.alipayAccountInvalid = alipayAccountInvalid; } }