|
@@ -4,8 +4,6 @@ import com.caimei.constants.ShopStatus;
|
|
|
import com.caimei.modules.opensearch.CoreServiceUitls;
|
|
|
import com.caimei.modules.sys.utils.CmMsgUtils;
|
|
|
import com.caimei.modules.sys.utils.SMSUtils;
|
|
|
-import com.caimei.modules.user.aop.OperationLogAnnotation;
|
|
|
-import com.caimei.modules.user.aop.OperationLogShop;
|
|
|
import com.caimei.modules.user.dao.CmUserDao;
|
|
|
import com.caimei.modules.user.dao.NewCmShopDao;
|
|
|
import com.caimei.modules.user.entity.CmMessage;
|
|
@@ -68,11 +66,13 @@ public class NewCmShopController extends BaseController {
|
|
|
@Autowired
|
|
|
private NewCmShopDao newCmShopDao;
|
|
|
|
|
|
+
|
|
|
public static NewCmShop newcm;
|
|
|
public static CmUser cmus;
|
|
|
public static int id;
|
|
|
public static String auditNo;
|
|
|
|
|
|
+
|
|
|
@ModelAttribute
|
|
|
public NewCmShop get(@RequestParam(required = false) String id) {
|
|
|
NewCmShop entity = null;
|
|
@@ -112,6 +112,7 @@ public class NewCmShopController extends BaseController {
|
|
|
model.addAttribute("shopType",2);
|
|
|
return "modules/user/cmNewProductShopList";
|
|
|
}
|
|
|
+
|
|
|
@RequestMapping(value = "/special/new/edit")
|
|
|
public String specialEdit(NewCmShop newCmShop, HttpServletRequest request, HttpServletResponse response, Model model) {
|
|
|
if(null!=newCmShop.getShopID()){
|
|
@@ -177,7 +178,6 @@ public class NewCmShopController extends BaseController {
|
|
|
public String form(NewCmShop newCmShop, Model model) {
|
|
|
//获取供应商证书信息
|
|
|
newCmShop = newCmShopService.getShopcert(newCmShop);
|
|
|
- newcm = newCmShop;
|
|
|
model.addAttribute("newCmShop", newCmShop);
|
|
|
return "modules/user/newCmShopForm";
|
|
|
}
|
|
@@ -192,7 +192,6 @@ public class NewCmShopController extends BaseController {
|
|
|
*/
|
|
|
@ResponseBody
|
|
|
@RequiresPermissions("user:newCmShop:view")
|
|
|
- @OperationLogShop(operType = "审核")
|
|
|
@RequestMapping(value = "auditShopInfo")
|
|
|
public Map<String, Object> auditShopInfo(String auditStatus, Integer shopId, Integer userId, String auditNote, Model model) {
|
|
|
Map<String, Object> map = new HashedMap();
|
|
@@ -203,7 +202,6 @@ public class NewCmShopController extends BaseController {
|
|
|
String manufacturerStatus = "";
|
|
|
String smsMessage = "";
|
|
|
CmUser companyUser = cmUserService.get(userId + "");
|
|
|
- cmus = companyUser;
|
|
|
String mobile = companyUser.getBindMobile();
|
|
|
if (StringUtils.equals("1", auditStatus)) {
|
|
|
manufacturerStatus = "90";
|
|
@@ -213,7 +211,6 @@ public class NewCmShopController extends BaseController {
|
|
|
manufacturerStatus = "92";
|
|
|
smsMessage = "很遗憾,您的资料信息有误,未通过审核,请登录采美修改资料信息。";
|
|
|
}
|
|
|
- auditNo = auditStatus;
|
|
|
// 更新用户信息
|
|
|
newCmShopService.updateUserAudit(auditStatus, auditNote, format, manufacturerStatus, userId, "1");
|
|
|
// 更新供应商信息
|
|
@@ -378,7 +375,6 @@ public class NewCmShopController extends BaseController {
|
|
|
*/
|
|
|
@RequiresPermissions("user:newCmShop:edit")
|
|
|
@ResponseBody
|
|
|
- @OperationLogShop(operType = "修改密码", operModul = "修改密码")
|
|
|
@RequestMapping(value = "updatePwd")
|
|
|
public Map<String, Object> updatePwd(String password, String id, HttpServletRequest request, HttpServletResponse response) {
|
|
|
Map<String, Object> map = Maps.newLinkedHashMap();
|
|
@@ -386,7 +382,6 @@ public class NewCmShopController extends BaseController {
|
|
|
CmUser cmUser = cmUserService.get(id);
|
|
|
cmUser.setPassword(MD5Util.MD5(password));
|
|
|
cmUserService.update(cmUser);
|
|
|
- cmus = cmUser;
|
|
|
map.put("success", true);
|
|
|
map.put("msg", "修改成功");
|
|
|
} catch (Exception e) {
|
|
@@ -456,13 +451,11 @@ public class NewCmShopController extends BaseController {
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "online")
|
|
|
- @OperationLogShop(operType = "更改状态", operModul = "设置为上线")
|
|
|
@RequiresPermissions("user:newCmShop:edit")
|
|
|
public String onLine(NewCmShop newCmShop, Model model, RedirectAttributes redirectAttributes) {
|
|
|
Integer userID = newCmShop.getUserID();
|
|
|
cmUserService.updateUserStatus("90", userID, "1");
|
|
|
newCmShopService.updateShopStatus("90", userID);
|
|
|
- id = newCmShop.getUserID();
|
|
|
addMessage(redirectAttributes, "供应商上线成功");
|
|
|
return "redirect:" + Global.getAdminPath() + "/user/newCmShop/";
|
|
|
}
|
|
@@ -476,20 +469,17 @@ public class NewCmShopController extends BaseController {
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "offline")
|
|
|
- @OperationLogShop(operType = "更改状态", operModul = "设置为下线")
|
|
|
@RequiresPermissions("user:newCmShop:edit")
|
|
|
public String offLine(NewCmShop newCmShop, Model model, RedirectAttributes redirectAttributes) {
|
|
|
Integer userID = newCmShop.getUserID();
|
|
|
cmUserService.updateUserStatus("91", userID, "0");
|
|
|
newCmShopService.updateShopStatus("91", userID);
|
|
|
- id = newCmShop.getUserID();
|
|
|
addMessage(redirectAttributes, "供应商下线成功");
|
|
|
return "redirect:" + Global.getAdminPath() + "/user/newCmShop/";
|
|
|
}
|
|
|
|
|
|
|
|
|
@RequiresPermissions("user:newCmShop:edit")
|
|
|
- @OperationLogShop(operType = "编辑")
|
|
|
@RequestMapping(value = "save")
|
|
|
public String save(NewCmShop newCmShop, Model model, RedirectAttributes redirectAttributes) {
|
|
|
if (!beanValidator(model, newCmShop)) {
|