|
@@ -73,8 +73,6 @@ public class NewCmShopController extends BaseController {
|
|
@Resource
|
|
@Resource
|
|
private CmOperationalLogService cmOperationalLogService;
|
|
private CmOperationalLogService cmOperationalLogService;
|
|
@Resource
|
|
@Resource
|
|
- private SysLogService sysLogService;
|
|
|
|
- @Resource
|
|
|
|
private MessageCenterDao messageCenterDao;
|
|
private MessageCenterDao messageCenterDao;
|
|
@Resource
|
|
@Resource
|
|
private NewOrderService newOrderService;
|
|
private NewOrderService newOrderService;
|
|
@@ -82,8 +80,6 @@ public class NewCmShopController extends BaseController {
|
|
private NewShopOrderDao newShopOrderDao;
|
|
private NewShopOrderDao newShopOrderDao;
|
|
@Resource
|
|
@Resource
|
|
private WeChatService weChatService;
|
|
private WeChatService weChatService;
|
|
- @Autowired
|
|
|
|
- private RedisService redisService;
|
|
|
|
|
|
|
|
@ModelAttribute
|
|
@ModelAttribute
|
|
public NewCmShop get(@RequestParam(required = false) String id) {
|
|
public NewCmShop get(@RequestParam(required = false) String id) {
|
|
@@ -500,13 +496,12 @@ public class NewCmShopController extends BaseController {
|
|
|
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
@RequestMapping(value = "login/password")
|
|
@RequestMapping(value = "login/password")
|
|
- public Map<String, String> loginPass(Integer userId, HttpServletRequest request, HttpServletResponse response) {
|
|
|
|
- String pasKey = "pas-" + userId;
|
|
|
|
- boolean exists = redisService.exists(pasKey);
|
|
|
|
|
|
+ public Map<String, String> loginPass(Integer userId) {
|
|
|
|
+ String pasKey = "pas-" + userId.toString();
|
|
|
|
+ String pass = cmUserDao.findTemporaryUser(userId);
|
|
HashMap<String, String> pasMap = new HashMap<>();
|
|
HashMap<String, String> pasMap = new HashMap<>();
|
|
- if (exists) {
|
|
|
|
- String val = (String) redisService.get(pasKey);
|
|
|
|
- pasMap.put("pasKey", val);
|
|
|
|
|
|
+ if (StringUtils.isNotBlank(pass)) {
|
|
|
|
+ pasMap.put("pasKey", pass);
|
|
return pasMap;
|
|
return pasMap;
|
|
} else {
|
|
} else {
|
|
SecureRandom random = new SecureRandom();
|
|
SecureRandom random = new SecureRandom();
|
|
@@ -519,7 +514,7 @@ public class NewCmShopController extends BaseController {
|
|
char randomChar = allowedChars.charAt(randomIndex);
|
|
char randomChar = allowedChars.charAt(randomIndex);
|
|
sb.append(randomChar);
|
|
sb.append(randomChar);
|
|
}
|
|
}
|
|
- redisService.set(pasKey, sb, 600L);
|
|
|
|
|
|
+ cmUserDao.insertTemporaryUser(userId, sb.toString());
|
|
pasMap.put("pasKey", sb.toString());
|
|
pasMap.put("pasKey", sb.toString());
|
|
return pasMap;
|
|
return pasMap;
|
|
}
|
|
}
|