fanli/src/main/java/com/yeshi/fanli/controller/admin/LostOrderAdminController.java
@@ -63,12 +63,35 @@ for (LostOrder lostOrder: list) { Integer stateOrder = lostOrder.getState(); Integer resultCode = lostOrder.getResultCode(); if (stateOrder != null && stateOrder == 1 && resultCode!= null) { switch(resultCode) { case 1: lostOrder.setRemake("等待爬取中"); break; case 2: lostOrder.setRemake("处理成功"); break; case 3: lostOrder.setState(2); lostOrder.setRemake("处理失败"); break; default: break; } } else if (stateOrder != null && stateOrder == 2) { lostOrder.setRemake("已拒绝"); } Order order = lostOrder.getOrder(); if (order == null) { lostOrder.setOrder(new Order()); } UserInfo userInfo = lostOrder.getUserInfo(); UserInfo userInfo = lostOrder.getUserInfo(); if (userInfo == null) { lostOrder.setUserInfo(new UserInfo()); } else { fanli/src/main/java/com/yeshi/fanli/controller/admin/UserInfoAdminController.java
@@ -5,7 +5,6 @@ import java.util.ArrayList; import java.util.Calendar; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -13,7 +12,6 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.yeshi.utils.JsonUtil; import com.google.gson.Gson; @@ -24,24 +22,16 @@ import com.yeshi.fanli.entity.bus.user.BindingAccount; import com.yeshi.fanli.entity.bus.user.ForbiddenUserIdentifyCode; import com.yeshi.fanli.entity.bus.user.ForbiddenUserIdentifyCode.ForbiddenUserIdentifyCodeTypeEnum; import com.yeshi.fanli.entity.bus.user.Order; import com.yeshi.fanli.entity.bus.user.ThreeSale; import com.yeshi.fanli.entity.bus.user.UserExtraTaoBaoInfo; import com.yeshi.fanli.entity.bus.user.UserInfo; import com.yeshi.fanli.entity.bus.user.UserRank; import com.yeshi.fanli.entity.money.UserMoneyDetail; import com.yeshi.fanli.entity.taobao.ScanHistory; import com.yeshi.fanli.exception.user.ForbiddenUserIdentifyCodeException; import com.yeshi.fanli.service.inter.config.ConfigService; import com.yeshi.fanli.service.inter.count.UserInfoCountService; import com.yeshi.fanli.service.inter.goods.ShareService; import com.yeshi.fanli.service.inter.hongbao.ThreeSaleSerivce; import com.yeshi.fanli.service.inter.order.OrderService; import com.yeshi.fanli.service.inter.user.BindingAccountService; import com.yeshi.fanli.service.inter.user.ExtractService; import com.yeshi.fanli.service.inter.user.ForbiddenUserIdentifyCodeService; import com.yeshi.fanli.service.inter.user.ScanHistoryService; import com.yeshi.fanli.service.inter.user.UserActiveLogService; import com.yeshi.fanli.service.inter.user.UserExtraTaoBaoInfoService; import com.yeshi.fanli.service.inter.user.UserInfoExtraService; import com.yeshi.fanli.service.inter.user.UserInfoService; @@ -63,24 +53,8 @@ @Resource private UserInfoService userInfoService; @Resource private OrderService orderService; @Resource private ScanHistoryService scanHistoryService; @Resource private ConfigService configService; @Resource private ExtractService extractService; @Resource private ThreeSaleSerivce threeSaleService; @Resource private ShareService shareService; @Resource private BindingAccountService bindingAccountService; @@ -88,8 +62,6 @@ @Resource private UserInfoCountService userInfoCountService; @Resource private UserActiveLogService userActiveLogService; @Resource private ForbiddenUserIdentifyCodeService forbiddenUserIdentifyCodeService; @@ -105,158 +77,6 @@ @Resource private UserMoneyDetailService userMoneyDetailService; @RequestMapping(value = "getUserList", method = RequestMethod.POST) public void getUserList(int pageIndex, String key, PrintWriter out) { List<UserInfo> userList = userInfoService.getUserList(pageIndex - 1, key); int count = userInfoService.getUserCount(key); int totalPage = count % Constant.PAGE_SIZE == 0 ? count / Constant.PAGE_SIZE : count / Constant.PAGE_SIZE + 1; PageEntity pe = new PageEntity(pageIndex, Constant.PAGE_SIZE, count, totalPage); Map<String, String> map = new HashMap<String, String>(); map.put("key", key); pe.setParams(map); JSONObject data = new JSONObject(); data.put("pe", pe); data.put("userList", userList); out.print(JsonUtil.loadTrueResult(data)); } /** * * 方法说明: 三级分销 * * @author mawurui createTime 2018年5月21日 下午4:55:07 * @param pageIndex * @param key * @param out */ @RequestMapping(value = "getThreeSaleList", method = RequestMethod.POST) public void getThreeSaleList(int pageIndex, String key, PrintWriter out) { List<ThreeSale> list = threeSaleService.getLastestThreeSaleList(pageIndex, key); int count = threeSaleService.getLastestThreeSaleCount(key); int totalPage = (int) (count % Constant.PAGE_SIZE == 0 ? count / Constant.PAGE_SIZE : count / Constant.PAGE_SIZE + 1); PageEntity pe = new PageEntity(pageIndex, Constant.PAGE_SIZE, count, totalPage); Map<String, String> map = new HashMap<String, String>(); map.put("key", key); pe.setParams(map); JSONObject data = new JSONObject(); data.put("pe", pe); data.put("threeSaleList", list); out.print(JsonUtil.loadTrueResult(data)); } /** * * @param pageIndex * @param type * 1- 1级分销 2-2级分销 * @param uid * @param key * @param out */ @RequestMapping(value = "getThreeSaleDetailList", method = RequestMethod.POST) public void getThreeSaleDetailList(int pageIndex, int type, long uid, String key, PrintWriter out) { List<UserInfo> userList = null; long count = 0; if (type == 1) { userList = threeSaleService.getFirstUsers(uid, pageIndex); count = threeSaleService.getFirstUsersCount(uid); } else if (type == 2) { userList = threeSaleService.getSecondUsers(uid, pageIndex); count = threeSaleService.getSecondUsersCount(uid); } int totalPage = (int) (count % Constant.PAGE_SIZE == 0 ? count / Constant.PAGE_SIZE : count / Constant.PAGE_SIZE + 1); PageEntity pe = new PageEntity(pageIndex, Constant.PAGE_SIZE, count, totalPage); Map<String, String> map = new HashMap<String, String>(); map.put("key", key); pe.setParams(map); JSONObject data = new JSONObject(); data.put("pe", pe); data.put("userList", userList); out.print(JsonUtil.loadTrueResult(data)); } @RequestMapping(value = "getUserListByUid", method = RequestMethod.POST) public void getUserListByUid(long uid, PrintWriter out) { List<UserInfo> userList = userInfoService.getUserListByUid(uid); int count = userList.size(); int totalPage = count % Constant.PAGE_SIZE == 0 ? count / Constant.PAGE_SIZE : count / Constant.PAGE_SIZE + 1; PageEntity pe = new PageEntity(1, Constant.PAGE_SIZE, count, totalPage); Map<String, String> map = new HashMap<String, String>(); pe.setParams(map); JSONObject data = new JSONObject(); data.put("pe", pe); data.put("userList", userList); out.print(JsonUtil.loadTrueResult(data)); } /** * * 方法说明: 查询用户订单状态 * * @author mawurui createTime 2018年5月17日 上午10:55:41 * @param pageIndex * @param uid * @param out */ @RequestMapping(value = "getUserOrderList", method = RequestMethod.POST) public void getUserOrderList(int pageIndex, long uid, PrintWriter out) { List<Order> orderList = orderService.getOrderByUid(pageIndex - 1, uid); int count = orderService.getCount(uid); int totalPage = count % Constant.PAGE_SIZE == 0 ? count / Constant.PAGE_SIZE : count / Constant.PAGE_SIZE + 1; PageEntity pe = new PageEntity(pageIndex, Constant.PAGE_SIZE, count, totalPage); JSONObject data = new JSONObject(); data.put("pe", pe); data.put("orderList", JsonUtil.getSimpleGsonWithDateAndSerialization().toJson(orderList)); out.print(JsonUtil.loadTrueResult(data)); } /** * * 方法说明: 清除用户手势密码 * * @author mawurui createTime 2018年5月4日 下午4:47:29 * @param uid * @param out */ @RequestMapping(value = "cleanPassword", method = RequestMethod.POST) public void cleanPassword(long id, PrintWriter out) { userInfoService.cleanPassword(id); out.print(JsonUtil.loadTrueResult("清除成功")); } @RequestMapping(value = "getScanHistoryList", method = RequestMethod.POST) public void getScanHistoryList(int pageIndex, long uid, PrintWriter out) { List<ScanHistory> scanHistoryList = scanHistoryService.getScanHistoryByUid(pageIndex - 1, uid); int count = scanHistoryService.getCountByUid(uid); int totalPage = count % Constant.PAGE_SIZE == 0 ? count / Constant.PAGE_SIZE : count / Constant.PAGE_SIZE + 1; PageEntity pe = new PageEntity(pageIndex, Constant.PAGE_SIZE, count, totalPage); JSONObject data = new JSONObject(); data.put("pe", pe); data.put("scanHistoryList", GsonUtil.toDFJson(scanHistoryList)); out.print(JsonUtil.loadTrueResult(data)); } @RequestMapping(value = "getAssets", method = RequestMethod.POST) public void getAssets(PrintWriter out) { String minMoney = configService.get(Constant.EXTRACT_MIN_MONEY); double min = Double.parseDouble(minMoney); double freeze = userInfoService.getFreezeAssets(min); double canAssets = userInfoService.getCanAssets(min); JSONObject data = new JSONObject(); data.put("freeze", freeze); data.put("can", canAssets); out.print(JsonUtil.loadTrueResult(data)); } /** @@ -528,6 +348,215 @@ } } /** * 封禁用户ID * @param callback * @param uid * @param out */ @RequestMapping(value = "forbiddenUser") public void forbiddenUser(String callback, Long uid, PrintWriter out) { try { if (uid == null) { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请传递正确数据")); return; } UserInfo currentInfo = userInfoService.selectByPKey(uid); if (currentInfo == null) { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("该用户已不存在")); return; } currentInfo.setState(UserInfo.STATE_FORBIDDEN); currentInfo.setStateDesc("管理员封禁"); userInfoService.updateByPrimaryKeySelective(currentInfo); // 加入封禁的账号列表 ForbiddenUserIdentifyCode forbiddenUserIdentifyCode = new ForbiddenUserIdentifyCode(); forbiddenUserIdentifyCode.setType(ForbiddenUserIdentifyCodeTypeEnum.wxUnionId); forbiddenUserIdentifyCode.setIdentifyCode(currentInfo.getWxUnionId()); forbiddenUserIdentifyCode.setBeiZhu(currentInfo.getWxName()); try { forbiddenUserIdentifyCodeService.forbiddenIdentifyCode(forbiddenUserIdentifyCode); } catch (ForbiddenUserIdentifyCodeException e) { e.printStackTrace(); } // 电话号码 forbiddenUserIdentifyCode = new ForbiddenUserIdentifyCode(); forbiddenUserIdentifyCode.setType(ForbiddenUserIdentifyCodeTypeEnum.phone); forbiddenUserIdentifyCode.setIdentifyCode(currentInfo.getPhone()); try { forbiddenUserIdentifyCodeService.forbiddenIdentifyCode(forbiddenUserIdentifyCode); } catch (ForbiddenUserIdentifyCodeException e) { e.printStackTrace(); } // 淘宝 UserExtraTaoBaoInfo taoBao = userExtraTaoBaoInfoService.getByUid(uid); if (taoBao != null && !StringUtil.isNullOrEmpty(taoBao.getTaoBaoUid())) { forbiddenUserIdentifyCode = new ForbiddenUserIdentifyCode(); forbiddenUserIdentifyCode.setType(ForbiddenUserIdentifyCodeTypeEnum.taobaoUid); forbiddenUserIdentifyCode.setIdentifyCode(taoBao.getTaoBaoUid()); try { forbiddenUserIdentifyCodeService.forbiddenIdentifyCode(forbiddenUserIdentifyCode); } catch (ForbiddenUserIdentifyCodeException e) { e.printStackTrace(); } } // 查询支付宝绑定 List<BindingAccount> list = bindingAccountService.getBindingAccountByUid(uid); if (list != null) { for (BindingAccount ba : list) { forbiddenUserIdentifyCode = new ForbiddenUserIdentifyCode(); forbiddenUserIdentifyCode.setType(ForbiddenUserIdentifyCodeTypeEnum.alipayAccount); forbiddenUserIdentifyCode.setIdentifyCode(ba.getAccount()); forbiddenUserIdentifyCode.setBeiZhu(ba.getName()); try { forbiddenUserIdentifyCodeService.forbiddenIdentifyCode(forbiddenUserIdentifyCode); } catch (ForbiddenUserIdentifyCodeException e) { e.printStackTrace(); } } } JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("用户封禁成功")); } catch (Exception e) { e.printStackTrace(); JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作失败")); } } /** * 解除封禁用户ID * @param callback * @param uid * @param out */ @RequestMapping(value = "relieveForbiddenUser") public void relieveForbiddenUser(String callback, Long uid, PrintWriter out) { try { if (uid == null) { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请传递正确数据")); return; } UserInfo currentInfo = userInfoService.selectByPKey(uid); if (currentInfo == null) { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("该用户已不存在")); return; } currentInfo.setState(UserInfo.STATE_NORMAL); currentInfo.setStateDesc("管理员已解封"); userInfoService.updateByPrimaryKeySelective(currentInfo); // 解封微信 ForbiddenUserIdentifyCode forbiddenUserIdentifyCode = forbiddenUserIdentifyCodeService .listByTypeAndIdentifyCode(ForbiddenUserIdentifyCodeTypeEnum.wxUnionId, currentInfo.getWxUnionId()); if (forbiddenUserIdentifyCode != null) forbiddenUserIdentifyCodeService.delete(forbiddenUserIdentifyCode); // 解封手机 forbiddenUserIdentifyCode = forbiddenUserIdentifyCodeService .listByTypeAndIdentifyCode(ForbiddenUserIdentifyCodeTypeEnum.phone, currentInfo.getPhone()); if (forbiddenUserIdentifyCode != null) forbiddenUserIdentifyCodeService.delete(forbiddenUserIdentifyCode); // 解封淘宝 UserExtraTaoBaoInfo taoBao = userExtraTaoBaoInfoService.getByUid(uid); if (taoBao != null && !StringUtil.isNullOrEmpty(taoBao.getTaoBaoUid())) { forbiddenUserIdentifyCode = forbiddenUserIdentifyCodeService .listByTypeAndIdentifyCode(ForbiddenUserIdentifyCodeTypeEnum.taobaoUid, taoBao.getTaoBaoUid()); if (forbiddenUserIdentifyCode != null) forbiddenUserIdentifyCodeService.delete(forbiddenUserIdentifyCode); } // 解封支付宝 List<BindingAccount> list = bindingAccountService.getBindingAccountByUid(uid); if (list != null) { for (BindingAccount ba : list) { forbiddenUserIdentifyCode = forbiddenUserIdentifyCodeService.listByTypeAndIdentifyCode( ForbiddenUserIdentifyCodeTypeEnum.alipayAccount, ba.getAccount()); if (forbiddenUserIdentifyCode != null) forbiddenUserIdentifyCodeService.delete(forbiddenUserIdentifyCode); } } JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("用户解封成功")); } catch (Exception e) { e.printStackTrace(); JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作失败")); } } /** * 用户账号- 封禁/解封 * @param callback * @param code * @param type 1("微信unionId"), 2("淘宝ID"), 3("手机号"), 4("支付宝账号"); * @param out */ @RequestMapping(value = "saveForbiddenInfo") public void saveForbiddenInfo(String callback, String code, Integer type, PrintWriter out) { try { if (code == null || code.trim().length() == 0 || type == null ||"NULL".equalsIgnoreCase(code)) { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("参数不能为空")); return; } forbiddenUserIdentifyCodeService.saveForbiddenInfo(code, type); JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("修改成功")); } catch (ForbiddenUserIdentifyCodeException e) { e.printStackTrace(); JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg())); } catch (Exception e) { e.printStackTrace(); JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常")); } } /** * 删除队员关系 * @param callback * @param id * @param out */ @RequestMapping(value = "deleteThreeSale") public void deleteThreeSale(String callback, Long id, PrintWriter out) { try { if (id == null) { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请传递正确数据")); return; } int count = threeSaleService.deleteByPrimaryKey(id); if (count > 0) { JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("删除成功")); } else { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("删除失败")); } } catch (Exception e) { e.printStackTrace(); JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常")); } } @RequestMapping(value = "queryMyFirstTeams") public void queryMyFirstTeams(String callback, Integer pageIndex, Integer pageSize, String key, Long bossId, PrintWriter out) { @@ -650,28 +679,6 @@ } } @RequestMapping(value = "deleteThreeSale") public void deleteThreeSale(String callback, Long id, PrintWriter out) { try { if (id == null) { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请传递正确数据")); return; } int count = threeSaleService.deleteByPrimaryKey(id); if (count > 0) { JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("删除成功")); } else { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("删除失败")); } } catch (Exception e) { e.printStackTrace(); JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常")); } } /** * 队员关系 @@ -1127,182 +1134,5 @@ /** * 封禁用户ID * @param callback * @param uid * @param out */ @RequestMapping(value = "forbiddenUser") public void forbiddenUser(String callback, Long uid, PrintWriter out) { try { if (uid == null) { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请传递正确数据")); return; } UserInfo currentInfo = userInfoService.selectByPKey(uid); if (currentInfo == null) { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("该用户已不存在")); return; } currentInfo.setState(UserInfo.STATE_FORBIDDEN); currentInfo.setStateDesc("管理员封禁"); userInfoService.updateByPrimaryKeySelective(currentInfo); // 加入封禁的账号列表 ForbiddenUserIdentifyCode forbiddenUserIdentifyCode = new ForbiddenUserIdentifyCode(); forbiddenUserIdentifyCode.setType(ForbiddenUserIdentifyCodeTypeEnum.wxUnionId); forbiddenUserIdentifyCode.setIdentifyCode(currentInfo.getWxUnionId()); forbiddenUserIdentifyCode.setBeiZhu(currentInfo.getWxName()); try { forbiddenUserIdentifyCodeService.addIdentifyCode(forbiddenUserIdentifyCode); } catch (ForbiddenUserIdentifyCodeException e) { e.printStackTrace(); } // 电话号码 forbiddenUserIdentifyCode = new ForbiddenUserIdentifyCode(); forbiddenUserIdentifyCode.setType(ForbiddenUserIdentifyCodeTypeEnum.phone); forbiddenUserIdentifyCode.setIdentifyCode(currentInfo.getPhone()); try { forbiddenUserIdentifyCodeService.addIdentifyCode(forbiddenUserIdentifyCode); } catch (ForbiddenUserIdentifyCodeException e) { e.printStackTrace(); } // 淘宝 UserExtraTaoBaoInfo taoBao = userExtraTaoBaoInfoService.getByUid(uid); if (taoBao != null && !StringUtil.isNullOrEmpty(taoBao.getTaoBaoUid())) { forbiddenUserIdentifyCode = new ForbiddenUserIdentifyCode(); forbiddenUserIdentifyCode.setType(ForbiddenUserIdentifyCodeTypeEnum.taobaoUid); forbiddenUserIdentifyCode.setIdentifyCode(taoBao.getTaoBaoUid()); try { forbiddenUserIdentifyCodeService.addIdentifyCode(forbiddenUserIdentifyCode); } catch (ForbiddenUserIdentifyCodeException e) { e.printStackTrace(); } } // 查询支付宝绑定 List<BindingAccount> list = bindingAccountService.getBindingAccountByUid(uid); if (list != null) { for (BindingAccount ba : list) { forbiddenUserIdentifyCode = new ForbiddenUserIdentifyCode(); forbiddenUserIdentifyCode.setType(ForbiddenUserIdentifyCodeTypeEnum.alipayAccount); forbiddenUserIdentifyCode.setIdentifyCode(ba.getAccount()); forbiddenUserIdentifyCode.setBeiZhu(ba.getName()); try { forbiddenUserIdentifyCodeService.addIdentifyCode(forbiddenUserIdentifyCode); } catch (ForbiddenUserIdentifyCodeException e) { e.printStackTrace(); } } } JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("用户封禁成功")); } catch (Exception e) { e.printStackTrace(); JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作失败")); } } /** * 解除封禁用户ID * @param callback * @param uid * @param out */ @RequestMapping(value = "relieveForbiddenUser") public void relieveForbiddenUser(String callback, Long uid, PrintWriter out) { try { if (uid == null) { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请传递正确数据")); return; } UserInfo currentInfo = userInfoService.selectByPKey(uid); if (currentInfo == null) { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("该用户已不存在")); return; } currentInfo.setState(UserInfo.STATE_NORMAL); currentInfo.setStateDesc("管理员已解封"); userInfoService.updateByPrimaryKeySelective(currentInfo); // 解封微信 ForbiddenUserIdentifyCode forbiddenUserIdentifyCode = forbiddenUserIdentifyCodeService .listByTypeAndIdentifyCode(ForbiddenUserIdentifyCodeTypeEnum.wxUnionId, currentInfo.getWxUnionId()); if (forbiddenUserIdentifyCode != null) forbiddenUserIdentifyCodeService.delete(forbiddenUserIdentifyCode); // 解封手机 forbiddenUserIdentifyCode = forbiddenUserIdentifyCodeService .listByTypeAndIdentifyCode(ForbiddenUserIdentifyCodeTypeEnum.phone, currentInfo.getPhone()); if (forbiddenUserIdentifyCode != null) forbiddenUserIdentifyCodeService.delete(forbiddenUserIdentifyCode); // 解封淘宝 UserExtraTaoBaoInfo taoBao = userExtraTaoBaoInfoService.getByUid(uid); if (taoBao != null && !StringUtil.isNullOrEmpty(taoBao.getTaoBaoUid())) { forbiddenUserIdentifyCode = forbiddenUserIdentifyCodeService .listByTypeAndIdentifyCode(ForbiddenUserIdentifyCodeTypeEnum.taobaoUid, taoBao.getTaoBaoUid()); if (forbiddenUserIdentifyCode != null) forbiddenUserIdentifyCodeService.delete(forbiddenUserIdentifyCode); } // 解封支付宝 List<BindingAccount> list = bindingAccountService.getBindingAccountByUid(uid); if (list != null) { for (BindingAccount ba : list) { forbiddenUserIdentifyCode = forbiddenUserIdentifyCodeService.listByTypeAndIdentifyCode( ForbiddenUserIdentifyCodeTypeEnum.alipayAccount, ba.getAccount()); if (forbiddenUserIdentifyCode != null) forbiddenUserIdentifyCodeService.delete(forbiddenUserIdentifyCode); } } JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("用户解封成功")); } catch (Exception e) { e.printStackTrace(); JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作失败")); } } /** * 用户账号- 封禁/解封 * @param callback * @param code * @param type 1("微信unionId"), 2("淘宝ID"), 3("手机号"), 4("支付宝账号"); * @param out */ @RequestMapping(value = "saveForbiddenInfo") public void saveForbiddenInfo(String callback, String code, Integer type, PrintWriter out) { try { if (code == null || code.trim().length() == 0 || type == null) { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("参数不能为空")); } forbiddenUserIdentifyCodeService.saveForbiddenInfo(code, type); JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("修改成功")); } catch (ForbiddenUserIdentifyCodeException e) { e.printStackTrace(); JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg())); } catch (Exception e) { e.printStackTrace(); JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常")); } } } fanli/src/main/java/com/yeshi/fanli/controller/admin/config/JumpDetailAdminController.java
@@ -2,101 +2,33 @@ import java.io.PrintWriter; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.annotation.Resource; import net.sf.json.JSONObject; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.yeshi.utils.JsonUtil; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.reflect.TypeToken; import com.yeshi.fanli.entity.common.JumpDetail; import com.yeshi.fanli.entity.common.JumpDetailV2; import com.yeshi.fanli.exception.NotExistObjectException; import com.yeshi.fanli.service.inter.common.JumpDetailV2Service; import com.yeshi.fanli.service.inter.config.JumpDetailService; import com.yeshi.fanli.tag.PageEntity; import com.yeshi.fanli.util.Constant; import com.yeshi.fanli.util.StringUtil; import net.sf.json.JSONObject; @Controller @RequestMapping("admin/new/api/v1/jumpDetail") public class JumpDetailAdminController { @Resource private JumpDetailService jumpDetailService; @Resource private JumpDetailV2Service JumpDetailV2Service; @RequestMapping(value="getJumpDetailList",method=RequestMethod.POST) public void getJumpDetailList(int pageIndex,String key,PrintWriter out){ List<JumpDetail> jumpDetailList = jumpDetailService.getJumpDetailList(pageIndex-1,key); int count = jumpDetailService.getCount(key); int totalPage = count % Constant.PAGE_SIZE == 0 ? count / Constant.PAGE_SIZE : count / Constant.PAGE_SIZE + 1; PageEntity pe = new PageEntity(pageIndex, Constant.PAGE_SIZE, count, totalPage); Map<String, String> map = new HashMap<String, String>(); map.put("key", key); pe.setParams(map); JSONObject data = new JSONObject(); data.put("pe", pe); data.put("jumpDetailList", jumpDetailList); out.print(JsonUtil.loadTrueResult(data)); return; } @RequestMapping(value="getJumpDetailAllList",method=RequestMethod.POST) public void getJumpDetailAllList(PrintWriter out){ List<JumpDetail> jumpDetailList = jumpDetailService.getJumpDetailAllList(); JSONObject data = new JSONObject(); data.put("jumpDetailList", jumpDetailList); out.print(JsonUtil.loadTrueResult(data)); return; } @RequestMapping(value="addJumpDetail",method=RequestMethod.POST) public void addJumpDetail(JumpDetail jd,PrintWriter out){ jumpDetailService.addJumpDetail(jd); out.print(JsonUtil.loadTrueResult("添加成功")); } @RequestMapping(value="updateJumpDetail",method=RequestMethod.POST) public void updateJumpDetail(JumpDetail jd,PrintWriter out){ try { jumpDetailService.updateJumpDetail(jd); out.print(JsonUtil.loadTrueResult("修改成功")); } catch (NotExistObjectException e) { out.append(JsonUtil.loadFalseResult(e.getMessage())); } } @RequestMapping(value="getJumpDetail",method=RequestMethod.POST) public void getJumpDetail(long id,PrintWriter out){ JumpDetail jumpDetail =jumpDetailService.getJumpDetail(id); if(jumpDetail ==null){ out.append(JsonUtil.loadFalseResult("不存在该对象")); return; } out.print(JsonUtil.loadTrueResult(jumpDetail)); } @RequestMapping(value="deleteJumpDetail",method=RequestMethod.POST) public void deleteJumpDetail(long[] ids,PrintWriter out){ for (long id : ids) { jumpDetailService.deleteJumpDetail(id); } out.print(JsonUtil.loadTrueResult("删除成功")); } @RequestMapping({ "getJumpOption" }) public void getJumpOption(String callback, PrintWriter out) { try { fanli/src/main/java/com/yeshi/fanli/controller/admin/config/SystemClientParamsAdminController.java
@@ -2,34 +2,23 @@ import java.io.PrintWriter; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.annotation.Resource; import net.sf.json.JSONObject; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.yeshi.utils.JsonUtil; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import com.yeshi.fanli.entity.admin.SystemClientParamsAdmin; import com.yeshi.fanli.entity.system.CustomerContent; import com.yeshi.fanli.entity.system.CustomerName; import com.yeshi.fanli.entity.system.System; import com.yeshi.fanli.entity.system.SystemClientParams; import com.yeshi.fanli.service.inter.config.SystemClientParamsService; import com.yeshi.fanli.service.inter.config.SystemService; import com.yeshi.fanli.tag.PageEntity; import com.yeshi.fanli.util.Constant; import com.yeshi.fanli.util.GsonUtil; import com.yeshi.fanli.util.StringUtil; import com.yeshi.fanli.util.Utils; import net.sf.json.JSONObject; @Controller @RequestMapping("admin/new/api/v1/clientParams") @@ -38,272 +27,6 @@ @Resource private SystemClientParamsService systemClientParamsService; @Resource private SystemService systemService; // @InitBinder("oscp") // public void initBinder1(WebDataBinder binder) { // binder.setFieldDefaultPrefix("oscp."); // } // @InitBinder("nscp") // public void initBinder2(WebDataBinder binder) { // binder.setFieldDefaultPrefix("nscp."); // } @RequestMapping(value="getSystemClientParamsList",method=RequestMethod.POST) public void getSystemClientParamsList(int pageIndex,String platform,String packages,String key,PrintWriter out){ platform=Utils.getMap().get(platform); System system = systemService.getSystem(platform, packages); List<SystemClientParamsAdmin> clientParamsList = systemClientParamsService.getAdminList(system,key); int count =clientParamsList.size(); int totalPage = count % Constant.PAGE_SIZE == 0 ? count / Constant.PAGE_SIZE : count / Constant.PAGE_SIZE + 1; PageEntity pe = new PageEntity(pageIndex,count, count, totalPage); Map<String, String> map = new HashMap<String, String>(); map.put("platform", platform); map.put("packages", packages); map.put("key", key); pe.setParams(map); JSONObject data = new JSONObject(); data.put("pe", pe); List<System> systemList = systemService.getSystems(); data.put("systemList", systemList); data.put("clientParamsList", clientParamsList); out.print(JsonUtil.loadTrueResult(data)); return; } @RequestMapping(value="getSystemClientParams",method=RequestMethod.POST) public void getSystemClientParams(SystemClientParams scp,PrintWriter out){ SystemClientParamsAdmin scpa = systemClientParamsService.getSystemClientParamsAdmin(scp); out.append(JsonUtil.loadTrueResult(scpa)); } @RequestMapping(value="addSystemClientParamsList",method=RequestMethod.POST) public void addSystemClientParamsList(@RequestBody List<SystemClientParams> scps,PrintWriter out){ List<System> list = new ArrayList<System>(); for (SystemClientParams scp : scps) { System system = scp.getSystem(); int platformInt = system.getPlatform(); String packages = system.getPackageName(); String platform = Utils.getMap().get(String.valueOf(platformInt)); System find = systemService.getSystem(platform, packages); if(find != null){ list.add(find); } } try { systemClientParamsService.addSystemClientParamsList(scps.get(0),list); out.print(JsonUtil.loadTrueResult("添加成功")); } catch (Exception e) { out.print(JsonUtil.loadFalseResult(e.getMessage())); } } @RequestMapping(value="setSystemClientParamsSystem",method=RequestMethod.POST) public void setSystemClientParamsSystem(SystemClientParams scp,String type,String platform,String packages,PrintWriter out){ platform = Utils.getMap().get(platform); System system = systemService.getSystem(platform, packages); if(system==null){ out.append(JsonUtil.loadFalseResult("系统不能为空")); return; } if(Constant.DEL.equals(type)){ systemClientParamsService.deleteSystemClientParams(scp,system); }else{ systemClientParamsService.addSystemClientParams(scp,system); } out.print(JsonUtil.loadTrueResult("操作成功")); } @RequestMapping(value="deleteSystemClientParams",method=RequestMethod.POST) public void deleteSystemClientParams(@RequestBody List<SystemClientParams> scps,PrintWriter out){ for (SystemClientParams scp : scps) { systemClientParamsService.deleteSystemClientParams(scp); } out.append(JsonUtil.loadTrueResult("删除成功")); } @RequestMapping(value="updateSystemClientParams",method=RequestMethod.POST) public void updateSystemClientParams(@RequestBody List<SystemClientParams> scps,PrintWriter out){ SystemClientParams oscp = scps.get(0); SystemClientParams nscp = scps.get(1); systemClientParamsService.update(oscp,nscp); out.print(JsonUtil.loadTrueResult("修改成功")); } /** * * 方法说明: 获取帮助中心列表等其他列表 * @author mawurui * createTime 2018年4月8日 下午3:30:33 * @param pageIndex * @param key * @param out */ @RequestMapping(value="getHelpList",method=RequestMethod.POST) public void getHelpList(int pageIndex, String key, PrintWriter out, int type) { //查询列表总数 Integer totalCount = systemClientParamsService.getCount(type); int totalPage = totalCount % Constant.PAGE_SIZE == 0 ? totalCount / Constant.PAGE_SIZE : totalCount / Constant.PAGE_SIZE + 1; PageEntity pageEntity = new PageEntity(pageIndex, Constant.PAGE_SIZE, totalCount, totalPage); Map<String, String> map = new HashMap<String, String>(); map.put("key", key); pageEntity.setParams(map); //分页查询所有问题 List<CustomerName> customerNameList = systemClientParamsService.customerNameList(pageIndex-1, key, type); JSONObject data=new JSONObject(); data.put("pageEntity", JsonUtil.getSimpleGsonWithDate().toJson(pageEntity)); data.put("customerNameList", JsonUtil.getSimpleGsonWithDate().toJson(customerNameList)); out.print(JsonUtil.loadTrue(0, JsonUtil.getSimpleGson().toJson(data), "成功")); } /** * * 方法说明: 删除帮助中心等其他列表(真删除) * @author mawurui * createTime 2018年3月29日 下午6:22:21 * @param ids * @param out */ @RequestMapping(value="deleteHelp",method=RequestMethod.POST) public void deleteHelp(long[] ids, PrintWriter out){ for (long id : ids) { systemClientParamsService.deleteHelp(id); } out.print(JsonUtil.loadTrueResult("删除成功")); } /** * * 方法说明: 查询帮助中心等其他列表详情(页面反显) * @author mawurui * createTime 2018年4月8日 下午5:26:36 * @param id * @param out */ @RequestMapping(value="getHelpCenter",method=RequestMethod.POST) public void getHelpCenter(int type, PrintWriter out) { CustomerName customerName = systemClientParamsService.getHelpCenter(type); JSONObject data = new JSONObject(); data.put("customerName", GsonUtil.toDFJson(customerName)); out.print(JsonUtil.loadTrueResult(0, data)); } /** * * 方法说明: 根据一级问题名称查询二级问题列表 * @author mawurui * createTime 2018年4月9日 上午9:05:28 * @param pageIndex * @param key * @param out * @param type */ @RequestMapping(value="getSecondProblemList",method=RequestMethod.POST) public void getSecondProblemList(int pageIndex, String key, PrintWriter out, long id) { //查询列表总数 Integer totalCount = systemClientParamsService.getProblemCount(id); int totalPage = totalCount % Constant.PAGE_SIZE == 0 ? totalCount / Constant.PAGE_SIZE : totalCount / Constant.PAGE_SIZE + 1; PageEntity pageEntity = new PageEntity(pageIndex, Constant.PAGE_SIZE, totalCount, totalPage); Map<String, String> map = new HashMap<String, String>(); map.put("key", key); pageEntity.setParams(map); //分页查询所有问题 List<CustomerContent> getSecondProblemList = systemClientParamsService.getSecondProblemList(pageIndex-1, key, id); JSONObject data=new JSONObject(); data.put("pageEntity", JsonUtil.getSimpleGsonWithDate().toJson(pageEntity)); data.put("getSecondProblemList", JsonUtil.getSimpleGsonWithDate().toJson(getSecondProblemList)); out.print(JsonUtil.loadTrue(0, JsonUtil.getSimpleGson().toJson(data), "成功")); } /** * * 方法说明: 删除二级问题列表(真删除) * @author mawurui * createTime 2018年4月9日 上午9:47:12 * @param ids * @param out */ @RequestMapping(value="deleteSecondProblem",method=RequestMethod.POST) public void deleteSecondProblem(long[] ids, PrintWriter out){ for (long id : ids) { systemClientParamsService.deleteSecondProblem(id); } out.print(JsonUtil.loadTrueResult("删除成功")); } /** * * 方法说明: 查看回答详情(页面反显) * @author mawurui * createTime 2018年4月9日 上午11:05:04 * @param id * @param out */ @RequestMapping(value="answerDetail",method=RequestMethod.POST) public void getCustomerContent(long id, PrintWriter out) { CustomerContent customerContent = systemClientParamsService.getCustomerContent(id); JSONObject data = new JSONObject(); data.put("customerContent", GsonUtil.toDFJson(customerContent)); out.print(JsonUtil.loadTrueResult(0, data)); } /** * * 方法说明: 修改回答内容 * @author mawurui * createTime 2018年4月9日 上午11:25:19 * @param InviteGetMoney * @param out */ @RequestMapping(value="/updateAnswerDetail", method=RequestMethod.POST) public void updateAnswerDetail(CustomerContent customerContent , PrintWriter out) { systemClientParamsService.updateAnswerDetail(customerContent); out.print(JsonUtil.loadTrueResult("修改成功")); } /** * * 方法说明: 添加一级问题菜单 * @author mawurui * createTime 2018年4月9日 下午12:11:08 * @param CustomerName */ @RequestMapping(value="/addFirstMenu", method=RequestMethod.POST) public void addFirstMenu(CustomerName CustomerName, PrintWriter out, int type) { systemClientParamsService.addFirstMenu(CustomerName, type); out.print(JsonUtil.loadTrueResult("添加成功")); } /** * * 方法说明: 添加二级菜单 * @author mawurui * createTime 2018年4月9日 下午12:17:51 * @param CustomerName * @param out * @param type */ @RequestMapping(value="/addSecondMenu", method=RequestMethod.POST) public void addSecondMenu(CustomerContent customerContent, PrintWriter out, long cnId) { systemClientParamsService.addSecondMenu(customerContent, cnId); out.print(JsonUtil.loadTrueResult("添加成功")); } /** fanli/src/main/java/com/yeshi/fanli/controller/admin/config/SystemConfigAdminController.java
File was deleted fanli/src/main/java/com/yeshi/fanli/dao/mybatis/taobao/TaoBaoGoodsBriefRecordMapper.java
File was deleted fanli/src/main/java/com/yeshi/fanli/dao/mybatis/user/UserRankMapper.java
@@ -9,6 +9,4 @@ public interface UserRankMapper extends BaseMapper<UserRank> { List<UserRank> getAllRank(); } fanli/src/main/java/com/yeshi/fanli/entity/taobao/TaoBaoGoodsBriefRecord.java
File was deleted fanli/src/main/java/com/yeshi/fanli/job/UpdateTaoBaoGoodsJob.java
@@ -15,7 +15,6 @@ import com.yeshi.fanli.log.LogHelper; import com.yeshi.fanli.service.inter.activity.ActivityService; import com.yeshi.fanli.service.inter.goods.RecommendSectionGoodsService; import com.yeshi.fanli.service.inter.goods.TaoBaoGoodsBriefRecordService; import com.yeshi.fanli.service.inter.goods.TaoBaoGoodsBriefService; import com.yeshi.fanli.service.inter.lable.LabelService; import com.yeshi.fanli.service.inter.lable.QualityFactoryService; @@ -55,10 +54,6 @@ @Resource private QualityFlashSaleService qualityFlashSaleService; @Resource private TaoBaoGoodsBriefRecordService taoBaoGoodsBriefRecordService; @Scheduled(cron = "0 0 0 * * ?") @@ -195,30 +190,6 @@ qualityFlashSaleService.deleteBatchByPrimaryKey(list); } } catch (Exception e) { try { LogHelper.errorDetailInfo(e); } catch (Exception e1) { e1.printStackTrace(); } } } /** * 清理淘宝商品缓存记录表 */ @Scheduled(cron = "0 0 0 * * ? ") public void cleanTaoBaoGoodsBriefRecord() { if (!Constant.IS_TASK) { return; } try { taoBaoGoodsBriefRecordService.deleteAllData(); } catch (Exception e) { try { 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/mapping/taobao/TaoBaoGoodsBriefRecordMapper.xml
File was deleted fanli/src/main/java/com/yeshi/fanli/service/impl/goods/TaoBaoGoodsBriefRecordServiceImpl.java
File was deleted fanli/src/main/java/com/yeshi/fanli/service/impl/lable/QualityFactoryServiceImpl.java
@@ -17,7 +17,6 @@ import com.yeshi.fanli.dao.mybatis.lable.QualityFactoryMapper; import com.yeshi.fanli.dao.mybatis.lable.QualityFlashSaleMapper; import com.yeshi.fanli.dao.mybatis.taobao.TaoBaoGoodsBriefMapper; import com.yeshi.fanli.dao.mybatis.taobao.TaoBaoGoodsBriefRecordMapper; import com.yeshi.fanli.entity.bus.clazz.TaoBaoClassRelation; import com.yeshi.fanli.entity.bus.lable.BoutiqueAutoRule; import com.yeshi.fanli.entity.bus.lable.Label; @@ -60,8 +59,6 @@ private TaoBaoGoodsBriefMapper taoBaoGoodsBriefMapper; @Resource private TaoBaoUnionConfigService taoBaoUnionConfigService; @Resource private TaoBaoGoodsBriefRecordMapper taoBaoGoodsBriefRecordMapper; @Resource private TaoBaoClassRelationMapper taoBaoClassRelationMapper; @Resource fanli/src/main/java/com/yeshi/fanli/service/impl/lable/QualityGoodsServiceImpl.java
@@ -5,10 +5,10 @@ import javax.annotation.Resource; import net.sf.json.JSONArray; import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; import org.yeshi.utils.JsonUtil; import org.yeshi.utils.taobao.TbImgUtil; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -16,7 +16,6 @@ import com.yeshi.fanli.dao.mybatis.lable.LabelGoodsMapper; import com.yeshi.fanli.dao.mybatis.lable.QualityFactoryMapper; import com.yeshi.fanli.dao.mybatis.taobao.TaoBaoGoodsBriefMapper; import com.yeshi.fanli.dao.mybatis.taobao.TaoBaoGoodsBriefRecordMapper; import com.yeshi.fanli.entity.bus.lable.Label; import com.yeshi.fanli.entity.bus.lable.LabelGoods; import com.yeshi.fanli.entity.bus.lable.QualityFactory; @@ -29,8 +28,7 @@ import com.yeshi.fanli.util.StringUtil; import com.yeshi.fanli.util.taobao.TaoBaoUtil; import org.yeshi.utils.JsonUtil; import org.yeshi.utils.taobao.TbImgUtil; import net.sf.json.JSONArray; @Service public class QualityGoodsServiceImpl implements QualityGoodsService { @@ -49,9 +47,6 @@ private TaoBaoGoodsBriefMapper taoBaoGoodsBriefMapper; @Resource private TaoBaoUnionConfigService taoBaoUnionConfigService; @Resource private TaoBaoGoodsBriefRecordMapper taoBaoGoodsBriefRecordMapper; @Resource private TaoBaoClassRelationMapper taoBaoClassRelationMapper; 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/inter/goods/TaoBaoGoodsBriefRecordService.java
File was deleted 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,4 @@ * @return */ public List<UserRank> getAllRank(); } 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; } }