|
@@ -1,13 +1,16 @@
|
|
|
package com.zhongzheng.controller.user;
|
|
|
|
|
|
import cn.hutool.core.lang.Validator;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
|
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.exception.CustomException;
|
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
|
import com.zhongzheng.common.utils.ServletUtils;
|
|
|
+import com.zhongzheng.common.utils.ToolsUtils;
|
|
|
import com.zhongzheng.framework.web.service.WxLoginService;
|
|
|
import com.zhongzheng.framework.web.service.WxTokenService;
|
|
|
import com.zhongzheng.modules.system.domain.SysTenant;
|
|
@@ -19,6 +22,7 @@ import com.zhongzheng.modules.user.service.IUserLoginKeyService;
|
|
|
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.UserBusinessGoodsVo;
|
|
|
import com.zhongzheng.modules.user.vo.UserVo;
|
|
|
import com.zhongzheng.modules.wx.bo.WxIdBody;
|
|
|
import com.zhongzheng.modules.wx.bo.WxLoginBody;
|
|
@@ -32,6 +36,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
+import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
@@ -218,4 +223,12 @@ public class UserController extends BaseController {
|
|
|
editBo.setUserKey(loginUser.getToken());
|
|
|
return toAjax(iUserLoginKeyService.offline(editBo) ? 1 : 0);
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation("获取用户同专业下课程")
|
|
|
+ @PostMapping("/getUserBusinessGoods")
|
|
|
+ public AjaxResult<List<UserBusinessGoodsVo>> getUserBusinessGoods(@RequestBody List<UserBusinessGoodsBo> bos) {
|
|
|
+ ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
+ bos.forEach(x -> x.setUserId(loginUser.getUser().getUserId()));
|
|
|
+ return AjaxResult.success(iUserService.getUserBusinessGoods(bos));
|
|
|
+ }
|
|
|
}
|