|
@@ -0,0 +1,60 @@
|
|
|
|
|
+package com.zhongzheng.controller.user;
|
|
|
|
|
+
|
|
|
|
|
+import cn.hutool.core.lang.Validator;
|
|
|
|
|
+import com.zhongzheng.common.annotation.Log;
|
|
|
|
|
+import com.zhongzheng.common.core.controller.BaseController;
|
|
|
|
|
+import com.zhongzheng.common.core.domain.AjaxResult;
|
|
|
|
|
+import com.zhongzheng.common.enums.BusinessType;
|
|
|
|
|
+import com.zhongzheng.common.utils.DateUtils;
|
|
|
|
|
+import com.zhongzheng.common.utils.ServletUtils;
|
|
|
|
|
+import com.zhongzheng.framework.web.service.WxLoginService;
|
|
|
|
|
+import com.zhongzheng.framework.web.service.WxTokenService;
|
|
|
|
|
+import com.zhongzheng.modules.user.bo.*;
|
|
|
|
|
+import com.zhongzheng.modules.user.domain.UserWxFollow;
|
|
|
|
|
+import com.zhongzheng.modules.user.entity.ClientLoginUser;
|
|
|
|
|
+import com.zhongzheng.modules.user.service.IUserService;
|
|
|
|
|
+import com.zhongzheng.modules.user.service.IUserVisitLogService;
|
|
|
|
|
+import com.zhongzheng.modules.user.service.IUserWxFollowService;
|
|
|
|
|
+import com.zhongzheng.modules.user.vo.UserVo;
|
|
|
|
|
+import com.zhongzheng.modules.wx.bo.WxLoginBody;
|
|
|
|
|
+import io.swagger.annotations.Api;
|
|
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
|
|
+import lombok.RequiredArgsConstructor;
|
|
|
|
|
+import org.slf4j.Logger;
|
|
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
+
|
|
|
|
|
+import java.util.HashMap;
|
|
|
|
|
+import java.util.Map;
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ * 客户端用户Controller
|
|
|
|
|
+ *
|
|
|
|
|
+ * @author hjl
|
|
|
|
|
+ * @date 2021-06-08
|
|
|
|
|
+ */
|
|
|
|
|
+@Api(value = "用户控制器", tags = {"客户端用户管理"})
|
|
|
|
|
+@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
|
|
|
|
+@RestController
|
|
|
|
|
+@RequestMapping("/app/user")
|
|
|
|
|
+public class UserController extends BaseController {
|
|
|
|
|
+
|
|
|
|
|
+ private final IUserService iUserService;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 修改客户端用户
|
|
|
|
|
+ */
|
|
|
|
|
+ @ApiOperation("修改客户端用户")
|
|
|
|
|
+ @Log(title = "客户端用户", businessType = BusinessType.UPDATE)
|
|
|
|
|
+ @PostMapping("/edit")
|
|
|
|
|
+ public AjaxResult<Void> edit(@RequestBody UserEditBo bo) throws IllegalAccessException {
|
|
|
|
|
+ ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
|
|
+ bo.setUserId(loginUser.getUser().getUserId());
|
|
|
|
|
+ return toAjax(iUserService.appUpdateByEditBo(bo) ? 1 : 0);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+}
|