|
@@ -1,6 +1,7 @@
|
|
|
package com.ruoyi.app.stall;
|
|
package com.ruoyi.app.stall;
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
+import com.ruoyi.app.utils.RsaMima;
|
|
|
import com.ruoyi.common.annotation.Anonymous;
|
|
import com.ruoyi.common.annotation.Anonymous;
|
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
@@ -95,7 +96,7 @@ public class StallController extends BaseController {
|
|
|
@Auth
|
|
@Auth
|
|
|
@PostMapping("/addOwner")
|
|
@PostMapping("/addOwner")
|
|
|
@Transactional
|
|
@Transactional
|
|
|
- public AjaxResult addStallOwner(@RequestHeader String token, @RequestBody InfoUser stallOwner) {
|
|
|
|
|
|
|
+ public AjaxResult addStallOwner(@RequestHeader String token, @RequestBody InfoUser stallOwner) throws Exception {
|
|
|
JwtUtil jwtUtil = new JwtUtil();
|
|
JwtUtil jwtUtil = new JwtUtil();
|
|
|
String userId = jwtUtil.getusid(token);
|
|
String userId = jwtUtil.getusid(token);
|
|
|
// 校验摊位属于当前夜市用户
|
|
// 校验摊位属于当前夜市用户
|
|
@@ -144,7 +145,7 @@ public class StallController extends BaseController {
|
|
|
stallOwner.setStatus("0");
|
|
stallOwner.setStatus("0");
|
|
|
stallOwner.setDelFlag("0");
|
|
stallOwner.setDelFlag("0");
|
|
|
stallOwner.setAuditStatus("1");
|
|
stallOwner.setAuditStatus("1");
|
|
|
- stallOwner.setPassword(SecurityUtils.encryptPassword(stallOwner.getPassword()));
|
|
|
|
|
|
|
+ stallOwner.setPassword(RsaMima.encryptByPrivateKey(RsaMima.privateKey,stallOwner.getPassword()));
|
|
|
|
|
|
|
|
infoUserService.insertInfoUser(stallOwner);
|
|
infoUserService.insertInfoUser(stallOwner);
|
|
|
return success(MessageUtils.message("no.success"), stallOwner);
|
|
return success(MessageUtils.message("no.success"), stallOwner);
|