提交
This commit is contained in:
46
ruoyi-main/ruoyi-admin-core/pom.xml
Normal file
46
ruoyi-main/ruoyi-admin-core/pom.xml
Normal file
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-main</artifactId>
|
||||
<version>3.7.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ruoyi-admin-core</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.belerweb</groupId>
|
||||
<artifactId>pinyin4j</artifactId>
|
||||
<version>2.5.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-custom</artifactId>
|
||||
<version>3.7.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-post</artifactId>
|
||||
<version>3.7.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-message</artifactId>
|
||||
<version>3.7.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.common.page.PageResult;
|
||||
import com.ruoyi.controller.req.ActivityPageReq;
|
||||
import com.ruoyi.controller.req.AppealMessagePageReq;
|
||||
import com.ruoyi.controller.req.LikeReq;
|
||||
import com.ruoyi.controller.req.SendMessageReq;
|
||||
import com.ruoyi.controller.resp.*;
|
||||
import com.ruoyi.frequency.activity.entity.Activity;
|
||||
import com.ruoyi.frequency.activity.service.ActivityService;
|
||||
import com.ruoyi.frequency.appeal.service.AppealService;
|
||||
import com.ruoyi.frequency.appealdetail.service.AppealDetailService;
|
||||
import com.ruoyi.frequency.like.service.LikeService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.BodyIdReq;
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 活动
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/activity")
|
||||
@Api(tags = "活动")
|
||||
public class ApiActivityController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private ActivityService activityService;
|
||||
|
||||
|
||||
@PostMapping("/activityPage")
|
||||
@ApiOperation(value = "活动列表", notes = "活动列表")
|
||||
// @UserLoginToken
|
||||
public ResponseData<PageResult<Page<Activity>>> activityPage(@RequestBody @Valid ActivityPageReq req) {
|
||||
return activityService.activityPage(req,getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/activityDetail")
|
||||
@ApiOperation(value = "活动详情", notes = "活动详情")
|
||||
// @UserLoginToken
|
||||
public ResponseData<Activity> activityDetail(@RequestBody @Valid BodyIdReq req) {
|
||||
return activityService.activityDetail(req.getId(),getUserVo());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private LikeService likeService;
|
||||
|
||||
@PostMapping("/activityLike")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "活动点赞", notes = "活动点赞")
|
||||
public ResponseData activityLike(@RequestBody LikeReq req) {
|
||||
return likeService.like(req,getUserVo());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.controller.req.AddressInsertReq;
|
||||
import com.ruoyi.controller.req.AddressUpdateReq;
|
||||
import com.ruoyi.frequency.malladdress.service.MallAddressService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import net.sourceforge.pinyin4j.PinyinHelper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/address")
|
||||
@Api(tags = "用户地址")
|
||||
public class ApiAddressController extends RyController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private MallAddressService addressService;
|
||||
|
||||
@UserLoginToken
|
||||
@PostMapping("/addressPage")
|
||||
@ApiOperation(value = "用户地址",notes = "用户地址")
|
||||
public ResponseData addressPage(@RequestBody PageBasic page) {
|
||||
return this.addressService.addressPage(getUserVo(), page);
|
||||
}
|
||||
|
||||
@UserLoginToken
|
||||
@PostMapping("/addressDetail")
|
||||
@ApiOperation(value = "地址信息",notes = "地址信息")
|
||||
public ResponseData detail(@Valid @RequestBody Long id) {
|
||||
return ResponseData.success(this.addressService.getById(id));
|
||||
}
|
||||
|
||||
@UserLoginToken
|
||||
@PostMapping("/insertAddress")
|
||||
@ApiOperation(value = "添加地址",notes = "添加地址")
|
||||
public ResponseData insertAddress(@Valid @RequestBody AddressInsertReq addressInsertReq) {
|
||||
return this.addressService.insertAddress(addressInsertReq, getUserVo());
|
||||
}
|
||||
|
||||
@UserLoginToken
|
||||
@PostMapping("/updateAddress")
|
||||
@ApiOperation(value = "修改地址",notes = "修改地址")
|
||||
public ResponseData updateAddress(@Valid @RequestBody AddressUpdateReq addressUpdateReq) {
|
||||
return this.addressService.updateAddress(addressUpdateReq,getUserVo());
|
||||
}
|
||||
|
||||
@UserLoginToken
|
||||
@PostMapping("/setDefaultAddress")
|
||||
@ApiOperation(value = "修改默认地址",notes = "修改默认地址")
|
||||
public ResponseData setDefault(@Valid @RequestBody Long id) {
|
||||
return this.addressService.setDefault(id);
|
||||
}
|
||||
|
||||
@UserLoginToken
|
||||
@PostMapping("/deleteAddress")
|
||||
@ApiOperation(value = "删除地址",notes = "删除地址")
|
||||
public ResponseData deleteAddress(@RequestBody List<Long> ids) {
|
||||
return this.addressService.deleteAddressById(ids, getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/defaultAddress")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "获取用户默认地址",notes = "获取用户默认地址")
|
||||
public ResponseData getDefaultAddress() {
|
||||
return this.addressService.getDefaultAddress(getUserVo());
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String chineseText = "你好世界";
|
||||
StringBuilder result = new StringBuilder();
|
||||
|
||||
for (char c : chineseText.toCharArray()) {
|
||||
String[] pinyinArray = PinyinHelper.toHanyuPinyinStringArray(c);
|
||||
if (pinyinArray != null) {
|
||||
result.append(pinyinArray[0].charAt(0));
|
||||
break;
|
||||
} else {
|
||||
result.append(c);
|
||||
break;
|
||||
}
|
||||
}
|
||||
System.out.println(result.toString().toUpperCase());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.common.page.PageResult;
|
||||
import com.ruoyi.controller.req.AppealMessagePageReq;
|
||||
import com.ruoyi.controller.req.SendMessageReq;
|
||||
import com.ruoyi.controller.resp.AppealDetailResp;
|
||||
import com.ruoyi.controller.resp.AppealMessagePageResp;
|
||||
import com.ruoyi.controller.resp.AppealPageResp;
|
||||
import com.ruoyi.frequency.appeal.service.AppealService;
|
||||
import com.ruoyi.frequency.appealdetail.service.AppealDetailService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.BodyIdReq;
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 申诉
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/appeal")
|
||||
@Api(tags = "申诉")
|
||||
public class ApiAppealController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private AppealService appealService;
|
||||
|
||||
@Autowired
|
||||
private AppealDetailService appealDetailService;
|
||||
|
||||
|
||||
@PostMapping("/appealPage")
|
||||
@ApiOperation(value = "申诉列表", notes = "申诉列表")
|
||||
@UserLoginToken
|
||||
public ResponseData<PageResult<Page<AppealPageResp>>> appealPage(@RequestBody @Valid PageBasic req) {
|
||||
return appealService.appealPage(req,getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/appealDetail")
|
||||
@ApiOperation(value = "申诉详情", notes = "申诉详情")
|
||||
@UserLoginToken
|
||||
public ResponseData<AppealDetailResp> appealDetail(@RequestBody @Valid BodyIdReq req) {
|
||||
return appealService.appealDetail(req.getId(),getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/appealMessagePage")
|
||||
@ApiOperation(value = "申诉详情消息对话", notes = "申诉详情消息对话")
|
||||
@UserLoginToken
|
||||
public ResponseData<PageResult<Page<AppealMessagePageResp>>> appealMessagePage(@RequestBody @Valid AppealMessagePageReq req) {
|
||||
return appealDetailService.appealMessagePage(req,getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/sendMessage")
|
||||
@ApiOperation(value = "发送消息", notes = "发送消息")
|
||||
@UserLoginToken
|
||||
public ResponseData sendMessage(@RequestBody @Valid SendMessageReq req) {
|
||||
return appealDetailService.sendMessage(req,getUserVo());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,227 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.ruoyi.code.PublicCommon;
|
||||
import com.ruoyi.common.cos.TxApiHttpUtils;
|
||||
import com.ruoyi.common.cos.TxApiSdkUtils;
|
||||
import com.ruoyi.controller.req.ContentCanUseReq;
|
||||
import com.ruoyi.controller.req.TxContentReq;
|
||||
import com.ruoyi.enums.user.UserEnums;
|
||||
import com.ruoyi.frequency.customer.entity.Customer;
|
||||
import com.ruoyi.frequency.customer.service.CustomerService;
|
||||
import com.ruoyi.frequency.level.entity.Level;
|
||||
import com.ruoyi.frequency.store.entity.Store;
|
||||
import com.ruoyi.frequency.store.service.StoreService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import com.ruoyi.vo.UserVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 文本/图片安全验证
|
||||
*/
|
||||
@Slf4j
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/appletAuth")
|
||||
@Api(tags = "文本/图片安全验证")
|
||||
public class ApiAppletAuthController extends RyController {
|
||||
|
||||
@Value("${DD_drawing.appid}")
|
||||
private String DD_drawingAppId;
|
||||
|
||||
@Value("${DD_drawing.secret}")
|
||||
private String DD_drawingSecret;
|
||||
|
||||
@Value("${DD_co_creation.appid}")
|
||||
private String DD_co_creationAppId;
|
||||
|
||||
@Value("${DD_co_creation.secret}")
|
||||
private String DD_co_creationSecret;
|
||||
|
||||
@Autowired
|
||||
private CustomerService customerService;
|
||||
@Autowired
|
||||
private StoreService storeService;
|
||||
|
||||
|
||||
@PostMapping("/checkContext")
|
||||
@ApiOperation(value = "腾讯云文本内容安全识别", notes = "腾讯云文本内容安全识别")
|
||||
public JSONObject checkContext(@RequestBody TxContentReq txContentReq) {
|
||||
if (StrUtil.isEmpty(txContentReq.getContent())) {
|
||||
return null;
|
||||
}
|
||||
return TxApiSdkUtils.checkContext(txContentReq.getContent());
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/checkImages")
|
||||
@ApiOperation(value = "腾讯云图片内容安全识别", notes = "腾讯云图片内容安全识别")
|
||||
public JSONObject checkImages(@RequestBody TxContentReq txContentReq) {
|
||||
if (StrUtil.isEmpty(txContentReq.getContent())) {
|
||||
return null;
|
||||
}
|
||||
return TxApiSdkUtils.checkImages(txContentReq.getContent());
|
||||
}
|
||||
|
||||
@PostMapping("/msgSecCheck/{type}")
|
||||
@ApiOperation(value = "微信小程序文本内容安全识别", notes = "微信小程序文本内容安全识别")
|
||||
public ResponseData msgSecCheck(@PathVariable("type") String type, @RequestBody ContentCanUseReq msgSecReq) {
|
||||
if (StrUtil.isEmpty(msgSecReq.getContent())) {
|
||||
return ResponseData.error("暂未授权!");
|
||||
}
|
||||
|
||||
UserVo userVo = getUserVo();
|
||||
String openId = "";
|
||||
if (userVo.getUserType().equals(UserEnums.customer.getCode())) {
|
||||
Customer customer = customerService.getById(userVo.getUserId());
|
||||
openId = customer.getWechatAppletOpenid();
|
||||
} else if (userVo.getUserType().equals(UserEnums.store.getCode())) {
|
||||
Store store = storeService.getById(userVo.getUserId());
|
||||
openId = store.getWechatAppletOpenid();
|
||||
} else {
|
||||
return ResponseData.success();
|
||||
}
|
||||
|
||||
if (StrUtil.isNotEmpty(openId)) {
|
||||
String str = "https://api.weixin.qq.com/wxa/msg_sec_check?access_token=" + getToken(type);
|
||||
Map<String, Object> bodyMap = new HashMap<>();
|
||||
bodyMap.put("openid", openId);
|
||||
bodyMap.put("version", 2);
|
||||
bodyMap.put("scene", msgSecReq.getScene());
|
||||
bodyMap.put("content", msgSecReq.getContent());
|
||||
String result = HttpUtil.createPost(str).body(JSONObject.toJSONString(bodyMap)).execute().body();
|
||||
|
||||
System.out.println(result);
|
||||
//判断是否获取成功
|
||||
if (ObjectUtil.isEmpty(result)) {
|
||||
return ResponseData.error("获取参数错误");
|
||||
}
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
return ResponseData.success(jsonObject);
|
||||
|
||||
}
|
||||
return ResponseData.success();
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/mediaCheckAsync/{type}")
|
||||
@ApiOperation(value = "微信小程序图片内容安全识别", notes = "微信小程序图片内容安全识别")
|
||||
public ResponseData mediaCheckAsync(@PathVariable("type") String type, @RequestBody ContentCanUseReq msgSecReq) {
|
||||
if (StrUtil.isEmpty(msgSecReq.getMediaUrl())) {
|
||||
return ResponseData.error("暂未授权!");
|
||||
}
|
||||
|
||||
UserVo userVo = getUserVo();
|
||||
String openId = "";
|
||||
if (userVo.getUserType().equals(UserEnums.customer.getCode())) {
|
||||
Customer customer = customerService.getById(userVo.getUserId());
|
||||
openId = customer.getWechatAppletOpenid();
|
||||
} else if (userVo.getUserType().equals(UserEnums.store.getCode())) {
|
||||
Store store = storeService.getById(userVo.getUserId());
|
||||
openId = store.getWechatAppletOpenid();
|
||||
} else {
|
||||
return ResponseData.success();
|
||||
}
|
||||
if (StrUtil.isNotEmpty(openId)) {
|
||||
String str = "https://api.weixin.qq.com/wxa/media_check_async?access_token=" + getToken(type);
|
||||
Map<String, Object> bodyMap = new HashMap<>();
|
||||
bodyMap.put("openid", openId);
|
||||
bodyMap.put("version", 2);
|
||||
bodyMap.put("media_type", 2);
|
||||
bodyMap.put("scene", msgSecReq.getScene());
|
||||
bodyMap.put("media_url", msgSecReq.getMediaUrl());
|
||||
String result = HttpUtil.createPost(str).body(JSONObject.toJSONString(bodyMap)).execute().body();
|
||||
|
||||
System.out.println(result);
|
||||
//判断是否获取成功
|
||||
if (ObjectUtil.isEmpty(result)) {
|
||||
return ResponseData.error("获取参数错误");
|
||||
}
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
return ResponseData.success(jsonObject);
|
||||
}
|
||||
return ResponseData.success();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取access_token
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getToken(String type) {
|
||||
|
||||
String appid = "";
|
||||
|
||||
String secret = "";
|
||||
|
||||
//type : DD_drawing DD画图, DD_co_creation DD共创
|
||||
if (ObjectUtil.equal(type, "DD_drawing")) {
|
||||
appid = DD_drawingAppId;
|
||||
|
||||
secret = DD_drawingSecret;
|
||||
} else {
|
||||
appid = DD_co_creationAppId;
|
||||
|
||||
secret = DD_co_creationSecret;
|
||||
}
|
||||
|
||||
String url = "https://api.weixin.qq.com/cgi-bin/token" + "?grant_type=" + "client_credential" + "&appid=" + appid + "&secret=" + secret;
|
||||
String result = HttpRequest.get(url).execute().body();
|
||||
System.err.println(result);
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
//服务断了status会有值
|
||||
Integer errcode = (Integer) jsonObject.get("errcode");
|
||||
if (errcode == null) {
|
||||
String access_token = (String) jsonObject.get("access_token");
|
||||
return access_token;
|
||||
} else {
|
||||
log.info("获取access_token失败:{}", jsonObject.toJSONString());
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*@UserLoginToken
|
||||
@PostMapping("/textCanUse")
|
||||
@ApiOperation(value = "文本是否可用", notes = "是否可以体验app或者小程序")
|
||||
public ResponseData textCanUse(@RequestBody ContentCanUseReq req) {
|
||||
|
||||
UserVo userVo = getUserVo();
|
||||
String openId = "";
|
||||
if (userVo.getUserType().equals(UserEnums.customer.getCode())) {
|
||||
Customer customer = customerService.getById(userVo.getUserId());
|
||||
openId = customer.getWechatAppletOpenid();
|
||||
} else if (userVo.getUserType().equals(UserEnums.store.getCode())) {
|
||||
Store store = storeService.getById(userVo.getUserId());
|
||||
openId = store.getWechatAppletOpenid();
|
||||
} else {
|
||||
return ResponseData.success();
|
||||
}
|
||||
if (StrUtil.isBlank(openId)) {
|
||||
return ResponseData.success();
|
||||
}
|
||||
|
||||
|
||||
return ResponseData.success();
|
||||
}*/
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.code.Token;
|
||||
import com.ruoyi.controller.req.OrdinaryAuthReq;
|
||||
import com.ruoyi.controller.req.UpscaleAuthReq;
|
||||
import com.ruoyi.frequency.auth.entity.Auth;
|
||||
import com.ruoyi.frequency.auth.service.AuthService;
|
||||
import com.ruoyi.frequency.highendauth.service.HighendAuthService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 认证
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/auth")
|
||||
@Api(tags = "认证")
|
||||
public class ApiAuthController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private AuthService authService;
|
||||
|
||||
@Autowired
|
||||
private HighendAuthService highendAuthService;
|
||||
|
||||
|
||||
@PostMapping("/ordinaryAuth")
|
||||
@ApiOperation(value = "普通认证", notes = "普通认证")
|
||||
@UserLoginToken(userTokenPre = {Token.store})
|
||||
public ResponseData ordinaryAuth(@RequestBody OrdinaryAuthReq req) {
|
||||
return authService.ordinaryAuth(req, getUserVo());
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/highendAuth")
|
||||
@ApiOperation(value = "高端认证", notes = "高端认证")
|
||||
@UserLoginToken(userTokenPre = {Token.store})
|
||||
public ResponseData highendAuth(@RequestBody UpscaleAuthReq req) {
|
||||
return highendAuthService.highendAuth(req, getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/ordinaryAuthDetail/{type}")
|
||||
@ApiOperation(value = "普通认证详情", notes = "普通认证详情")
|
||||
@UserLoginToken
|
||||
public ResponseData<Auth> ordinaryAuthDetail(@PathVariable Integer type) {
|
||||
return authService.ordinaryAuthDetail(type,getUserVo());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.code.PublicCommon;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import com.ruoyi.common.page.PageResult;
|
||||
import com.ruoyi.controller.req.BankCardAddReq;
|
||||
import com.ruoyi.controller.req.BankCardEditReq;
|
||||
import com.ruoyi.controller.req.BankCardPageReq;
|
||||
import com.ruoyi.controller.resp.BankCardDetailResp;
|
||||
import com.ruoyi.controller.resp.BankCardPageResp;
|
||||
import com.ruoyi.frequency.bankcard.entity.BankCard;
|
||||
import com.ruoyi.frequency.bankcard.service.BankCardService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.BodyIdReq;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/bankCard")
|
||||
@Api(tags = "银行卡")
|
||||
public class ApiBankCardController extends RyController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private BankCardService bankCardService;
|
||||
|
||||
@PostMapping("/bankCardPage")
|
||||
@ApiOperation(value = "银行卡列表", notes = "银行卡列表")
|
||||
@UserLoginToken
|
||||
public ResponseData<PageResult<Page<BankCardPageResp>>> bankCardPage(@RequestBody BankCardPageReq req) {
|
||||
return bankCardService.bankCardPage(req,getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/bankCardList")
|
||||
@ApiOperation(value = "银行卡列表(不分页)", notes = "银行卡列表")
|
||||
@UserLoginToken
|
||||
public ResponseData<List<BankCard>> bankCardList() {
|
||||
List<BankCard> list = bankCardService.list(new LambdaUpdateWrapper<BankCard>()
|
||||
.eq(BankCard::getDelFlag, PublicCommon.启用)
|
||||
.orderByDesc(BaseEntity::getCreateTime)
|
||||
);
|
||||
return ResponseData.success(list);
|
||||
}
|
||||
|
||||
@PostMapping("/bankCardAdd")
|
||||
@ApiOperation(value = "银行卡新增", notes = "银行卡新增")
|
||||
@UserLoginToken
|
||||
public ResponseData bankCardAdd(@RequestBody BankCardAddReq req) {
|
||||
return bankCardService.bankCardAdd(req,getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/bankCardEdit")
|
||||
@ApiOperation(value = "银行卡编辑", notes = "银行卡编辑")
|
||||
@UserLoginToken
|
||||
public ResponseData bankCardEdit(@RequestBody BankCardEditReq req) {
|
||||
return bankCardService.bankCardEdit(req,getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/bankCardDetail")
|
||||
@ApiOperation(value = "银行卡详情", notes = "银行卡详情")
|
||||
@UserLoginToken
|
||||
public ResponseData<BankCardDetailResp> bankCardDetail(@RequestBody BodyIdReq req) {
|
||||
return bankCardService.bankCardDetail(req.getId(),getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/bankCardDel")
|
||||
@ApiOperation(value = "银行卡删除", notes = "银行卡删除")
|
||||
@UserLoginToken
|
||||
public ResponseData bankCardDel(@RequestBody BodyIdReq req) {
|
||||
return bankCardService.bankCardDel(req.getId(),getUserVo());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.controller.req.BondPayReq;
|
||||
import com.ruoyi.controller.req.BondRecordPageReq;
|
||||
import com.ruoyi.frequency.bondrecord.service.BondRecordService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.BodyIdReq;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 保证金
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/bond")
|
||||
@Api(tags = "保证金")
|
||||
public class ApiBondController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private BondRecordService bondRecordService;
|
||||
|
||||
|
||||
@PostMapping("bondPay")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "缴纳保证金", notes = "缴纳保证金")
|
||||
public ResponseData bondPay(@Valid @RequestBody BondPayReq req) {
|
||||
return bondRecordService.bondPay(req, getUserVo());
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("bondRecordPage")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "缴纳保证金记录", notes = "缴纳保证金记录")
|
||||
public ResponseData bondRecordPage(@Valid @RequestBody BondRecordPageReq req) {
|
||||
return bondRecordService.bondRecordPage(req, getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("bondRecordDetail")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "缴纳保证金记录详情", notes = "缴纳保证金记录详情")
|
||||
public ResponseData bondRecordDetail(@Valid @RequestBody BodyIdReq req) {
|
||||
return bondRecordService.bondRecordDetail(req.getId(), getUserVo());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.code.PublicCommon;
|
||||
import com.ruoyi.code.Token;
|
||||
import com.ruoyi.controller.req.WithApplyReq;
|
||||
import com.ruoyi.enums.process.ProcessResultEnums;
|
||||
import com.ruoyi.frequency.auth.entity.Auth;
|
||||
import com.ruoyi.frequency.auth.service.AuthService;
|
||||
import com.ruoyi.frequency.bankcard.entity.BankCard;
|
||||
import com.ruoyi.frequency.bankcard.service.BankCardService;
|
||||
import com.ruoyi.frequency.bondwithdrawalrecord.service.BondWithdrawalRecordService;
|
||||
import com.ruoyi.frequency.customer.service.UserService;
|
||||
import com.ruoyi.frequency.highendauth.entity.HighendAuth;
|
||||
import com.ruoyi.frequency.highendauth.service.HighendAuthService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.BodyIdReq;
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import com.ruoyi.vo.UserVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
|
||||
/**
|
||||
* 保证金提现相关
|
||||
* @author liwenlong
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/bondWithdrawal")
|
||||
@Api(tags = "保证金提现相关")
|
||||
public class ApiBondWithdrawalController extends RyController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private BondWithdrawalRecordService bondWithdrawalRecordService;
|
||||
|
||||
@Autowired
|
||||
private AuthService authService;
|
||||
|
||||
@Autowired
|
||||
private HighendAuthService highendAuthService;
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
@Autowired
|
||||
private BankCardService bankCardService;
|
||||
|
||||
@UserLoginToken(userTokenPre = {Token.store,Token.enterprise})
|
||||
@RequestMapping(value = "/apply", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "申请提现")
|
||||
public ResponseData apply(@RequestBody @Valid WithApplyReq req) {
|
||||
|
||||
UserVo userVo = getUserVo();
|
||||
|
||||
userService.storeByEnterprise(userVo);
|
||||
|
||||
if (ObjectUtil.isNotEmpty(req.getBankCardId())){
|
||||
//查询用户银行卡信息
|
||||
BankCard bankCard = bankCardService.getById(req.getBankCardId());
|
||||
|
||||
if (bankCard != null){
|
||||
req.setBank(bankCard.getBank());
|
||||
req.setSubbranch(bankCard.getOpeningBranch());
|
||||
req.setBankCard(bankCard.getBankCard());
|
||||
req.setFullName(bankCard.getFullName());
|
||||
}
|
||||
}
|
||||
return bondWithdrawalRecordService.apply(req,userVo);
|
||||
}
|
||||
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/withdrawalRecordPage", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "提现记录")
|
||||
public ResponseData withdrawalRecordPage(@RequestBody @Valid PageBasic req) {
|
||||
return bondWithdrawalRecordService.withdrawalRecordPage(req,getUserVo());
|
||||
}
|
||||
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/detail", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "提现记录详情")
|
||||
public ResponseData detail(@RequestBody @Valid BodyIdReq req) {
|
||||
return bondWithdrawalRecordService.getDetail(req.getId());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.controller.req.CollectPageReq;
|
||||
import com.ruoyi.frequency.browserecord.service.BrowseRecordService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import com.ruoyi.vo.UserVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 浏览记录
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/browse")
|
||||
@Api(tags = "浏览记录")
|
||||
public class ApiBrowserController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private BrowseRecordService browseRecordService;
|
||||
|
||||
|
||||
@PostMapping("/browsePage")
|
||||
@ApiOperation(value = "浏览列表", notes = "浏览列表")
|
||||
@UserLoginToken
|
||||
public ResponseData browsePage(@RequestBody CollectPageReq req) {
|
||||
UserVo userVo = getUserVo();
|
||||
req.setUserId(userVo.getUserId());
|
||||
req.setUserType(userVo.getUserType());
|
||||
return browseRecordService.browsePage(req, userVo);
|
||||
}
|
||||
|
||||
@PostMapping("/otherBrowsePage")
|
||||
@ApiOperation(value = "浏览列表(别人查看)", notes = "浏览列表(别人查看)")
|
||||
public ResponseData otherBrowsePage(@RequestBody CollectPageReq req) {
|
||||
return browseRecordService.otherBrowsePage(req,getUserVo());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 异步回调接口
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/callback")
|
||||
@Api(tags = "异步回调接口")
|
||||
public class ApiCallbackController extends RyController {
|
||||
|
||||
@RequestMapping(value = "/wxMediaCheckAsync", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "微信图片验证接口回调",notes = "微信图片验证接口回调")
|
||||
public String wxMediaCheckAsync(HttpServletRequest request, HttpServletResponse response) {
|
||||
Map<String, String[]> map = request.getParameterMap();
|
||||
System.err.printf(map.toString());
|
||||
|
||||
|
||||
return "success";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.controller.req.CollectObjectReq;
|
||||
import com.ruoyi.controller.req.CollectPageReq;
|
||||
import com.ruoyi.frequency.collect.service.CollectService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import com.ruoyi.vo.UserVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 收藏
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/collect")
|
||||
@Api(tags = "收藏")
|
||||
public class ApiCollectController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private CollectService collectService;
|
||||
|
||||
@PostMapping("/collectObject")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "收藏", notes = "收藏")
|
||||
public ResponseData collectObject(@Valid @RequestBody CollectObjectReq req) {
|
||||
return collectService.collectObject(req, getUserVo());
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/collectPage")
|
||||
@ApiOperation(value = "收藏列表", notes = "收藏列表")
|
||||
@UserLoginToken
|
||||
public ResponseData collectPage(@RequestBody CollectPageReq req) {
|
||||
UserVo userVo = getUserVo();
|
||||
req.setUserId(userVo.getUserId());
|
||||
req.setUserType(userVo.getUserType());
|
||||
return collectService.collectPage(req, userVo);
|
||||
}
|
||||
|
||||
@PostMapping("/otherCollectPage")
|
||||
@ApiOperation(value = "收藏列表(别人查看)", notes = "收藏列表(别人查看)")
|
||||
public ResponseData otherCollectPage(@RequestBody CollectPageReq req) {
|
||||
return collectService.otherCollectPage(req,getUserVo());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.common.page.PageResult;
|
||||
import com.ruoyi.controller.req.CommentPageReq;
|
||||
import com.ruoyi.controller.req.CommentReq;
|
||||
import com.ruoyi.controller.req.DialoguePageReq;
|
||||
import com.ruoyi.controller.resp.CommentPageResp;
|
||||
import com.ruoyi.controller.resp.CommentResp;
|
||||
import com.ruoyi.frequency.comment.service.CommentService;
|
||||
import com.ruoyi.post.controller.req.DeleteCommentReq;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.BodyIdReq;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
* 新闻评论相关
|
||||
* @author liwenlong
|
||||
*
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/comment")
|
||||
@Api(tags = "新闻评论相关")
|
||||
public class ApiCommentController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private CommentService commentService;
|
||||
|
||||
@PostMapping("/comment")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "评论", notes = "评论")
|
||||
public ResponseData<CommentResp> comment(@RequestBody CommentReq req) {
|
||||
return commentService.comment(req,getUserVo());
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/commentPage")
|
||||
@ApiOperation(value = "评论列表", notes = "评论列表")
|
||||
public ResponseData<PageResult<Page<CommentPageResp>>> commentPage(@RequestBody CommentPageReq req) {
|
||||
return commentService.commentPage(req,getUserVo());
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/deleteComment")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "删除评论", notes = "删除评论")
|
||||
public ResponseData deleteComment(@RequestBody DeleteCommentReq req) {
|
||||
return commentService.deleteComment(req,getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/commentDetail")
|
||||
@ApiOperation(value = "新闻评论详情", notes = "新闻评论详情")
|
||||
public ResponseData<CommentResp> commentDetail(@RequestBody BodyIdReq req) {
|
||||
return commentService.commentDetail(req.getId(),getUserVo());
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/commentDialoguePage")
|
||||
@ApiOperation(value = "对话评论列表", notes = "对话评论列表")
|
||||
public ResponseData<PageResult<Page<CommentPageResp>>> commentDialoguePage(@RequestBody DialoguePageReq req) {
|
||||
return commentService.commentDialoguePage(req,getUserVo());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.common.page.PageResult;
|
||||
import com.ruoyi.controller.req.FollowUserReq;
|
||||
import com.ruoyi.controller.req.FollowerPageByOther;
|
||||
import com.ruoyi.controller.resp.FollowPageResp;
|
||||
import com.ruoyi.frequency.follow.service.FollowService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 关注
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/follow")
|
||||
@Api(tags = "关注")
|
||||
public class ApiFollowController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private FollowService followService;
|
||||
|
||||
/**
|
||||
* 关注用户
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/followUser")
|
||||
@UserLoginToken
|
||||
@ApiOperation("关注用户")
|
||||
public ResponseData followUser(@Valid @RequestBody FollowUserReq req) {
|
||||
return followService.followUser(req, getUserVo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 关注列表(自己看)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/followerPageBySelf")
|
||||
@UserLoginToken
|
||||
@ApiOperation("关注列表(自己看)")
|
||||
public ResponseData<PageResult<FollowPageResp>> followerPageBySelf(@Valid @RequestBody FollowerPageByOther req) {
|
||||
return followService.followerPageBySelf(req, getUserVo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 关注列表(别人看)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/followerPageByOther")
|
||||
@ApiOperation("关注列表(别人看)")
|
||||
public ResponseData<PageResult<FollowPageResp>> followerPageByOther(@Valid @RequestBody FollowerPageByOther req) {
|
||||
return followService.followerPageByOther(req,getUserVo());
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 粉丝列表(自己看)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/fansPageBySelf")
|
||||
@UserLoginToken
|
||||
@ApiOperation("粉丝列表(自己看)")
|
||||
public ResponseData<PageResult<FollowPageResp>> fansPageBySelf(@Valid @RequestBody FollowerPageByOther req) {
|
||||
return followService.fansPageBySelf(req, getUserVo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 粉丝列表(别人看)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/fansPageByOther")
|
||||
@ApiOperation("粉丝列表(别人看)")
|
||||
public ResponseData<PageResult<FollowPageResp>> fansPageByOther(@Valid @RequestBody FollowerPageByOther req) {
|
||||
return followService.fansPageByOther(req,getUserVo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询未关注列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/notFollowerPageBySelf")
|
||||
@ApiOperation("查询未关注列表")
|
||||
public ResponseData<PageResult<FollowPageResp>> notFollowerPageBySelf(@Valid @RequestBody FollowerPageByOther req) {
|
||||
return followService.notFollowerPageBySelf(req,getUserVo());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.ruoyi.code.PublicCommon;
|
||||
import com.ruoyi.common.page.PageResult;
|
||||
import com.ruoyi.controller.req.*;
|
||||
import com.ruoyi.controller.resp.GoodsDetailResp;
|
||||
import com.ruoyi.controller.resp.GoodsPageResp;
|
||||
import com.ruoyi.frequency.mallgoods.service.MallGoodsService;
|
||||
import com.ruoyi.frequency.mallgoodstype.entity.MallGoodsType;
|
||||
import com.ruoyi.frequency.mallgoodstype.service.MallGoodsTypeService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/goods")
|
||||
@Api(tags = "商城")
|
||||
public class ApiGoodsController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private MallGoodsService goodsService;
|
||||
|
||||
@Autowired
|
||||
private MallGoodsTypeService goodsTypeService;
|
||||
|
||||
|
||||
@RequestMapping(value = "/goodsTypeList", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "商品类型列表")
|
||||
public ResponseData<List<MallGoodsType>> goodsTypeList() {
|
||||
List<MallGoodsType> list = goodsTypeService.list(new QueryWrapper<MallGoodsType>().lambda()
|
||||
.eq(MallGoodsType::getDelFlag, PublicCommon.启用).orderByAsc(MallGoodsType::getSort));
|
||||
return ResponseData.success(list);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/goodsPage", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "商品列表")
|
||||
public ResponseData<PageResult<GoodsPageResp>> goodsPage(@RequestBody GoodsPageReq req) {
|
||||
return goodsService.goodsPage(req,getUserVo());
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/goodsDetail", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "商品列表_详情")
|
||||
public ResponseData<GoodsDetailResp> goodsDetail(@RequestBody @NotNull(message = "商品id不能为空") Long goodsId) {
|
||||
return goodsService.goodsDetail(goodsId,getUserVo());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.ruoyi.code.DictConstant;
|
||||
import com.ruoyi.code.PublicCommon;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.common.core.redis.RedisService;
|
||||
import com.ruoyi.controller.req.CanFellReq;
|
||||
import com.ruoyi.controller.req.StatisticsReq;
|
||||
import com.ruoyi.controller.resp.StatisticsResp;
|
||||
import com.ruoyi.enums.order.OrderStatusEnums;
|
||||
import com.ruoyi.frequency.customer.entity.Customer;
|
||||
import com.ruoyi.frequency.customer.service.CustomerService;
|
||||
import com.ruoyi.frequency.order.entity.Order;
|
||||
import com.ruoyi.frequency.order.service.OrderService;
|
||||
import com.ruoyi.frequency.store.entity.Store;
|
||||
import com.ruoyi.frequency.store.service.StoreService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.utils.BusinessUtil;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 首页
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/home")
|
||||
@Api(tags = "首页")
|
||||
public class ApiHomeController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private CustomerService customerService;
|
||||
|
||||
@Autowired
|
||||
private StoreService storeService;
|
||||
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
|
||||
@Autowired
|
||||
private BusinessUtil businessUtil;
|
||||
|
||||
@Autowired
|
||||
private RedisService redisService;
|
||||
|
||||
|
||||
@PostMapping("/canFell")
|
||||
@ApiOperation(value = "是否可以体验app或者小程序", notes = "是否可以体验app或者小程序")
|
||||
public ResponseData canFell(@RequestBody CanFellReq req) {
|
||||
SysDictData dict = businessUtil.getDict("need_fell");
|
||||
if (dict == null || StrUtil.isBlank(dict.getDictValue())) {
|
||||
return ResponseData.success();
|
||||
}
|
||||
if ("2".equals(dict.getDictValue())) {
|
||||
return ResponseData.success();
|
||||
}
|
||||
|
||||
dict = businessUtil.getDict("fell_pwd");
|
||||
if (dict == null) {
|
||||
return ResponseData.error("未配置字典,请联系平台");
|
||||
}
|
||||
if (StrUtil.isBlank(dict.getDictValue())) {
|
||||
return ResponseData.error("未配置字典,请联系平台");
|
||||
}
|
||||
if (!dict.getDictValue().equals(req.getCode())) {
|
||||
return ResponseData.error("密码错误");
|
||||
}
|
||||
return ResponseData.success();
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/statistics")
|
||||
@ApiOperation(value = "首页统计", notes = "首页统计")
|
||||
public ResponseData<StatisticsResp> statistics(@RequestBody(required = false) StatisticsReq req) {
|
||||
StatisticsResp statisticsResp = new StatisticsResp();
|
||||
|
||||
//平台设置比例系数
|
||||
Integer scale = Integer.valueOf(businessUtil.getDict(DictConstant.平台设置比例系数).getDictValue());
|
||||
|
||||
//查询入驻设计师
|
||||
int customerNum = customerService.count(new QueryWrapper<Customer>().lambda()
|
||||
.ne(Customer::getDelFlag, PublicCommon.删除));
|
||||
statisticsResp.setCustomerNum(customerNum + scale);
|
||||
|
||||
//在线入驻设计师
|
||||
int onlineCustomerNum = customerService.count(new QueryWrapper<Customer>().lambda()
|
||||
.eq(Customer::getOnlineStatus, PublicCommon.在线)
|
||||
.ne(Customer::getDelFlag, PublicCommon.删除));
|
||||
statisticsResp.setOnlineCustomerNum(onlineCustomerNum);
|
||||
|
||||
//查询入驻技术
|
||||
List<Store> list = storeService.list(new QueryWrapper<Store>().lambda()
|
||||
.ne(Store::getDelFlag, PublicCommon.删除));
|
||||
|
||||
int storeNum = 0;
|
||||
if (list.size() > 0) {
|
||||
//查询已经认证的表现师
|
||||
storeNum = storeService.getAuthStore(list.stream().map(Store::getId).collect(Collectors.toList()), req.getIfHighend());
|
||||
}
|
||||
|
||||
statisticsResp.setStoreNum(storeNum + scale);
|
||||
|
||||
|
||||
List<Long> userIds = new ArrayList<>();
|
||||
|
||||
//在线表现师数
|
||||
String last_time_map_key = "last_time_" + 2;
|
||||
|
||||
Map<String, Object> cacheMap = redisService.getCacheMap(last_time_map_key);
|
||||
|
||||
cacheMap.forEach((key, value) -> {
|
||||
|
||||
long lastTimes = Long.valueOf(value.toString());
|
||||
|
||||
if (System.currentTimeMillis() - lastTimes < (6 * 60 * 1000)) {
|
||||
userIds.add(Long.valueOf(key));
|
||||
}
|
||||
});
|
||||
|
||||
int onlineStoreNum = userIds.size();
|
||||
|
||||
if (userIds.size() > 0) {
|
||||
//查询已经认证的表现师
|
||||
onlineStoreNum = storeService.getAuthStore(userIds, req.getIfHighend());
|
||||
}
|
||||
|
||||
statisticsResp.setOnlineStoreNum(onlineStoreNum + scale);
|
||||
|
||||
//成交订单数
|
||||
int orderNum = orderService.count(new QueryWrapper<Order>().lambda()
|
||||
.ge(Order::getStatus, OrderStatusEnums.to_be_evaluated.getCode()));
|
||||
statisticsResp.setOrderNum(orderNum + scale);
|
||||
|
||||
return ResponseData.success(statisticsResp);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.code.PublicCommon;
|
||||
import com.ruoyi.controller.resp.LevelResp;
|
||||
import com.ruoyi.enums.user.UserEnums;
|
||||
import com.ruoyi.frequency.customer.entity.Customer;
|
||||
import com.ruoyi.frequency.customer.service.CustomerService;
|
||||
import com.ruoyi.frequency.level.entity.Level;
|
||||
import com.ruoyi.frequency.level.service.LevelService;
|
||||
import com.ruoyi.frequency.store.entity.Store;
|
||||
import com.ruoyi.frequency.store.service.StoreService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import com.ruoyi.vo.UserVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.bouncycastle.asn1.cms.ecc.ECCCMSSharedInfo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 等级
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/level")
|
||||
@Slf4j
|
||||
@Api(tags = "等级")
|
||||
public class ApiLevelController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private LevelService levelService;
|
||||
|
||||
@Autowired
|
||||
private CustomerService customerService;
|
||||
|
||||
@Autowired
|
||||
private StoreService storeService;
|
||||
|
||||
|
||||
@PostMapping("/levelList")
|
||||
@ApiOperation(value = "等级列表", notes = "等级列表")
|
||||
public ResponseData<List<Level>> levelList(@RequestParam("type") Integer type) {
|
||||
List<Level> list = levelService.list(new QueryWrapper<Level>().lambda()
|
||||
.eq(Level::getType, type)
|
||||
.eq(Level::getDelFlag, PublicCommon.启用).orderByAsc(Level::getCompliance));
|
||||
return ResponseData.success(list);
|
||||
}
|
||||
|
||||
@PostMapping("/level")
|
||||
@ApiOperation(value = "会员等级", notes = "会员等级")
|
||||
@UserLoginToken
|
||||
public ResponseData<LevelResp> level() {
|
||||
LevelResp levelResp = new LevelResp();
|
||||
|
||||
UserVo userVo = getUserVo();
|
||||
|
||||
|
||||
if (ObjectUtil.equal(UserEnums.customer.getCode(),userVo.getUserType())){
|
||||
Customer customer = customerService.getById(userVo.getUserId());
|
||||
|
||||
levelResp.setPrice(customer.getConsumptionAmount());
|
||||
}else if (ObjectUtil.equal(UserEnums.store.getCode(),userVo.getUserType())){
|
||||
Store store = storeService.getById(userVo.getUserId());
|
||||
|
||||
levelResp.setPrice(store.getIncome());
|
||||
}else {
|
||||
return ResponseData.success();
|
||||
}
|
||||
|
||||
|
||||
|
||||
List<Level> levelList = levelService.list(new QueryWrapper<Level>().lambda()
|
||||
.eq(Level::getDelFlag, PublicCommon.启用)
|
||||
.eq(Level::getType, userVo.getUserType())
|
||||
.orderByDesc(Level::getCompliance)
|
||||
);
|
||||
levelList.stream()
|
||||
.filter(s -> levelResp.getPrice().compareTo(s.getCompliance()) >= 0)
|
||||
.findFirst()
|
||||
.ifPresent(one->{
|
||||
levelResp.setLevel(one.getName());
|
||||
levelResp.setLevelPrice(one.getCompliance());
|
||||
levelResp.setLevelVo(one);
|
||||
});
|
||||
|
||||
if (levelResp.getLevel() == null){
|
||||
levelResp.setLevelPrice(BigDecimal.ZERO);
|
||||
levelResp.setNextLevel(levelList.get(0).getName());
|
||||
levelResp.setNextLevelPrice(levelList.get(0).getCompliance());
|
||||
}else {
|
||||
//排序
|
||||
Comparator<Level> comparing = Comparator.comparing(Level::getCompliance);
|
||||
|
||||
levelList.stream().sorted(comparing)
|
||||
.filter(s->levelResp.getPrice().compareTo(s.getCompliance()) < 0)
|
||||
.findFirst()
|
||||
.ifPresent(one->{
|
||||
levelResp.setNextLevel(one.getName());
|
||||
levelResp.setNextLevelPrice(one.getCompliance());
|
||||
});
|
||||
}
|
||||
|
||||
return ResponseData.success(levelResp);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.common.page.PageResult;
|
||||
import com.ruoyi.controller.req.*;
|
||||
import com.ruoyi.controller.resp.MallOrderDetailResp;
|
||||
import com.ruoyi.controller.resp.MallOrderPageResp;
|
||||
import com.ruoyi.frequency.mallorder.service.MallOrderService;
|
||||
import com.ruoyi.frequency.mallrefund.entity.MallRefund;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.PayVo;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/mallOrder")
|
||||
@Api(tags = "商城")
|
||||
public class ApiMallOrderController extends RyController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private MallOrderService orderService;
|
||||
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/settlement", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "订单结算")
|
||||
public ResponseData<PayVo> settlement(@RequestBody MallSettlementReq req) {
|
||||
return ResponseData.success(orderService.settlement(req,getUserVo()));
|
||||
}
|
||||
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/createOrder", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "创建订单")
|
||||
public ResponseData createOrder(@RequestBody CreateOrderReq req) {
|
||||
return orderService.createOrder(req,getUserVo());
|
||||
}
|
||||
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/orderPage", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "商城订单列表")
|
||||
public ResponseData<PageResult<MallOrderPageResp>> orderPage(@RequestBody MallOrderPageReq req) {
|
||||
return orderService.orderPage(req, getUserVo());
|
||||
}
|
||||
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/orderDetail", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "商城订单列表_详情")
|
||||
public ResponseData<MallOrderDetailResp> orderDetail(@RequestBody @NotNull(message = "订单id不能为空") Long orderId) {
|
||||
return orderService.orderDetail(orderId, getUserVo());
|
||||
|
||||
}
|
||||
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/orderPay", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "商城订单列表——付款")
|
||||
public ResponseData orderPay(@RequestBody MallOrderPayReq req) {
|
||||
return orderService.orderPay(req, getUserVo());
|
||||
|
||||
}
|
||||
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/orderCancel", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "商城订单列表——取消")
|
||||
public ResponseData orderCancel(@RequestBody @NotNull(message = "订单id不能为空") Long orderId) {
|
||||
return orderService.orderCancel(orderId, getUserVo());
|
||||
}
|
||||
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/orderRefund", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "商城订单列表——退款")
|
||||
public ResponseData orderRefund(@RequestBody @NotNull(message = "订单id不能为空") Long orderId) {
|
||||
return orderService.orderRefund(orderId, getUserVo());
|
||||
}
|
||||
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/orderConfirm", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "商城订单列表——确认收货")
|
||||
public ResponseData orderConfirm(@RequestBody MallOrderConfirmReq req) {
|
||||
return orderService.orderConfirm(req, getUserVo());
|
||||
|
||||
}
|
||||
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/orderAfterApply", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "商城订单列表——售后申请")
|
||||
public ResponseData orderAfterApply(@RequestBody ApplyAfterSalesReq req) {
|
||||
return orderService.orderAfterApply(req, getUserVo());
|
||||
|
||||
}
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/orderAfterDetail", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "商城订单列表——售后——详情")
|
||||
public ResponseData<MallRefund> orderAfterDetail(@RequestBody Long orderId) {
|
||||
return orderService.orderAfterDetail(orderId, getUserVo());
|
||||
|
||||
}
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/orderAfterRevokeApply", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "商城订单列表——售后——撤销申请")
|
||||
public ResponseData orderAfterRevokeApply(@RequestBody Long refundId) {
|
||||
return orderService.orderAfterRevokeApply(refundId, getUserVo());
|
||||
|
||||
}
|
||||
|
||||
@UserLoginToken
|
||||
@RequestMapping("/customerDeliverGoods")
|
||||
@ApiOperation(value = "商城订单列表——售后——用户发货(申请售后成功)")
|
||||
public ResponseData customerDeliverGoods(@RequestBody CustomerDeliverGoodsReq req) {
|
||||
return orderService.customerDeliverGoods(req);
|
||||
}
|
||||
|
||||
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/evaluate", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "用户评价")
|
||||
public ResponseData evaluate(@RequestBody MallEvaluateReq req) {
|
||||
return orderService.evaluate(req,getUserVo());
|
||||
}
|
||||
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/onceAgainCreateOrder", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "再次下单")
|
||||
public ResponseData onceAgainCreateOrder(@RequestBody OnceAgainCreateOrderReq req) {
|
||||
return orderService.onceAgainCreateOrder(req,getUserVo());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.controller.req.IsNeedGetOrderDetailReq;
|
||||
import com.ruoyi.controller.req.IsNeedGetOrderDetailReq2;
|
||||
import com.ruoyi.controller.req.MessageReadOrDeleteReq;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.service.MessageService;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 消息中心
|
||||
* @author liwenlong
|
||||
*
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/message")
|
||||
@Api(tags = "消息中心")
|
||||
public class ApiMessageController extends RyController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private MessageService messageService;
|
||||
|
||||
|
||||
/**
|
||||
* 消息中心
|
||||
*
|
||||
* @author liwenlong
|
||||
*
|
||||
*/
|
||||
@UserLoginToken
|
||||
@PostMapping("/messageCenter")
|
||||
public ResponseData<Map<String, Object>> messageCenter() {
|
||||
return messageService.messageCenter(getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/isNeedGetMessageCenter")
|
||||
@ApiOperation(value = "是否需要重新调用消息中心接口", notes = "是否需要重新调用消息中心接口")
|
||||
@UserLoginToken
|
||||
public ResponseData<Boolean> isNeedGetMessageCenter(@RequestBody IsNeedGetOrderDetailReq2 req) {
|
||||
return messageService.isNeedGetMessageCenter(req,getUserVo());
|
||||
}
|
||||
|
||||
@UserLoginToken
|
||||
@PostMapping("/messageReadOrDelete")
|
||||
@ApiOperation(value = "消息列表_已读,删除消息", notes = "消息列表_已读,删除消息")
|
||||
public ResponseData messageReadOrDelete(@RequestBody MessageReadOrDeleteReq req) {
|
||||
return messageService.messageReadOrDelete(req, getUserVo());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.common.page.PageResult;
|
||||
import com.ruoyi.controller.req.LikeReq;
|
||||
import com.ruoyi.controller.req.NewsPageReq;
|
||||
import com.ruoyi.frequency.like.service.LikeService;
|
||||
import com.ruoyi.frequency.news.entity.News;
|
||||
import com.ruoyi.frequency.news.service.NewsService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.BodyIdReq;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 新闻
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/news")
|
||||
@Api(tags = "新闻")
|
||||
public class ApiNewsController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private NewsService newsService;
|
||||
|
||||
@PostMapping("/newsPage")
|
||||
@ApiOperation(value = "新闻列表", notes = "新闻列表")
|
||||
// @UserLoginToken
|
||||
public ResponseData<PageResult<Page<News>>> newsPage(@RequestBody @Valid NewsPageReq req) {
|
||||
return newsService.newsPage(req,getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/newsDetail")
|
||||
@ApiOperation(value = "新闻详情", notes = "新闻详情")
|
||||
// @UserLoginToken
|
||||
public ResponseData<News> newsDetail(@RequestBody @Valid BodyIdReq req) {
|
||||
return newsService.newsDetail(req.getId(),req.getIsAddBrowseNum(),getUserVo());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private LikeService likeService;
|
||||
|
||||
@PostMapping("/newsLike")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "新闻点赞", notes = "新闻点赞")
|
||||
public ResponseData newsLike(@RequestBody LikeReq req) {
|
||||
return likeService.like(req,getUserVo());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.system.domain.SysNotice;
|
||||
import com.ruoyi.system.service.ISysNoticeService;
|
||||
import com.ruoyi.vo.BodyIdReq;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公告
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/notice")
|
||||
@Api(tags = "公告")
|
||||
public class ApiNoticeController extends RyController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private ISysNoticeService sysNoticeService;
|
||||
|
||||
@PostMapping("/noticeList")
|
||||
@ApiOperation(value = "公告", notes = "公告")
|
||||
public ResponseData<List<SysNotice>> noticeList(@RequestBody(required = false) String noticeType) {
|
||||
|
||||
SysNotice sysNotice = new SysNotice();
|
||||
sysNotice.setNoticeType(noticeType);
|
||||
sysNotice.setIsApp(2);
|
||||
sysNotice.setStatus("0");
|
||||
List<SysNotice> sysNotices = sysNoticeService.selectNoticeList(sysNotice);
|
||||
return ResponseData.success(sysNotices);
|
||||
}
|
||||
|
||||
@PostMapping("/detail")
|
||||
@ApiOperation(value = "公告详情", notes = "公告详情")
|
||||
public ResponseData<SysNotice> detail(@Valid @NotNull(message = "id不能为空") @RequestBody BodyIdReq req) {
|
||||
return ResponseData.success(this.sysNoticeService.selectNoticeById(req.getId()));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.ruoyi.enums.user.UserEnums;
|
||||
import com.ruoyi.frequency.customer.mapper.CustomerMapper;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.utils.BusinessUtil;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import com.ruoyi.vo.UserVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
*在线
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/online")
|
||||
@Slf4j
|
||||
@Api(tags = "在线")
|
||||
public class ApiOnlineController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private RedisTemplate redisTemplate;
|
||||
|
||||
@Autowired
|
||||
private BusinessUtil businessUtil;
|
||||
|
||||
@Autowired
|
||||
private CustomerMapper customerMapper;
|
||||
|
||||
|
||||
@PostMapping("/online")
|
||||
@ApiOperation(value = "定时调取统计在线时间", notes = "定时调取统计在线时间")
|
||||
public ResponseData onlineTimeStatistics() {
|
||||
|
||||
UserVo userVo = getUserVo();
|
||||
|
||||
if (userVo.getUserType() == -1 || userVo.getUserType().equals(UserEnums.sale.getCode())){
|
||||
return ResponseData.success();
|
||||
}
|
||||
|
||||
//累计时长
|
||||
String total_times_map_key = "total_times_" + userVo.getUserType();
|
||||
|
||||
//上次调用此接口的时间
|
||||
String last_time_map_key = "last_time_" + userVo.getUserType();
|
||||
|
||||
//首先从redis里查
|
||||
Long totalTime = 0L;
|
||||
if (redisTemplate.opsForHash().hasKey(total_times_map_key,userVo.getUserId().toString())) {
|
||||
totalTime = Long.valueOf(redisTemplate.opsForHash().get(total_times_map_key, userVo.getUserId().toString()).toString());
|
||||
} else {
|
||||
//从数据库查询的累计时长
|
||||
totalTime = Long.valueOf(businessUtil.getUserFieldValue(userVo,"onlineDuration").toString()) * 60 * 1000;
|
||||
}
|
||||
|
||||
Integer onlineStatus = 1;
|
||||
|
||||
//查询上次调用此接口的时间
|
||||
Long lastTimes = 0L;
|
||||
if (redisTemplate.opsForHash().hasKey(last_time_map_key,userVo.getUserId().toString())) {
|
||||
lastTimes = Long.valueOf(redisTemplate.opsForHash().get(last_time_map_key, userVo.getUserId().toString()).toString());
|
||||
|
||||
log.info("用户" + userVo.getUserId() + "上次调取时长:" + (System.currentTimeMillis() - lastTimes)/60/1000 + "分钟");
|
||||
|
||||
//判断当前时间和上次时间是否超过5.5分钟(考虑到网络延时和程序卡顿,多半分钟)
|
||||
if (System.currentTimeMillis() - lastTimes < (6* 60 * 1000)) {
|
||||
totalTime = totalTime + (System.currentTimeMillis() - lastTimes);
|
||||
}else {
|
||||
onlineStatus = 2;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//上次调取时间
|
||||
redisTemplate.opsForHash().put(last_time_map_key, userVo.getUserId().toString(),System.currentTimeMillis());
|
||||
|
||||
//累计时长
|
||||
redisTemplate.opsForHash().put(total_times_map_key, userVo.getUserId().toString(),totalTime);
|
||||
|
||||
//修改数据库在线时长
|
||||
businessUtil.updateOnlineDuration(userVo,totalTime,onlineStatus);
|
||||
|
||||
log.info("用户" + userVo.getUserId() + "累计在线时长:" + totalTime/60/1000 + "分钟");
|
||||
|
||||
customerMapper.insertOnlineLog(userVo);
|
||||
|
||||
return ResponseData.success();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.common.page.PageResult;
|
||||
import com.ruoyi.controller.req.OrderChangeRecordPageReq;
|
||||
import com.ruoyi.frequency.orderchangerecord.entity.OrderChangeRecord;
|
||||
import com.ruoyi.frequency.orderchangerecord.service.OrderChangeRecordService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 调价
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/orderChangeRecord")
|
||||
@Api(tags = "调价")
|
||||
public class ApiOrderChangeRecordController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private OrderChangeRecordService orderChangeRecordService;
|
||||
|
||||
|
||||
@PostMapping("/orderChangeRecordPage")
|
||||
@ApiOperation(value = "订单调价记录", notes = "订单调价记录")
|
||||
@UserLoginToken
|
||||
public ResponseData<PageResult<Page<OrderChangeRecord>>> orderChangeRecordPage(@RequestBody @Valid OrderChangeRecordPageReq req) {
|
||||
return orderChangeRecordService.orderChangeRecordPage(req,getUserVo());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,322 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.code.DictConstant;
|
||||
import com.ruoyi.code.Token;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.common.page.PageResult;
|
||||
import com.ruoyi.controller.req.*;
|
||||
import com.ruoyi.controller.resp.OrderDataResp;
|
||||
import com.ruoyi.controller.resp.OrderDetailResp;
|
||||
import com.ruoyi.controller.resp.OrderPageResp;
|
||||
import com.ruoyi.frequency.customer.entity.Customer;
|
||||
import com.ruoyi.frequency.customer.service.CustomerService;
|
||||
import com.ruoyi.frequency.order.entity.Order;
|
||||
import com.ruoyi.frequency.order.service.OrderService;
|
||||
import com.ruoyi.frequency.workstype.service.WorksTypeService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.utils.BusinessUtil;
|
||||
import com.ruoyi.vo.BodyIdReq;
|
||||
import com.ruoyi.vo.PayVo;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/order")
|
||||
@Api(tags = "订单")
|
||||
public class ApiOrderController extends RyController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
|
||||
|
||||
@PostMapping("/orderRelease")
|
||||
@ApiOperation(value = "发布订单", notes = "发布订单")
|
||||
@UserLoginToken
|
||||
public ResponseData orderRelease(@RequestBody OrderReleaseReq req) {
|
||||
return orderService.orderRelease(req, getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/customerPay")
|
||||
@ApiOperation(value = "表现师发布订单--设计师支付", notes = "表现师发布订单--设计师支付")
|
||||
@UserLoginToken
|
||||
public ResponseData customerPay(@RequestBody CustomerPayReq req) {
|
||||
return orderService.customerPay(req, getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/orderPage")
|
||||
@ApiOperation(value = "订单列表", notes = "订单列表")
|
||||
@UserLoginToken
|
||||
public ResponseData<PageResult<Page<OrderPageResp>>> orderPage(@RequestBody OrderPageReq req) {
|
||||
return orderService.orderPage(req, getUserVo());
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/orderDetail")
|
||||
@ApiOperation(value = "订单详情", notes = "订单详情")
|
||||
@UserLoginToken
|
||||
public ResponseData<OrderDetailResp> orderDetail(@RequestBody BodyIdReq req) {
|
||||
return orderService.orderDetail(req.getId(), getUserVo());
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/isNeedGetOrderDetail")
|
||||
@ApiOperation(value = "是否需要重新调用订单详情接口", notes = "是否需要重新调用订单详情接口")
|
||||
@UserLoginToken
|
||||
public ResponseData<Boolean> isNeedGetOrderDetail(@RequestBody IsNeedGetOrderDetailReq req) {
|
||||
return orderService.isNeedGetOrderDetail(req);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/storeOrderReceiving")
|
||||
@ApiOperation(value = "表现师接单", notes = "表现师接单")
|
||||
@UserLoginToken
|
||||
@RepeatSubmit
|
||||
public ResponseData storeOrderReceiving(@RequestBody BodyIdReq req) {
|
||||
return orderService.storeOrderReceiving(req.getId(), getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/orderCancel")
|
||||
@ApiOperation(value = "取消订单", notes = "取消订单")
|
||||
@UserLoginToken
|
||||
public ResponseData orderCancel(@RequestBody BodyIdReq req) {
|
||||
return orderService.orderCancel(req.getId(), getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/confirmStore")
|
||||
@ApiOperation(value = "确认师傅(表现师)", notes = "确认师傅(表现师)")
|
||||
@UserLoginToken
|
||||
public ResponseData confirmStore(@RequestBody ConfirmStoreReq req) {
|
||||
return orderService.confirmStore(req, getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/orderAppeal")
|
||||
@ApiOperation(value = "订单申诉", notes = "订单申诉")
|
||||
@UserLoginToken
|
||||
public ResponseData orderAppeal(@RequestBody OrderAppealReq req) {
|
||||
return orderService.orderAppeal(req, getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/cancelOrderAppeal")
|
||||
@ApiOperation(value = "取消订单申诉", notes = "取消订单申诉")
|
||||
@UserLoginToken
|
||||
public ResponseData cancelOrderAppeal(@RequestBody BodyIdReq req) {
|
||||
return orderService.cancelOrderAppeal(req, getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/orderAdjustPricePayCount")
|
||||
@ApiOperation(value = "计算订单调价支付定金金额(超出现在价格)", notes = "计算订单调价支付定金金额(超出现在价格)")
|
||||
@UserLoginToken
|
||||
public ResponseData<PayVo> orderAdjustPricePayCount(@RequestBody OrderAdjustPricePayCountReq req) {
|
||||
return orderService.orderAdjustPricePayCount(req, getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/orderAdjustPrice")
|
||||
@ApiOperation(value = "订单调价", notes = "订单调价")
|
||||
@UserLoginToken
|
||||
public ResponseData orderAdjustPrice(@RequestBody OrderAdjustPriceReq req) {
|
||||
return orderService.orderAdjustPrice(req, getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/orderAdjustPriceConfirm")
|
||||
@ApiOperation(value = "订单调价确认", notes = "订单调价确认")
|
||||
@UserLoginToken
|
||||
public ResponseData orderAdjustPriceConfirm(@RequestBody OrderAdjustPriceConfirmReq req) {
|
||||
return orderService.orderAdjustPriceConfirm(req, getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/orderAdjustPriceRefuse")
|
||||
@ApiOperation(value = "订单调价拒绝", notes = "订单调价拒绝")
|
||||
@UserLoginToken
|
||||
public ResponseData orderAdjustPriceRefuse(@RequestBody RefuseReq req) {
|
||||
return orderService.orderAdjustPriceRefuse(req, getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/orderExtension")
|
||||
@ApiOperation(value = "订单延期", notes = "订单延期")
|
||||
@UserLoginToken(userTokenPre = {Token.store})
|
||||
public ResponseData orderExtension(@RequestBody OrderExtensionReq req) {
|
||||
return orderService.orderExtension(req, getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/orderExtensionCancel/{orderId}")
|
||||
@ApiOperation(value = "订单延期取消", notes = "订单延期取消")
|
||||
@UserLoginToken(userTokenPre = {Token.store})
|
||||
public ResponseData orderExtensionCancel(@PathVariable("orderId") Long orderId) {
|
||||
return orderService.orderExtensionCancel(orderId);
|
||||
}
|
||||
|
||||
@PostMapping("/orderExtensionConfirm")
|
||||
@ApiOperation(value = "订单延期确认", notes = "订单延期确认")
|
||||
@UserLoginToken
|
||||
public ResponseData orderExtensionConfirm(@RequestBody BodyIdReq req) {
|
||||
return orderService.orderExtensionConfirm(req.getId(), getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/orderExtensionRefuse")
|
||||
@ApiOperation(value = "订单延期拒绝", notes = "订单延期拒绝")
|
||||
@UserLoginToken
|
||||
public ResponseData orderExtensionRefuse(@RequestBody RefuseReq req) {
|
||||
return orderService.orderExtensionRefuse(req, getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/receiveDrawingsAndPay")
|
||||
@ApiOperation(value = "支付尾款", notes = "支付尾款")
|
||||
@UserLoginToken
|
||||
public ResponseData receiveDrawingsAndPay(@RequestBody ReceiveDrawingsAndPayReq req) {
|
||||
return orderService.receiveDrawingsAndPay(req, getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/sampleImagesUpload")
|
||||
@ApiOperation(value = "上传大图", notes = "上传大图")
|
||||
@UserLoginToken
|
||||
public ResponseData sampleImagesUpload(@RequestBody SampleImagesUploadReq req) {
|
||||
return orderService.sampleImagesUpload(req, getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/sampleImagesAddendum")
|
||||
@ApiOperation(value = "追加大图", notes = "追加大图")
|
||||
@UserLoginToken
|
||||
public ResponseData sampleImagesAddendum(@RequestBody SampleImagesUploadReq req) {
|
||||
return orderService.sampleImagesAddendum(req, getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/evaluate")
|
||||
@ApiOperation(value = "评价", notes = "评价")
|
||||
@UserLoginToken
|
||||
public ResponseData evaluate(@RequestBody EvaluateReq req) {
|
||||
return orderService.evaluate(req, getUserVo());
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/evaluateCountStar")
|
||||
@ApiOperation(value = "评价计算评分", notes = "评价计算评分")
|
||||
@UserLoginToken
|
||||
public ResponseData evaluateCountStar(@RequestBody EvaluateReq req) {
|
||||
return orderService.evaluateCountStar(req, getUserVo());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private WorksTypeService worksTypeService;
|
||||
|
||||
@PostMapping("/projectHallPage")
|
||||
@ApiOperation(value = "项目大厅", notes = "项目大厅")
|
||||
public ResponseData<PageResult<Page<OrderPageResp>>> projectHallPage(@RequestBody OrderPageReq req) {
|
||||
if (ObjectUtil.isNotEmpty(req.getTypeId())) {
|
||||
//根据类型id获取三级id
|
||||
List<Long> typeIdList = worksTypeService.getIdsByTypeId(req.getTypeId());
|
||||
if (typeIdList.isEmpty()) {
|
||||
return ResponseData.success(new PageResult<>(new Page<>(req.getPageNo(), req.getPageSize())));
|
||||
}
|
||||
req.setTypeIds(typeIdList);
|
||||
}
|
||||
|
||||
req.setIsHall(true);
|
||||
|
||||
return orderService.orderPage(req, getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/orderData")
|
||||
@ApiOperation(value = "订单列表上方统计", notes = "订单列表上方统计")
|
||||
@UserLoginToken()
|
||||
public ResponseData<OrderDataResp> orderData(@RequestBody(required = false) OrderPageReq orderPageReq) {
|
||||
return orderService.orderData(orderPageReq == null ? new OrderPageReq() : orderPageReq, getUserVo());
|
||||
}
|
||||
|
||||
|
||||
@Autowired
|
||||
private BusinessUtil businessUtil;
|
||||
|
||||
@Autowired
|
||||
private CustomerService customerService;
|
||||
|
||||
@PostMapping("/calculateFirstAmount")
|
||||
@ApiOperation(value = "计算订单首款支付金额", notes = "计算订单首款支付金额")
|
||||
@UserLoginToken
|
||||
public ResponseData<PayVo> calculateFirstAmount(@RequestBody CalculateFirstAmountReq req) {
|
||||
|
||||
PayVo payVo = new PayVo();
|
||||
BigDecimal firstPrice = null;
|
||||
BigDecimal maxGivePrice = null;
|
||||
if (req.getOrderId() != null) {
|
||||
Order order = orderService.getById(req.getOrderId());
|
||||
firstPrice = order.getFirstPrice();
|
||||
maxGivePrice = order.getFirstGivePrice();
|
||||
} else {
|
||||
|
||||
SysDictData dict = businessUtil.getDict(DictConstant.OrderDict.首款支付占比);
|
||||
//首款支付比例
|
||||
BigDecimal ratio = BigDecimal.ZERO;
|
||||
|
||||
if (dict != null && ObjectUtil.isNotEmpty(dict.getDictValue())) {
|
||||
ratio = new BigDecimal(dict.getDictValue());
|
||||
}
|
||||
|
||||
firstPrice = req.getAmount().multiply(ratio).setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
maxGivePrice = businessUtil.userMaxGivePrice(getUserVo(), firstPrice);
|
||||
}
|
||||
|
||||
payVo.setPrice(firstPrice);
|
||||
//赠送最大支付金额
|
||||
payVo.setMaxGivePrice(maxGivePrice);
|
||||
|
||||
return ResponseData.success(payVo);
|
||||
}
|
||||
|
||||
@PostMapping("/calculateFinalAmount/{orderId}")
|
||||
@ApiOperation(value = "计算订单尾款支付金额", notes = "计算订单尾款支付金额")
|
||||
public ResponseData<PayVo> calculateFinalAmount(@PathVariable Long orderId) {
|
||||
|
||||
//查询订单
|
||||
Order order = orderService.getById(orderId);
|
||||
|
||||
PayVo payVo = new PayVo();
|
||||
|
||||
//尾款支付金额
|
||||
BigDecimal finalPrice = order.getAmount().subtract(order.getFirstPrice());
|
||||
payVo.setPrice(finalPrice);
|
||||
|
||||
//赠送金额使用最大比例
|
||||
SysDictData give_dict = businessUtil.getDict(DictConstant.OrderDict.赠送金额支付占比);
|
||||
//首款支付比例
|
||||
BigDecimal give_ratio = BigDecimal.ZERO;
|
||||
|
||||
if (give_dict != null && ObjectUtil.isNotEmpty(give_dict.getDictValue())) {
|
||||
give_ratio = new BigDecimal(give_dict.getDictValue());
|
||||
}
|
||||
|
||||
//赠送最大支付金额
|
||||
BigDecimal maxGivePrice = finalPrice.multiply(give_ratio).setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
|
||||
//查询用户抵用金
|
||||
Customer customer = customerService.getById(getUserVo().getUserId());
|
||||
|
||||
maxGivePrice = customer.getGiveBalance().compareTo(maxGivePrice) == 1 ? maxGivePrice : customer.getGiveBalance();
|
||||
|
||||
payVo.setMaxGivePrice(maxGivePrice);
|
||||
|
||||
return ResponseData.success(payVo);
|
||||
}
|
||||
|
||||
@PostMapping("/getLakalaPaySuccess")
|
||||
@ApiOperation(value = "获取拉卡拉支付是否成功", notes = "获取拉卡拉支付是否成功")
|
||||
public ResponseData getLakalaPaySuccess(@RequestBody LakalaPaySuccessReq req) {
|
||||
Boolean paySuccess = businessUtil.isPaySuccess(req.getOutOrderNo());
|
||||
return ResponseData.success(paySuccess);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.common.page.PageResult;
|
||||
import com.ruoyi.controller.req.OrderChangeRecordPageReq;
|
||||
import com.ruoyi.frequency.orderextensionrecord.entity.OrderExtensionRecord;
|
||||
import com.ruoyi.frequency.orderextensionrecord.service.OrderExtensionRecordService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 延期
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/orderExtensionRecord")
|
||||
@Api(tags = "延期")
|
||||
public class ApiOrderExtensionRecordController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private OrderExtensionRecordService orderExtensionRecordService;
|
||||
|
||||
|
||||
@PostMapping("/orderExtensionRecordPage")
|
||||
@ApiOperation(value = "订单延期记录", notes = "订单延期记录")
|
||||
@UserLoginToken
|
||||
public ResponseData<PageResult<Page<OrderExtensionRecord>>> orderExtensionRecordPage(@RequestBody @Valid OrderChangeRecordPageReq req) {
|
||||
return orderExtensionRecordService.orderExtensionRecordPage(req,getUserVo());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,166 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.code.PublicCommon;
|
||||
import com.ruoyi.common.page.PageResult;
|
||||
import com.ruoyi.controller.req.OrderMessagePageReq;
|
||||
import com.ruoyi.controller.resp.MallOrderPageResp;
|
||||
import com.ruoyi.controller.resp.MessageOrderPageResp;
|
||||
import com.ruoyi.controller.resp.OrderDetailResp;
|
||||
import com.ruoyi.frequency.mallorder.service.MallOrderService;
|
||||
import com.ruoyi.frequency.order.mapper.OrderMapper;
|
||||
import com.ruoyi.frequency.ordermessage.entity.OrderMessage;
|
||||
import com.ruoyi.frequency.ordermessage.entity.OrderMessageUtil;
|
||||
import com.ruoyi.frequency.ordermessage.service.OrderMessageService;
|
||||
import com.ruoyi.controller.req.MessageReadOrDeleteReq;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import com.ruoyi.vo.UserVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* 订单消息
|
||||
* @author liwenlong
|
||||
*
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/message")
|
||||
@Api(tags = "订单消息")
|
||||
public class ApiOrderMessageController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private OrderMessageService orderMessageService;
|
||||
|
||||
@Autowired
|
||||
private OrderMapper orderMapper;
|
||||
|
||||
@Autowired
|
||||
private MallOrderService mallOrderService;
|
||||
|
||||
|
||||
@UserLoginToken
|
||||
@PostMapping("/orderMessagePage")
|
||||
@ApiOperation(value = "订单消息列表", notes = "订单消息列表")
|
||||
public ResponseData<List<OrderMessageUtil>> orderMessageList(@RequestBody OrderMessagePageReq req) {
|
||||
|
||||
UserVo userVo = getUserVo();
|
||||
|
||||
List<OrderMessage> orderMessageList = this.orderMessageService.orderMessageList(req,userVo);
|
||||
|
||||
if (orderMessageList.size() > 0){
|
||||
List<Long> orderIds = new ArrayList<>();
|
||||
|
||||
List<Long> mallOrderIds = new ArrayList<>();
|
||||
|
||||
orderMessageList.stream().forEach(s->{
|
||||
if (ObjectUtil.equal(PublicCommon.Order.订单,s.getOrderType())){
|
||||
orderIds.add(s.getOrderId());
|
||||
}else {
|
||||
mallOrderIds.add(s.getOrderId());
|
||||
}
|
||||
});
|
||||
|
||||
//订单
|
||||
orderIds.add(-1L);
|
||||
List<OrderDetailResp> OrderDetailResps = orderMapper.orderList(orderIds, userVo);
|
||||
Map<Long, List<OrderDetailResp>> orderMap = OrderDetailResps.stream().collect(Collectors.groupingBy(OrderDetailResp::getId));
|
||||
|
||||
//商城订单
|
||||
mallOrderIds.add(-1L);
|
||||
List<MallOrderPageResp> mallOrderPageResps = mallOrderService.orderList(mallOrderIds, userVo);
|
||||
Map<Long, List<MallOrderPageResp>> mallOrderMap = mallOrderPageResps.stream().collect(Collectors.groupingBy(MallOrderPageResp::getOrderId));
|
||||
|
||||
orderMessageList.forEach(orderMessage ->{
|
||||
|
||||
if (ObjectUtil.equal(PublicCommon.Order.订单,orderMessage.getOrderType())){
|
||||
List<OrderDetailResp> orderDetailRespList = orderMap.get(orderMessage.getOrderId());
|
||||
if (orderDetailRespList != null && orderDetailRespList.size() > 0) {
|
||||
orderMessage.setOrder(orderDetailRespList.get(0));
|
||||
}
|
||||
}else {
|
||||
List<MallOrderPageResp> mallOrderPageRespList = mallOrderMap.get(orderMessage.getOrderId());
|
||||
if (mallOrderPageRespList != null && mallOrderPageRespList.size() > 0) {
|
||||
orderMessage.setMallOrder(mallOrderPageRespList.get(0));
|
||||
}
|
||||
}
|
||||
|
||||
}) ;
|
||||
}
|
||||
|
||||
return ResponseData.success(orderMessageList);
|
||||
}
|
||||
|
||||
|
||||
@UserLoginToken
|
||||
@PostMapping("/messageOrderPage")
|
||||
@ApiOperation(value = "订单消息订单分组列表(按订单展示)", notes = "订单消息订单分组列表(按订单展示)")
|
||||
public ResponseData<PageResult<Page<MessageOrderPageResp>>> orderMessagePage(@RequestBody PageBasic req) {
|
||||
|
||||
UserVo userVo = getUserVo();
|
||||
|
||||
Page<MessageOrderPageResp> messageOrderPage = this.orderMessageService.messageOrderPage(req,userVo);
|
||||
|
||||
if (messageOrderPage.getRecords().size() > 0){
|
||||
List<Long> orderIds = new ArrayList<>();
|
||||
|
||||
List<Long> mallOrderIds = new ArrayList<>();
|
||||
|
||||
messageOrderPage.getRecords().stream().forEach(s->{
|
||||
if (ObjectUtil.equal(PublicCommon.Order.订单,s.getOrderType())){
|
||||
orderIds.add(s.getOrderId());
|
||||
}else {
|
||||
mallOrderIds.add(s.getOrderId());
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//订单
|
||||
orderIds.add(-1L);
|
||||
List<OrderDetailResp> OrderDetailResps = orderMapper.orderList(orderIds, userVo);
|
||||
Map<Long, List<OrderDetailResp>> orderMap = OrderDetailResps.stream().collect(Collectors.groupingBy(OrderDetailResp::getId));
|
||||
|
||||
//商城订单
|
||||
mallOrderIds.add(-1L);
|
||||
List<MallOrderPageResp> mallOrderPageResps = mallOrderService.orderList(mallOrderIds, userVo);
|
||||
Map<Long, List<MallOrderPageResp>> mallOrderMap = mallOrderPageResps.stream().collect(Collectors.groupingBy(MallOrderPageResp::getOrderId));
|
||||
|
||||
messageOrderPage.getRecords().forEach(orderMessage ->{
|
||||
|
||||
if (ObjectUtil.equal(PublicCommon.Order.订单,orderMessage.getOrderType())){
|
||||
List<OrderDetailResp> orderDetailRespList = orderMap.get(orderMessage.getOrderId());
|
||||
if (orderDetailRespList != null && orderDetailRespList.size() > 0) {
|
||||
orderMessage.setOrder(orderDetailRespList.get(0));
|
||||
}
|
||||
}else {
|
||||
List<MallOrderPageResp> mallOrderPageRespList = mallOrderMap.get(orderMessage.getOrderId());
|
||||
if (mallOrderPageRespList != null && mallOrderPageRespList.size() > 0) {
|
||||
orderMessage.setMallOrder(mallOrderPageRespList.get(0));
|
||||
}
|
||||
}
|
||||
|
||||
}) ;
|
||||
}
|
||||
return ResponseData.success(new PageResult<>(messageOrderPage));
|
||||
}
|
||||
|
||||
@UserLoginToken
|
||||
@PostMapping("/orderMessageReadOrDelete")
|
||||
@ApiOperation(value = "订单消息列表_已读,删除消息", notes = "订单消息列表_已读,删除消息")
|
||||
public ResponseData orderMessageReadOrDelete(@RequestBody MessageReadOrDeleteReq req) {
|
||||
return orderMessageService.orderMessageReadOrDelete(req, getUserVo());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,515 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.frequency.auth.service.AuthService;
|
||||
import com.ruoyi.frequency.bondrecord.service.BondRecordService;
|
||||
import com.ruoyi.frequency.highendauth.service.HighendAuthService;
|
||||
import com.ruoyi.frequency.order.service.OrderService;
|
||||
import com.ruoyi.frequency.rechargeorder.service.RechargeOrderService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.utils.BusinessUtil;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 支付回调
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/pay")
|
||||
@Slf4j
|
||||
@Api(tags = "支付回调")
|
||||
public class ApiPayController extends RyController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private BusinessUtil businessUtil;
|
||||
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
|
||||
/**
|
||||
* 订单首款支付宝回调地址
|
||||
*/
|
||||
@ApiOperation("订单首款支付宝回调地址")
|
||||
@RequestMapping(value = "/orderAliNotify", method = RequestMethod.POST)
|
||||
public void orderAliNotify(HttpServletRequest request, HttpServletResponse response) {
|
||||
log.info("订单首款支付宝回调开始........");
|
||||
try {
|
||||
ResponseData responseData = orderService.orderAliNotify(request, response);
|
||||
if (responseData.getSuccess()) {
|
||||
businessUtil.writeText(response, "success");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单首款微信回调地址
|
||||
*/
|
||||
@ApiOperation("订单首款微信回调地址")
|
||||
@RequestMapping(value = "/orderWxNotify", method = RequestMethod.POST)
|
||||
public void orderWxNotify(HttpServletRequest request, HttpServletResponse response) {
|
||||
log.info("订单首款微信回调开始........");
|
||||
String msg = "";
|
||||
try {
|
||||
ResponseData responseData = orderService.orderWxNotify(request, response);
|
||||
if (responseData.getSuccess()) {
|
||||
String resultMsg = String.format("<xml><return_code><![CDATA[%s]]></return_code><return_msg><![CDATA[%s]]></return_msg></xml>",
|
||||
("SUCCESS"), msg);
|
||||
businessUtil.writeText(response, resultMsg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
msg = e.getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("订单首款拉卡拉回调地址")
|
||||
@RequestMapping(value = "/orderLakalaNotify", method = RequestMethod.POST)
|
||||
public String orderLakalaNotify(@RequestBody String callbackData) {
|
||||
log.info("订单首款拉卡拉回调开始........");
|
||||
// 转换请求参数为 Map
|
||||
Map<String, String> paramMap = JSONObject.parseObject(callbackData, Map.class);
|
||||
|
||||
String msg = "";
|
||||
try {
|
||||
ResponseData responseData = orderService.orderLakalaNotify(paramMap);
|
||||
if (responseData.getSuccess()) {
|
||||
return "SUCCESS";
|
||||
}
|
||||
} catch (Exception e) {
|
||||
msg = e.getMessage();
|
||||
}
|
||||
return "SUCCESS";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 订单尾款支付宝回调地址
|
||||
*/
|
||||
@ApiOperation("订单尾款支付宝回调地址")
|
||||
@RequestMapping(value = "/secondOrderAliNotify", method = RequestMethod.POST)
|
||||
public void secondOrderAliNotify(HttpServletRequest request, HttpServletResponse response) {
|
||||
log.info("订单尾款支付宝回调开始........");
|
||||
try {
|
||||
ResponseData responseData = orderService.secondOrderAliNotify(request, response);
|
||||
if (responseData.getSuccess()) {
|
||||
businessUtil.writeText(response, "success");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单尾款微信回调地址
|
||||
*/
|
||||
@ApiOperation("订单尾款微信回调地址")
|
||||
@RequestMapping(value = "/secondOrderWxNotify", method = RequestMethod.POST)
|
||||
public void secondOrderWxNotify(HttpServletRequest request, HttpServletResponse response) {
|
||||
log.info("订单尾款微信回调开始........");
|
||||
String msg = "";
|
||||
try {
|
||||
ResponseData responseData = orderService.secondOrderWxNotify(request, response);
|
||||
if (responseData.getSuccess()) {
|
||||
String resultMsg = String.format("<xml><return_code><![CDATA[%s]]></return_code><return_msg><![CDATA[%s]]></return_msg></xml>",
|
||||
("SUCCESS"), msg);
|
||||
businessUtil.writeText(response, resultMsg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
msg = e.getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("订单尾款拉卡拉回调地址")
|
||||
@RequestMapping(value = "/secondOrderLakalaNotify", method = RequestMethod.POST)
|
||||
public String secondOrderLakalaNotify(@RequestBody String callbackData) {
|
||||
log.info("订单尾款拉卡拉回调开始........");
|
||||
// 转换请求参数为 Map
|
||||
Map<String, String> paramMap = JSONObject.parseObject(callbackData, Map.class);
|
||||
String msg = "";
|
||||
try {
|
||||
ResponseData responseData = orderService.secondOrderLakalaNotify(paramMap);
|
||||
if (responseData.getSuccess()) {
|
||||
return "SUCCESS";
|
||||
}
|
||||
} catch (Exception e) {
|
||||
msg = e.getMessage();
|
||||
}
|
||||
return "SUCCESS";
|
||||
}
|
||||
|
||||
|
||||
@Autowired
|
||||
private BondRecordService bondRecordService;
|
||||
|
||||
/**
|
||||
* 保证金支付宝回调地址
|
||||
*/
|
||||
@ApiOperation("保证金支付宝回调地址")
|
||||
@RequestMapping(value = "/bondAliNotify", method = RequestMethod.POST)
|
||||
public void bondAliNotify(HttpServletRequest request, HttpServletResponse response) {
|
||||
log.info("保证金支付宝回调开始........");
|
||||
try {
|
||||
ResponseData responseData = bondRecordService.bondAliNotify(request, response);
|
||||
if (responseData.getSuccess()) {
|
||||
businessUtil.writeText(response, "success");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保证金微信回调地址
|
||||
*/
|
||||
@ApiOperation("保证金微信回调地址")
|
||||
@RequestMapping(value = "/bondWxNotify", method = RequestMethod.POST)
|
||||
public void bondWxNotify(HttpServletRequest request, HttpServletResponse response) {
|
||||
log.info("保证金微信回调开始........");
|
||||
String msg = "";
|
||||
try {
|
||||
ResponseData responseData = bondRecordService.bondWxNotify(request, response);
|
||||
if (responseData.getSuccess()) {
|
||||
String resultMsg = String.format("<xml><return_code><![CDATA[%s]]></return_code><return_msg><![CDATA[%s]]></return_msg></xml>",
|
||||
("SUCCESS"), msg);
|
||||
businessUtil.writeText(response, resultMsg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
msg = e.getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("保证金拉卡拉回调地址")
|
||||
@RequestMapping(value = "/bondLakalaNotify", method = RequestMethod.POST)
|
||||
public String bondLakalaNotify(@RequestBody String callbackData) {
|
||||
log.info("保证金拉卡拉回调开始........");
|
||||
// 转换请求参数为 Map
|
||||
Map<String, String> paramMap = JSONObject.parseObject(callbackData, Map.class);
|
||||
String msg = "";
|
||||
try {
|
||||
ResponseData responseData = bondRecordService.bondLakalaNotify(paramMap);
|
||||
if (responseData.getSuccess()) {
|
||||
return "SUCCESS";
|
||||
}
|
||||
} catch (Exception e) {
|
||||
msg = e.getMessage();
|
||||
}
|
||||
return "SUCCESS";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
private AuthService authService;
|
||||
|
||||
/**
|
||||
* 普通认证支付宝回调地址
|
||||
*/
|
||||
@ApiOperation("普通认证支付宝回调地址")
|
||||
@RequestMapping(value = "/authAliNotify", method = RequestMethod.POST)
|
||||
public void authAliNotify(HttpServletRequest request, HttpServletResponse response) {
|
||||
log.info("普通认证支付宝回调开始........");
|
||||
try {
|
||||
ResponseData responseData = authService.authAliNotify(request, response);
|
||||
if (responseData.getSuccess()) {
|
||||
businessUtil.writeText(response, "success");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 普通认证微信回调地址
|
||||
*/
|
||||
@ApiOperation("普通认证微信回调地址")
|
||||
@RequestMapping(value = "/authWxNotify", method = RequestMethod.POST)
|
||||
public void authWxNotify(HttpServletRequest request, HttpServletResponse response) {
|
||||
log.info("普通认证微信回调开始........");
|
||||
String msg = "";
|
||||
try {
|
||||
ResponseData responseData = authService.authWxNotify(request, response);
|
||||
if (responseData.getSuccess()) {
|
||||
String resultMsg = String.format("<xml><return_code><![CDATA[%s]]></return_code><return_msg><![CDATA[%s]]></return_msg></xml>",
|
||||
("SUCCESS"), msg);
|
||||
businessUtil.writeText(response, resultMsg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
msg = e.getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("普通认证拉卡拉回调地址")
|
||||
@RequestMapping(value = "/authLakalaNotify", method = RequestMethod.POST)
|
||||
public String authLakalaNotify(@RequestBody String callbackData) {
|
||||
log.info("普通认证拉卡拉回调开始........");
|
||||
// 转换请求参数为 Map
|
||||
Map<String, String> paramMap = JSONObject.parseObject(callbackData, Map.class);
|
||||
String msg = "";
|
||||
try {
|
||||
ResponseData responseData = authService.authLakalaNotify(paramMap);
|
||||
if (responseData.getSuccess()) {
|
||||
return "SUCCESS";
|
||||
}
|
||||
} catch (Exception e) {
|
||||
msg = e.getMessage();
|
||||
}
|
||||
return "SUCCESS";
|
||||
}
|
||||
|
||||
|
||||
@Autowired
|
||||
private HighendAuthService highendAuthService;
|
||||
|
||||
/**
|
||||
* 高端认证支付宝回调地址
|
||||
*/
|
||||
@ApiOperation("高端认证支付宝回调地址")
|
||||
@RequestMapping(value = "/highendAuthAliNotify", method = RequestMethod.POST)
|
||||
public void highendAuthAliNotify(HttpServletRequest request, HttpServletResponse response) {
|
||||
log.info("高端认证支付宝回调开始........");
|
||||
try {
|
||||
ResponseData responseData = highendAuthService.highendAuthAliNotify(request, response);
|
||||
if (responseData.getSuccess()) {
|
||||
businessUtil.writeText(response, "success");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 高端认证微信回调地址
|
||||
*/
|
||||
@ApiOperation("高端认证微信回调地址")
|
||||
@RequestMapping(value = "/highendAuthWxNotify", method = RequestMethod.POST)
|
||||
public void highendAuthWxNotify(HttpServletRequest request, HttpServletResponse response) {
|
||||
log.info("高端认证微信回调开始........");
|
||||
String msg = "";
|
||||
try {
|
||||
ResponseData responseData = highendAuthService.highendAuthWxNotify(request, response);
|
||||
if (responseData.getSuccess()) {
|
||||
String resultMsg = String.format("<xml><return_code><![CDATA[%s]]></return_code><return_msg><![CDATA[%s]]></return_msg></xml>",
|
||||
("SUCCESS"), msg);
|
||||
businessUtil.writeText(response, resultMsg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
msg = e.getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("高端认证拉卡拉回调地址")
|
||||
@RequestMapping(value = "/highendAuthLakalaNotify", method = RequestMethod.POST)
|
||||
public String highendAuthLakalaNotify(@RequestBody String callbackData) {
|
||||
log.info("高端认证拉卡拉回调开始........");
|
||||
// 转换请求参数为 Map
|
||||
Map<String, String> paramMap = JSONObject.parseObject(callbackData, Map.class);
|
||||
String msg = "";
|
||||
try {
|
||||
ResponseData responseData = highendAuthService.highendAuthLakalaNotify(paramMap);
|
||||
if (responseData.getSuccess()) {
|
||||
return "SUCCESS";
|
||||
}
|
||||
} catch (Exception e) {
|
||||
msg = e.getMessage();
|
||||
}
|
||||
return "SUCCESS";
|
||||
}
|
||||
|
||||
|
||||
@Autowired
|
||||
private RechargeOrderService rechargeOrderService;
|
||||
|
||||
/**
|
||||
* 充值支付宝回调地址
|
||||
*/
|
||||
@ApiOperation("充值支付宝回调地址")
|
||||
@RequestMapping(value = "/rechargeAliNotify", method = RequestMethod.POST)
|
||||
public void rechargeAliNotify(HttpServletRequest request, HttpServletResponse response) {
|
||||
log.info("充值支付宝回调开始........");
|
||||
try {
|
||||
ResponseData responseData = rechargeOrderService.rechargeAliNotify(request, response);
|
||||
if (responseData.getSuccess()) {
|
||||
businessUtil.writeText(response, "success");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 充值微信回调地址
|
||||
*/
|
||||
@ApiOperation("充值微信回调地址")
|
||||
@RequestMapping(value = "/rechargeWxNotify", method = RequestMethod.POST)
|
||||
public void rechargeWxNotify(HttpServletRequest request, HttpServletResponse response) {
|
||||
log.info("充值微信回调开始........");
|
||||
String msg = "";
|
||||
try {
|
||||
ResponseData responseData = rechargeOrderService.rechargeWxNotify(request, response);
|
||||
if (responseData.getSuccess()) {
|
||||
String resultMsg = String.format("<xml><return_code><![CDATA[%s]]></return_code><return_msg><![CDATA[%s]]></return_msg></xml>",
|
||||
("SUCCESS"), msg);
|
||||
businessUtil.writeText(response, resultMsg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
msg = e.getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("充值拉卡拉回调地址")
|
||||
@RequestMapping(value = "/rechargeLakalaNotify", method = RequestMethod.POST)
|
||||
public String rechargeLakalaNotify(@RequestBody String callbackData) {
|
||||
log.info("充值拉卡拉回调开始........");
|
||||
// 转换请求参数为 Map
|
||||
Map<String, String> paramMap = JSONObject.parseObject(callbackData, Map.class);
|
||||
String msg = "";
|
||||
try {
|
||||
ResponseData responseData = rechargeOrderService.rechargeLakalaNotify(paramMap);
|
||||
if (responseData.getSuccess()) {
|
||||
return "SUCCESS";
|
||||
}
|
||||
} catch (Exception e) {
|
||||
msg = e.getMessage();
|
||||
}
|
||||
return "SUCCESS";
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 设计师调价支付宝回调地址
|
||||
*/
|
||||
@ApiOperation("设计师调价支付宝回调地址")
|
||||
@RequestMapping(value = "/orderAdjustPricePayAliNotify", method = RequestMethod.POST)
|
||||
public void orderAdjustPricePayAliNotify(HttpServletRequest request, HttpServletResponse response) {
|
||||
log.info("设计师调价支付宝回调开始........");
|
||||
try {
|
||||
ResponseData responseData = orderService.orderAdjustPricePayAliNotify(request, response);
|
||||
if (responseData.getSuccess()) {
|
||||
businessUtil.writeText(response, "success");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设计师调价微信回调地址
|
||||
*/
|
||||
@ApiOperation("设计师调价微信回调地址")
|
||||
@RequestMapping(value = "/orderAdjustPricePayWxNotify", method = RequestMethod.POST)
|
||||
public void orderAdjustPricePayWxNotify(HttpServletRequest request, HttpServletResponse response) {
|
||||
log.info("设计师调价微信回调开始........");
|
||||
String msg = "";
|
||||
try {
|
||||
ResponseData responseData = orderService.orderAdjustPricePayWxNotify(request, response);
|
||||
if (responseData.getSuccess()) {
|
||||
String resultMsg = String.format("<xml><return_code><![CDATA[%s]]></return_code><return_msg><![CDATA[%s]]></return_msg></xml>",
|
||||
("SUCCESS"), msg);
|
||||
businessUtil.writeText(response, resultMsg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
msg = e.getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("设计师调价拉卡拉回调地址")
|
||||
@RequestMapping(value = "/orderAdjustPricePayLakalaNotify", method = RequestMethod.POST)
|
||||
public String orderAdjustPricePayLakalaNotify(@RequestBody String callbackData) {
|
||||
log.info("设计师调价拉卡拉回调开始........");
|
||||
// 转换请求参数为 Map
|
||||
Map<String, String> paramMap = JSONObject.parseObject(callbackData, Map.class);
|
||||
String msg = "";
|
||||
try {
|
||||
ResponseData responseData = orderService.orderAdjustPricePayLakalaNotify(paramMap);
|
||||
if (responseData.getSuccess()) {
|
||||
return "SUCCESS";
|
||||
}
|
||||
} catch (Exception e) {
|
||||
msg = e.getMessage();
|
||||
}
|
||||
return "SUCCESS";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 表现师调价设计师确认支付宝回调地址
|
||||
*/
|
||||
@ApiOperation("表现师调价设计师确认支付宝回调地址")
|
||||
@RequestMapping(value = "/orderAdjustPriceConfirmPayAliNotify", method = RequestMethod.POST)
|
||||
public void orderAdjustPriceConfirmPayAliNotify(HttpServletRequest request, HttpServletResponse response) {
|
||||
log.info("表现师调价设计师确认支付宝回调地址开始........");
|
||||
String msg = "";
|
||||
try {
|
||||
ResponseData responseData = orderService.orderAdjustPriceConfirmPayAliNotify(request, response);
|
||||
if (responseData.getSuccess()) {
|
||||
businessUtil.writeText(response, "success");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 表现师调价设计师确认微信回调地址
|
||||
*/
|
||||
@ApiOperation("表现师调价设计师确认微信回调地址")
|
||||
@RequestMapping(value = "/orderAdjustPriceConfirmPayWxNotify", method = RequestMethod.POST)
|
||||
public void orderAdjustPriceConfirmPayWxNotify(HttpServletRequest request, HttpServletResponse response) {
|
||||
log.info("表现师调价设计师确认微信回调地址开始........");
|
||||
String msg = "";
|
||||
try {
|
||||
ResponseData responseData = orderService.orderAdjustPriceConfirmPayWxNotify(request, response);
|
||||
if (responseData.getSuccess()) {
|
||||
String resultMsg = String.format("<xml><return_code><![CDATA[%s]]></return_code><return_msg><![CDATA[%s]]></return_msg></xml>",
|
||||
("SUCCESS"), msg);
|
||||
businessUtil.writeText(response, resultMsg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
msg = e.getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("表现师调价设计师确认拉卡拉回调地址")
|
||||
@RequestMapping(value = "/orderAdjustPriceConfirmPayLakalaNotify", method = RequestMethod.POST)
|
||||
public String orderAdjustPriceConfirmPayLakalaNotify(@RequestBody String callbackData) {
|
||||
|
||||
log.info("表现师调价设计师确认拉卡拉回调开始........");
|
||||
// 转换请求参数为 Map
|
||||
Map<String, String> paramMap = JSONObject.parseObject(callbackData, Map.class);
|
||||
String msg = "";
|
||||
try {
|
||||
ResponseData responseData = orderService.orderAdjustPriceConfirmPayLakalaNotify(paramMap);
|
||||
if (responseData.getSuccess()) {
|
||||
return "SUCCESS";
|
||||
}
|
||||
} catch (Exception e) {
|
||||
msg = e.getMessage();
|
||||
}
|
||||
return "SUCCESS";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.code.PublicCommon;
|
||||
import com.ruoyi.common.page.PageResult;
|
||||
import com.ruoyi.controller.req.AnswerPageReq;
|
||||
import com.ruoyi.frequency.platformanswer.entity.PlatformAnswer;
|
||||
import com.ruoyi.frequency.platformanswer.service.PlatformAnswerService;
|
||||
import com.ruoyi.frequency.platformanswertype.entity.PlatformAnswerType;
|
||||
import com.ruoyi.frequency.platformanswertype.service.PlatformAnswerTypeService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.BodyIdReq;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 有问必答
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/answer")
|
||||
@Api(tags = "有问必答")
|
||||
public class ApiPlatformAnswerController extends RyController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private PlatformAnswerService platformAnswerService;
|
||||
|
||||
@Autowired
|
||||
private PlatformAnswerTypeService platformAnswerTypeService;
|
||||
|
||||
@PostMapping("/answerTypeList/{userType}")
|
||||
@ApiOperation(value = "有问必答分类", notes = "有问必答分类")
|
||||
public ResponseData<List<PlatformAnswerType>> answerTypeList(@PathVariable Integer userType) {
|
||||
List<PlatformAnswerType> list = platformAnswerTypeService.list(new QueryWrapper<PlatformAnswerType>().lambda()
|
||||
.eq(PlatformAnswerType::getDelFlag, PublicCommon.启用)
|
||||
.eq(PlatformAnswerType::getUserType,userType)
|
||||
.orderByAsc(PlatformAnswerType::getSort));
|
||||
return ResponseData.success(list);
|
||||
}
|
||||
|
||||
@PostMapping("/answerPage")
|
||||
@ApiOperation(value = "有问必答", notes = "有问必答")
|
||||
public ResponseData<PageResult<PlatformAnswer>> answerPage(@RequestBody AnswerPageReq req) {
|
||||
Page<PlatformAnswer> page = platformAnswerService.page(new Page<>(req.getPageNo(),req.getPageSize()),new QueryWrapper<PlatformAnswer>().lambda()
|
||||
.eq(PlatformAnswer::getDelFlag, PublicCommon.启用)
|
||||
.eq(PlatformAnswer::getUserType,req.getUserType())
|
||||
.eq(ObjectUtil.isNotEmpty(req.getPlatformAnswerTypeId()),PlatformAnswer::getPlatformAnswerTypeId,req.getPlatformAnswerTypeId())
|
||||
.orderByAsc(PlatformAnswer::getSort));
|
||||
return ResponseData.success(new PageResult<>(page));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/detail")
|
||||
@ApiOperation(value = "有问必答详情", notes = "有问必答详情")
|
||||
public ResponseData<PlatformAnswer> detail(@Valid @NotNull(message = "id不能为空") @RequestBody BodyIdReq req) {
|
||||
PlatformAnswer platformAnswer = this.platformAnswerService.getById(req.getId());
|
||||
PlatformAnswerType platformAnswerType = platformAnswerTypeService.getById(platformAnswer.getPlatformAnswerTypeId());
|
||||
platformAnswer.setPlatformAnswerTypeName(platformAnswerType.getName());
|
||||
//修改浏览数
|
||||
platformAnswerService.lambdaUpdate().setSql("browse_num = browse_num + 1")
|
||||
.eq(PlatformAnswer::getId,req.getId()).update();
|
||||
|
||||
return ResponseData.success(platformAnswer);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.code.PublicCommon;
|
||||
import com.ruoyi.common.page.PageResult;
|
||||
import com.ruoyi.controller.req.PlatformRulesPageReq;
|
||||
import com.ruoyi.frequency.platformrules.entity.PlatformRules;
|
||||
import com.ruoyi.frequency.platformrules.service.PlatformRulesService;
|
||||
import com.ruoyi.frequency.platformrulestype.entity.PlatformRulesType;
|
||||
import com.ruoyi.frequency.platformrulestype.service.PlatformRulesTypeService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.BodyIdReq;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/platformRules")
|
||||
@Api(tags = "平台规则")
|
||||
public class ApiPlatformRulesController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private PlatformRulesService platformRulesService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private PlatformRulesTypeService platformRulesTypeService;
|
||||
|
||||
@PostMapping("/rulesTypeList/{userType}")
|
||||
@ApiOperation(value = "平台规则分类列表", notes = "平台规则分类列表")
|
||||
public ResponseData<List<PlatformRulesType>> rulesTypeList(@PathVariable Integer userType) {
|
||||
List<PlatformRulesType> list = platformRulesTypeService.list(new QueryWrapper<PlatformRulesType>().lambda()
|
||||
.eq(PlatformRulesType::getDelFlag, PublicCommon.启用)
|
||||
.eq(PlatformRulesType::getUserType, userType)
|
||||
.orderByAsc(PlatformRulesType::getSort));
|
||||
return ResponseData.success(list);
|
||||
}
|
||||
|
||||
@PostMapping("/platformRulesPage")
|
||||
@ApiOperation(value = "平台规则列表", notes = "平台规则列表")
|
||||
public ResponseData<PageResult<PlatformRules>> platformRulesPage(@RequestBody PlatformRulesPageReq req) {
|
||||
Page<PlatformRules> page = platformRulesService.page(new Page<>(req.getPageNo(), req.getPageSize()), new QueryWrapper<PlatformRules>().lambda()
|
||||
.eq(PlatformRules::getUserType, req.getUserType())
|
||||
.eq(PlatformRules::getDelFlag, PublicCommon.启用)
|
||||
.eq(ObjectUtil.isNotEmpty(req.getPlatformRulesTypeId()), PlatformRules::getPlatformRulesTypeId, req.getPlatformRulesTypeId())
|
||||
.orderByAsc(PlatformRules::getSort)
|
||||
);
|
||||
if (page.getRecords().size() > 0) {
|
||||
page.getRecords().stream().forEach(s -> s.setContent(""));
|
||||
}
|
||||
return ResponseData.success(new PageResult<>(page));
|
||||
}
|
||||
|
||||
@PostMapping("/platformRulesDetail")
|
||||
@ApiOperation(value = "平台规则详情", notes = "平台规则详情")
|
||||
public ResponseData<PlatformRules> appealDetail(@RequestBody @Valid BodyIdReq req) {
|
||||
PlatformRules platformRules = platformRulesService.getById(req.getId());
|
||||
PlatformRulesType platformRulesType = platformRulesTypeService.getById(platformRules.getPlatformRulesTypeId());
|
||||
if (platformRulesType != null) {
|
||||
platformRules.setPlatformRulesTypeName(platformRulesType.getName());
|
||||
}
|
||||
return ResponseData.success(platformRules);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.common.page.PageResult;
|
||||
import com.ruoyi.enums.user.UserEnums;
|
||||
import com.ruoyi.frequency.auth.service.AuthService;
|
||||
import com.ruoyi.frequency.highendauth.service.HighendAuthService;
|
||||
import com.ruoyi.post.controller.req.PostPageReq;
|
||||
import com.ruoyi.post.controller.req.PostReleaseReq;
|
||||
import com.ruoyi.post.controller.resp.PostDetailResp;
|
||||
import com.ruoyi.post.controller.resp.PostPageResp;
|
||||
import com.ruoyi.post.frequency.post.service.PostService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.utils.BusinessUtil;
|
||||
import com.ruoyi.vo.BodyIdReq;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import com.ruoyi.vo.UserInfo;
|
||||
import com.ruoyi.vo.UserVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
* 帖子相关
|
||||
*
|
||||
* @author liwenlong
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/post")
|
||||
@Api(tags = "帖子相关")
|
||||
public class ApiPostController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private PostService postService;
|
||||
|
||||
@Autowired
|
||||
private AuthService authService;
|
||||
|
||||
@Autowired
|
||||
private HighendAuthService highendAuthService;
|
||||
|
||||
@Autowired
|
||||
private BusinessUtil businessUtil;
|
||||
|
||||
@UserLoginToken
|
||||
@PostMapping("/postRelease")
|
||||
@ApiOperation(value = "帖子发布", notes = "帖子发布")
|
||||
public ResponseData postRelease(@RequestBody PostReleaseReq req) {
|
||||
|
||||
UserVo userVo = getUserVo();
|
||||
|
||||
//判断表现师是否认证
|
||||
if (ObjectUtil.equal(UserEnums.store.getCode(), userVo.getUserType())) {
|
||||
UserInfo userInfo = businessUtil.getUserInfo(userVo);
|
||||
if (userInfo == null && userInfo.getIsAuth() != 2 && userInfo.getIfHighend() != 2 && userInfo.getIsKujialeAuth() != 2) {
|
||||
return ResponseData.error("清先进行平台认证或高端认证");
|
||||
}
|
||||
}
|
||||
|
||||
return postService.postRelease(req, userVo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "帖子列表", notes = "帖子列表")
|
||||
@PostMapping("/postPage")
|
||||
public ResponseData<PageResult<Page<PostPageResp>>> postPage(@RequestBody PostPageReq req) {
|
||||
return postService.postPage(req, getUserVo());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "帖子列表(自己查看)", notes = "帖子列表(自己查看)")
|
||||
@PostMapping("/postPageBySelf")
|
||||
public ResponseData<PageResult<Page<PostPageResp>>> postPageBySelf(@RequestBody PostPageReq req) {
|
||||
UserVo userVo = getUserVo();
|
||||
req.setUserId(userVo.getUserId());
|
||||
req.setUserType(userVo.getUserType());
|
||||
|
||||
return postService.postPage(req, userVo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "帖子列表(他人查看)", notes = "帖子列表(他人查看)")
|
||||
@PostMapping("/postPageByOtherSelf")
|
||||
public ResponseData<PageResult<Page<PostPageResp>>> postPageByOtherSelf(@RequestBody PostPageReq req) {
|
||||
return postService.postPage(req, getUserVo());
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/postDetail")
|
||||
@ApiOperation(value = "帖子详情", notes = "帖子详情")
|
||||
public ResponseData<PostDetailResp> postDetail(@RequestBody BodyIdReq req) {
|
||||
return postService.postDetail(req.getId(), req.getIsAddBrowseNum(), getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/postEdit")
|
||||
@ApiOperation(value = "帖子编辑", notes = "帖子编辑")
|
||||
public ResponseData postEdit(@RequestBody PostReleaseReq req) {
|
||||
return postService.postEdit(req, getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/postDelete")
|
||||
@ApiOperation(value = "帖子删除", notes = "帖子删除")
|
||||
public ResponseData postDelete(@RequestBody BodyIdReq req) {
|
||||
return postService.postDelete(req.getId(), getUserVo());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.code.PublicCommon;
|
||||
import com.ruoyi.controller.req.RechargeOrderReq;
|
||||
import com.ruoyi.frequency.rechargecoin.entity.RechargeCoin;
|
||||
import com.ruoyi.frequency.rechargecoin.service.RechargeCoinService;
|
||||
import com.ruoyi.frequency.rechargeorder.service.RechargeOrderService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 充值
|
||||
* @author ly
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/rechargeOrder")
|
||||
@Api(tags = "充值")
|
||||
public class ApiRechargeOrderController extends RyController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private RechargeOrderService rechargeOrderService;
|
||||
|
||||
@Autowired
|
||||
private RechargeCoinService rechargeCoinService;
|
||||
|
||||
@UserLoginToken
|
||||
@PostMapping("/rechargeOrder")
|
||||
@ApiOperation(value = "充值余额")
|
||||
public ResponseData rechargeOrder(@RequestBody RechargeOrderReq req) {
|
||||
return rechargeOrderService.rechargeOrder(req, getUserVo());
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/list", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "充值列表")
|
||||
public ResponseData list(@RequestBody(required = false) Integer type) {
|
||||
if (type == null) {
|
||||
type = 1;
|
||||
}
|
||||
List<RechargeCoin> list = rechargeCoinService.list(new QueryWrapper<RechargeCoin>().lambda().
|
||||
eq(RechargeCoin::getPhoneType, type).
|
||||
eq(RechargeCoin::getDelFlag, PublicCommon.启用).orderByAsc(RechargeCoin::getPrice));
|
||||
return ResponseData.success(list);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,166 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.code.DictConstant;
|
||||
import com.ruoyi.code.PublicCommon;
|
||||
import com.ruoyi.common.page.PageResult;
|
||||
import com.ruoyi.controller.req.SaleDetailPageReq;
|
||||
import com.ruoyi.controller.resp.HomeDataResp;
|
||||
import com.ruoyi.controller.resp.RankingResp;
|
||||
import com.ruoyi.controller.resp.SaleDataResp;
|
||||
import com.ruoyi.controller.resp.SaleDetailPageResp;
|
||||
import com.ruoyi.frequency.customer.entity.Customer;
|
||||
import com.ruoyi.frequency.customer.service.CustomerService;
|
||||
import com.ruoyi.frequency.order.service.OrderService;
|
||||
import com.ruoyi.frequency.sale.entity.Sale;
|
||||
import com.ruoyi.frequency.sale.mapper.SaleMapper;
|
||||
import com.ruoyi.frequency.sale.service.SaleService;
|
||||
import com.ruoyi.frequency.store.entity.Store;
|
||||
import com.ruoyi.frequency.store.service.StoreService;
|
||||
import com.ruoyi.frequency.wallerecord.mapper.WalletRecordMapper;
|
||||
import com.ruoyi.frequency.withdrawalrecord.mapper.WithdrawalRecordMapper;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.utils.BusinessUtil;
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import com.ruoyi.vo.UserVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 推广员端
|
||||
*
|
||||
* @author liwenlong
|
||||
* @date 2023-10-12
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/sale")
|
||||
@Api(tags = "推广员端")
|
||||
public class ApiSaleController extends RyController {
|
||||
@Autowired
|
||||
private BusinessUtil businessUtil;
|
||||
|
||||
@Autowired
|
||||
private CustomerService customerService;
|
||||
|
||||
@Autowired
|
||||
private StoreService storeService;
|
||||
|
||||
@Autowired
|
||||
private SaleService saleService;
|
||||
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
|
||||
|
||||
@PostMapping("/homeData")
|
||||
@ApiOperation(value = "首页数据", notes = "首页数据")
|
||||
public ResponseData<HomeDataResp> homeData() {
|
||||
|
||||
UserVo userVo = getUserVo();
|
||||
HomeDataResp homeDataResp = new HomeDataResp();
|
||||
|
||||
//平台设置比例系数
|
||||
Integer scale = Integer.valueOf(businessUtil.getDict(DictConstant.平台设置比例系数).getDictValue());
|
||||
|
||||
//查询入驻设计师
|
||||
int customerNum = customerService.count(new QueryWrapper<Customer>().lambda()
|
||||
.ne(Customer::getDelFlag, PublicCommon.删除));
|
||||
homeDataResp.setCustomerNum(customerNum * scale);
|
||||
|
||||
//查询入驻技术
|
||||
int storeNum = storeService.count(new QueryWrapper<Store>().lambda()
|
||||
.ne(Store::getDelFlag, PublicCommon.删除));
|
||||
homeDataResp.setStoreNum(storeNum * scale);
|
||||
|
||||
//查询入驻推广员
|
||||
int saleNum = saleService.count(new QueryWrapper<Sale>().lambda()
|
||||
.ne(Sale::getDelFlag, PublicCommon.删除));
|
||||
homeDataResp.setSaleNum(saleNum * scale);
|
||||
|
||||
//佣金排名
|
||||
Integer commissionRanking = saleService.commissionRanking(userVo);
|
||||
homeDataResp.setCommissionRanking(commissionRanking);
|
||||
|
||||
//推广排名
|
||||
Integer saleRanking = saleService.saleRanking(userVo);
|
||||
homeDataResp.setSaleRanking(saleRanking);
|
||||
|
||||
//推广邀请码
|
||||
Sale sale = saleService.getById(userVo.getUserId());
|
||||
if (sale != null) {
|
||||
homeDataResp.setInviteCode(sale.getInviteCode());
|
||||
homeDataResp.setAvatar(sale.getAvatar());
|
||||
homeDataResp.setNickname(sale.getNickname());
|
||||
homeDataResp.setName(sale.getName());
|
||||
homeDataResp.setInviteNum(sale.getInviteNum());
|
||||
homeDataResp.setIncome(sale.getIncome());
|
||||
}
|
||||
|
||||
return ResponseData.success(homeDataResp);
|
||||
}
|
||||
|
||||
@PostMapping("/commissionRankingPage")
|
||||
@ApiOperation(value = "佣金排名列表", notes = "佣金排名列表")
|
||||
public ResponseData<PageResult<Page<RankingResp>>> commissionRankingPage(@RequestBody PageBasic req) {
|
||||
return saleService.commissionRankingPage(req, getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/saleRankingPage")
|
||||
@ApiOperation(value = "推广人数排名列表", notes = "推广人数排名列表")
|
||||
public ResponseData<PageResult<Page<RankingResp>>> saleRankingPage(@RequestBody PageBasic req) {
|
||||
return saleService.saleRankingPage(req, getUserVo());
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/saleDetailPage")
|
||||
@ApiOperation(value = "明细", notes = "明细")
|
||||
public ResponseData<PageResult<Page<SaleDetailPageResp>>> saleDetailPage(@RequestBody SaleDetailPageReq req) {
|
||||
return saleService.saleDetailPage(req, getUserVo());
|
||||
}
|
||||
|
||||
|
||||
@Autowired
|
||||
private SaleMapper saleMapper;
|
||||
|
||||
@Autowired
|
||||
private WalletRecordMapper walletRecordMapper;
|
||||
|
||||
@Autowired
|
||||
private WithdrawalRecordMapper withdrawalRecordMapper;
|
||||
|
||||
@PostMapping("/saleData")
|
||||
@ApiOperation(value = "我的页面数据", notes = "我的页面数据")
|
||||
public ResponseData<SaleDataResp> saleData() {
|
||||
|
||||
UserVo userVo = getUserVo();
|
||||
|
||||
Sale sale = saleService.getById(userVo.getUserId());
|
||||
|
||||
SaleDataResp saleDataResp = saleMapper.saleOrderAmount(sale.getId());
|
||||
saleDataResp.setNum(sale.getInviteNum());
|
||||
saleDataResp.setIncome(sale.getIncome());
|
||||
saleDataResp.setBalance(sale.getBalance());
|
||||
//可提现金额(去除本月收益)
|
||||
//获取本月开始时间
|
||||
Date beginOfMonth = DateUtil.beginOfMonth(new Date());
|
||||
|
||||
BigDecimal withdrawableAmount = walletRecordMapper.selectMonthBeforeAmount(beginOfMonth, userVo);
|
||||
saleDataResp.setWithdrawableAmount(withdrawableAmount.compareTo(BigDecimal.ZERO) == 1 ? withdrawableAmount : BigDecimal.ZERO);
|
||||
|
||||
//已提现金额
|
||||
BigDecimal withdrawnAmount = withdrawalRecordMapper.withdrawnAmount(userVo);
|
||||
saleDataResp.setWithdrawnAmount(withdrawnAmount);
|
||||
|
||||
return ResponseData.success(saleDataResp);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.ruoyi.code.PublicCommon;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import com.ruoyi.common.page.PageResult;
|
||||
import com.ruoyi.controller.req.*;
|
||||
import com.ruoyi.enums.order.OrderStatusEnums;
|
||||
import com.ruoyi.frequency.hosearch.entity.HotSearch;
|
||||
import com.ruoyi.frequency.hosearch.service.HotSearchService;
|
||||
import com.ruoyi.frequency.order.service.OrderService;
|
||||
import com.ruoyi.frequency.works.service.WorksService;
|
||||
import com.ruoyi.frequency.workstype.service.WorksTypeService;
|
||||
import com.ruoyi.post.controller.req.PostPageReq;
|
||||
import com.ruoyi.post.frequency.post.service.PostService;
|
||||
import com.ruoyi.post.frequency.posttype.entity.PostType;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.utils.SnowIdUtils;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*
|
||||
* @author liwenlong
|
||||
* @date 2023-10-12
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/search")
|
||||
@Api(tags = "搜索")
|
||||
public class ApiSearchController extends RyController
|
||||
{
|
||||
|
||||
@Autowired
|
||||
private WorksService worksService;
|
||||
|
||||
@Autowired
|
||||
private WorksTypeService worksTypeService;
|
||||
|
||||
@Autowired
|
||||
private PostService postService;
|
||||
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
|
||||
|
||||
@PostMapping("/searchPage")
|
||||
@ApiOperation(value = "搜索", notes = "搜索")
|
||||
public ResponseData searchPage(@RequestBody SearchPageReq req) {
|
||||
|
||||
ResponseData responseData = new ResponseData();
|
||||
|
||||
//类型 1作品库 2绘图员 3论坛 4订单
|
||||
switch (req.getType()){
|
||||
case 1:
|
||||
|
||||
WorksPageReq worksPageReq = new WorksPageReq();
|
||||
worksPageReq.setKeyword(req.getKeyword());
|
||||
worksPageReq.setPageNo(req.getPageNo());
|
||||
worksPageReq.setPageSize(req.getPageSize());
|
||||
worksPageReq.setShowEnterprise(2);
|
||||
responseData = worksService.worksPage(worksPageReq,getUserVo());
|
||||
break;
|
||||
case 2:
|
||||
StorePageReq storePageReq = new StorePageReq();
|
||||
storePageReq.setKeyword(req.getKeyword());
|
||||
storePageReq.setPageNo(req.getPageNo());
|
||||
storePageReq.setPageSize(req.getPageSize());
|
||||
responseData = worksTypeService.storePage(storePageReq, getUserVo());
|
||||
break;
|
||||
case 3:
|
||||
PostPageReq postPageReq = new PostPageReq();
|
||||
postPageReq.setKeyword(req.getKeyword());
|
||||
postPageReq.setPageNo(req.getPageNo());
|
||||
postPageReq.setPageSize(req.getPageSize());
|
||||
responseData = postService.postPage(postPageReq,getUserVo());
|
||||
break;
|
||||
case 4:
|
||||
OrderPageReq orderPageReq = new OrderPageReq();
|
||||
orderPageReq.setKeyword(req.getKeyword());
|
||||
|
||||
orderPageReq.setStatus(OrderStatusEnums.to_be_confirm.getCode());
|
||||
|
||||
orderPageReq.setIsHall(true);
|
||||
|
||||
orderPageReq.setPageNo(req.getPageNo());
|
||||
orderPageReq.setPageSize(req.getPageSize());
|
||||
|
||||
responseData = orderService.orderPage(orderPageReq,getUserVo());
|
||||
break;
|
||||
default:
|
||||
return ResponseData.success();
|
||||
}
|
||||
|
||||
//记录搜索
|
||||
if (ObjectUtil.isNotEmpty(req.getKeyword())){
|
||||
HotSearch hotSearch = new HotSearch()
|
||||
.setId(SnowIdUtils.uniqueLong())
|
||||
.setSearchTerm(req.getKeyword());
|
||||
hotSearch.setCreateData();
|
||||
hotSearch.setUpdateData();
|
||||
|
||||
//判断是否搜索出结果
|
||||
|
||||
Boolean isSuccess = false;
|
||||
if(responseData.getData() != null){
|
||||
PageResult pageResult = (PageResult)responseData.getData();
|
||||
if (pageResult != null && pageResult.getRows().size() > 0){
|
||||
isSuccess = true;
|
||||
}
|
||||
}
|
||||
|
||||
hotSearchService.addHotSearch(hotSearch,isSuccess);
|
||||
}
|
||||
|
||||
return responseData;
|
||||
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private HotSearchService hotSearchService;
|
||||
|
||||
@PostMapping("/hotSearchList")
|
||||
@ApiOperation(value = "热门搜索记录", notes = "热门搜索记录")
|
||||
public ResponseData hotSearchList(@RequestBody HotSearchListReq req) {
|
||||
List<HotSearch> list = hotSearchService.hotSearchList(req);
|
||||
return ResponseData.success(list);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.controller.req.InsertShoppingCarReq;
|
||||
import com.ruoyi.controller.req.ShoppingCarCreateOrderReq;
|
||||
import com.ruoyi.controller.req.ShoppingCartSettlementReq;
|
||||
import com.ruoyi.frequency.mallshoppingcar.service.MallShoppingCarService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.util.List;
|
||||
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/goods")
|
||||
@Api(tags = "购物车")
|
||||
public class ApiShoppingCarController extends RyController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private MallShoppingCarService shoppingCarService;
|
||||
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/shoppingCarList", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "购物车列表")
|
||||
public ResponseData shoppingCarList() {
|
||||
return shoppingCarService.shoppingCarList(getUserVo());
|
||||
}
|
||||
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/shoppingCarSettlement", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "购物车订单结算")
|
||||
public ResponseData shoppingCarSettlement(@RequestBody ShoppingCartSettlementReq req) {
|
||||
return ResponseData.success(shoppingCarService.shoppingCarSettlement(req,getUserVo()));
|
||||
}
|
||||
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/insertShoppingCar", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "加入购物车")
|
||||
public ResponseData insertShoppingCar(@RequestBody InsertShoppingCarReq req) {
|
||||
return shoppingCarService.insertShoppingCar(req,getUserVo());
|
||||
}
|
||||
|
||||
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/removeShoppingCarGoods", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "删除购物车商品")
|
||||
public ResponseData removeShoppingCarGoods(@Valid @NotEmpty(message = "参数不能为空") @RequestBody List<Long> ids) {
|
||||
return shoppingCarService.removeShoppingCarGoods(ids,getUserVo());
|
||||
}
|
||||
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/shoppingCarCreateOrder", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "购物车创建订单")
|
||||
public ResponseData shoppingCarCreateOrder(@RequestBody ShoppingCarCreateOrderReq req) {
|
||||
return shoppingCarService.shoppingCarCreateOrder(req,getUserVo());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,449 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.code.DictConstant;
|
||||
import com.ruoyi.code.PublicCommon;
|
||||
import com.ruoyi.common.page.PageResult;
|
||||
import com.ruoyi.controller.req.*;
|
||||
import com.ruoyi.controller.resp.*;
|
||||
import com.ruoyi.enums.order.OrderStatusEnums;
|
||||
import com.ruoyi.enums.user.UserEnums;
|
||||
import com.ruoyi.frequency.advertisingimages.entity.AdvertisingImages;
|
||||
import com.ruoyi.frequency.advertisingimages.service.AdvertisingImagesService;
|
||||
import com.ruoyi.frequency.block.entity.Block;
|
||||
import com.ruoyi.frequency.block.service.BlockService;
|
||||
import com.ruoyi.frequency.browserecord.entity.BrowseRecord;
|
||||
import com.ruoyi.frequency.browserecord.service.BrowseRecordService;
|
||||
import com.ruoyi.frequency.collect.service.CollectService;
|
||||
import com.ruoyi.frequency.customer.entity.Customer;
|
||||
import com.ruoyi.frequency.customer.service.CustomerService;
|
||||
import com.ruoyi.frequency.customer.service.UserService;
|
||||
import com.ruoyi.frequency.enterprise.entity.Enterprise;
|
||||
import com.ruoyi.frequency.enterprise.service.EnterpriseService;
|
||||
import com.ruoyi.frequency.follow.entity.Follow;
|
||||
import com.ruoyi.frequency.follow.service.FollowService;
|
||||
import com.ruoyi.frequency.givewallerecord.service.GiveWalletRecordService;
|
||||
import com.ruoyi.frequency.illegaldeductionrecord.service.IllegalDeductionRecordService;
|
||||
import com.ruoyi.frequency.order.entity.Order;
|
||||
import com.ruoyi.frequency.order.mapper.OrderMapper;
|
||||
import com.ruoyi.frequency.order.service.OrderService;
|
||||
import com.ruoyi.frequency.refereeuser.entity.RefereeUser;
|
||||
import com.ruoyi.frequency.refereeuser.service.RefereeUserService;
|
||||
import com.ruoyi.frequency.sale.entity.Sale;
|
||||
import com.ruoyi.frequency.sale.service.SaleService;
|
||||
import com.ruoyi.frequency.shield.entity.Shield;
|
||||
import com.ruoyi.frequency.shield.service.ShieldService;
|
||||
import com.ruoyi.frequency.store.entity.Store;
|
||||
import com.ruoyi.frequency.store.service.StoreService;
|
||||
import com.ruoyi.frequency.wallerecord.mapper.WalletRecordMapper;
|
||||
import com.ruoyi.frequency.wallerecord.service.WalletRecordService;
|
||||
import com.ruoyi.frequency.withdrawalrecord.mapper.WithdrawalRecordMapper;
|
||||
import com.ruoyi.frequency.works.entity.Works;
|
||||
import com.ruoyi.frequency.works.service.WorksService;
|
||||
import com.ruoyi.frequency.workstype.service.WorksTypeService;
|
||||
import com.ruoyi.post.frequency.post.entity.Post;
|
||||
import com.ruoyi.post.frequency.post.service.PostService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.utils.BusinessUtil;
|
||||
import com.ruoyi.vo.BodyIdReq;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import com.ruoyi.vo.UserInfo;
|
||||
import com.ruoyi.vo.UserVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 用户相关(表现师(技术)列表,余额)
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/user")
|
||||
@Api(tags = "用户相关(表现师(技术)列表,余额)))")
|
||||
public class ApiUserController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private WorksTypeService worksTypeService;
|
||||
|
||||
@Autowired
|
||||
private CustomerService customerService;
|
||||
|
||||
@Autowired
|
||||
private StoreService storeService;
|
||||
|
||||
@Autowired
|
||||
private SaleService saleService;
|
||||
|
||||
@Autowired
|
||||
private FollowService followService;
|
||||
|
||||
@Autowired
|
||||
private PostService postService;
|
||||
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
|
||||
@Autowired
|
||||
private CollectService collectService;
|
||||
|
||||
@Autowired
|
||||
private WorksService worksService;
|
||||
|
||||
@Autowired
|
||||
private BlockService blockService;
|
||||
|
||||
@Autowired
|
||||
private ShieldService shieldService;
|
||||
|
||||
@Autowired
|
||||
private BrowseRecordService browseRecordService;
|
||||
|
||||
@Autowired
|
||||
private EnterpriseService enterpriseService;
|
||||
|
||||
|
||||
@PostMapping("/storePage")
|
||||
@ApiOperation(value = "表现师(技术)/企业列表", notes = "表现师(技术)/企业列表")
|
||||
public ResponseData<PageResult<Page<StorePageResp>>> storePage(@Valid @RequestBody StorePageReq req) {
|
||||
|
||||
//是否是企业: 1不是 2企业
|
||||
switch (req.getIsWorkingDrawing()) {
|
||||
case 1:
|
||||
return worksTypeService.storePage(req, getUserVo());
|
||||
case 2:
|
||||
return enterpriseService.enterprisePage(req, getUserVo());
|
||||
default:
|
||||
return ResponseData.error(String.format("isWorkingDrawing参数错误: %s", req.getIsWorkingDrawing()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/userData")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "我的页面用户数据", notes = "我的页面用户数据")
|
||||
public ResponseData<UserDataResp> userData() {
|
||||
|
||||
UserVo userVo = getUserVo();
|
||||
|
||||
UserDataResp userDataResp = userData(userVo);
|
||||
|
||||
return ResponseData.success(userDataResp);
|
||||
}
|
||||
|
||||
@PostMapping("/otherUserData")
|
||||
@ApiOperation(value = "他人查看我的页面用户数据", notes = "我的页面用户数据")
|
||||
public ResponseData<UserDataResp> otherUserData(@RequestBody UserVo userVo) {
|
||||
UserDataResp userDataResp = userData(userVo);
|
||||
return ResponseData.success(userDataResp);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private RefereeUserService refereeUserService;
|
||||
|
||||
@Autowired
|
||||
private BusinessUtil businessUtil;
|
||||
|
||||
@Autowired
|
||||
private OrderMapper orderMapper;
|
||||
|
||||
private UserDataResp userData(UserVo userVo) {
|
||||
|
||||
UserDataResp userDataResp = new UserDataResp();
|
||||
|
||||
//用户类型 1设计师 2表现师 3销售(推广员)
|
||||
if (ObjectUtil.equal(userVo.getUserType(), PublicCommon.设计师)) {
|
||||
Customer customer = customerService.getById(userVo.getUserId());
|
||||
userDataResp.setBalance(customer.getBalance());
|
||||
userDataResp.setAmount(customer.getConsumptionAmount());
|
||||
userDataResp.setOnlineDuration(customer.getOnlineDuration());
|
||||
userDataResp.setStar(customer.getStar());
|
||||
userDataResp.setIntegral(customer.getIntegral());
|
||||
userDataResp.setAccumulateIntegral(customer.getAccumulateIntegral());
|
||||
} else if (ObjectUtil.equal(userVo.getUserType(), PublicCommon.表现师)) {
|
||||
Store store = storeService.getById(userVo.getUserId());
|
||||
userDataResp.setBalance(store.getBalance());
|
||||
userDataResp.setAmount(store.getIncome());
|
||||
userDataResp.setOnlineDuration(store.getOnlineDuration());
|
||||
userDataResp.setStar(store.getStar());
|
||||
userDataResp.setIntegral(store.getIntegral());
|
||||
userDataResp.setAccumulateIntegral(store.getAccumulateIntegral());
|
||||
|
||||
//本月收益
|
||||
Date beginOfMonth = DateUtil.beginOfMonth(new Date());
|
||||
BigDecimal monthAmount = orderMapper.selectMonthBeforeAmount(beginOfMonth, userVo);
|
||||
userDataResp.setMonthAmount(monthAmount);
|
||||
} else if (ObjectUtil.equal(userVo.getUserType(), PublicCommon.销售)) {
|
||||
Sale sale = saleService.getById(userVo.getUserId());
|
||||
userDataResp.setBalance(sale.getBalance());
|
||||
} else if (ObjectUtil.equal(userVo.getUserType(), PublicCommon.企业)) {
|
||||
Enterprise enterprise = enterpriseService.getById(userVo.getUserId());
|
||||
userDataResp.setStar(enterprise.getStar());
|
||||
userDataResp.setAmount(enterprise.getServiceAmount());
|
||||
userDataResp.setOrderNum(enterprise.getServiceOrderNum());
|
||||
}
|
||||
|
||||
|
||||
//作品数
|
||||
LambdaQueryWrapper<Works> lambdaQueryWrapper = new QueryWrapper<Works>().lambda()
|
||||
.eq(Works::getDelFlag, PublicCommon.启用)
|
||||
.ne(Works::getIsHide, 2);
|
||||
if (UserEnums.customer.getCode().equals(userVo.getUserType())) {
|
||||
|
||||
lambdaQueryWrapper.eq(Works::getCustomerId, userVo.getUserId());
|
||||
} else if (UserEnums.store.getCode().equals(userVo.getUserType())) {
|
||||
|
||||
lambdaQueryWrapper.eq(Works::getStoreId, userVo.getUserId())
|
||||
.eq(Works::getUserType, userVo.getUserType());
|
||||
} else if (UserEnums.enterprise.getCode().equals(userVo.getUserType())) {
|
||||
|
||||
lambdaQueryWrapper.eq(Works::getStoreId, userVo.getUserId())
|
||||
.eq(Works::getUserType, userVo.getUserType());
|
||||
}
|
||||
int worksNum = worksService.count(lambdaQueryWrapper);
|
||||
userDataResp.setWorksNum(worksNum);
|
||||
|
||||
//粉丝数
|
||||
int fansNum = followService.count(new QueryWrapper<Follow>().lambda()
|
||||
.eq(Follow::getDelFlag, PublicCommon.启用)
|
||||
.eq(Follow::getFollowerUserType, userVo.getUserType())
|
||||
.eq(Follow::getFollowerUserId, userVo.getUserId()));
|
||||
userDataResp.setFansNum(fansNum);
|
||||
|
||||
//动态数
|
||||
int postNum = postService.count(new QueryWrapper<Post>().lambda()
|
||||
.eq(Post::getDelFlag, PublicCommon.启用)
|
||||
.eq(Post::getUserType, userVo.getUserType())
|
||||
.eq(Post::getUserId, userVo.getUserId()));
|
||||
userDataResp.setPostNum(postNum);
|
||||
|
||||
//收藏数
|
||||
CollectPageReq req = new CollectPageReq();
|
||||
req.setPageNo(1);
|
||||
req.setPageSize(1);
|
||||
req.setUserId(userVo.getUserId());
|
||||
req.setUserType(userVo.getUserType());
|
||||
|
||||
//收藏作品数
|
||||
req.setType(1);
|
||||
userDataResp.setCollectWorksNum(collectService.getCollectWorksPage(req,userVo).getTotal());
|
||||
|
||||
//收藏动态数
|
||||
req.setType(2);
|
||||
userDataResp.setCollectPostNum(collectService.getCollectPostPage(req,userVo).getTotal());
|
||||
|
||||
//收藏新闻数
|
||||
req.setType(4);
|
||||
userDataResp.setCollectNewsNum(collectService.getCollectNewsPage(req,userVo).getTotal());
|
||||
|
||||
userDataResp.setCollectNum(userDataResp.getCollectWorksNum()+userDataResp.getCollectPostNum()+userDataResp.getCollectNewsNum());
|
||||
|
||||
|
||||
//关注数
|
||||
int followNum = followService.count(new QueryWrapper<Follow>().lambda()
|
||||
.eq(Follow::getDelFlag, PublicCommon.启用)
|
||||
.eq(Follow::getUserType, userVo.getUserType())
|
||||
.eq(Follow::getUserId, userVo.getUserId()));
|
||||
userDataResp.setFollowNum(followNum);
|
||||
|
||||
if (ObjectUtil.notEqual(userVo.getUserType(), PublicCommon.企业)) {
|
||||
//累计服务单数基数
|
||||
Integer num = Integer.valueOf(businessUtil.getDict(DictConstant.OrderDict.累计服务单数基数).getDictValue());
|
||||
|
||||
//订单数
|
||||
int orderNum = orderService.count(new QueryWrapper<Order>().lambda()
|
||||
.eq(Order::getDelFlag, PublicCommon.启用)
|
||||
.ge(Order::getStatus, OrderStatusEnums.to_be_evaluated.getCode())
|
||||
.eq(ObjectUtil.equal(UserEnums.customer.getCode(), userVo.getUserType()), Order::getCustomerId, userVo.getUserId())
|
||||
.eq(ObjectUtil.equal(UserEnums.store.getCode(), userVo.getUserType()), Order::getStoreId, userVo.getUserId()));
|
||||
userDataResp.setOrderNum(orderNum + num);
|
||||
}
|
||||
|
||||
//拉黑数
|
||||
int blockNum = blockService.count(new QueryWrapper<Block>().lambda()
|
||||
.eq(Block::getDelFlag, PublicCommon.启用)
|
||||
.eq(Block::getUserType, userVo.getUserType())
|
||||
.eq(Block::getUserId, userVo.getUserId()));
|
||||
userDataResp.setBlockNum(blockNum);
|
||||
|
||||
|
||||
//屏蔽数
|
||||
int shieldNum = shieldService.count(new QueryWrapper<Shield>().lambda()
|
||||
.eq(Shield::getDelFlag, PublicCommon.启用)
|
||||
.eq(Shield::getUserType, userVo.getUserType())
|
||||
.eq(Shield::getUserId, userVo.getUserId()));
|
||||
userDataResp.setShieldNum(shieldNum);
|
||||
|
||||
//浏览数
|
||||
int browseNum = browseRecordService.count(new QueryWrapper<BrowseRecord>().lambda()
|
||||
.eq(BrowseRecord::getDelFlag, PublicCommon.启用)
|
||||
.eq(BrowseRecord::getType, 1) //浏览类型 1作品 2 动态
|
||||
.eq(BrowseRecord::getUserType, userVo.getUserType())
|
||||
.eq(BrowseRecord::getUserId, userVo.getUserId()));
|
||||
userDataResp.setBrowseNum(browseNum);
|
||||
|
||||
//邀请数
|
||||
int inviteNum = refereeUserService.count(new QueryWrapper<RefereeUser>().lambda()
|
||||
.eq(RefereeUser::getDelFlag, PublicCommon.启用)
|
||||
.eq(RefereeUser::getParentUserId, userVo.getUserId())
|
||||
.eq(RefereeUser::getParentUserType, userVo.getUserType())
|
||||
);
|
||||
userDataResp.setInviteNum(inviteNum);
|
||||
|
||||
userDataResp.setUserInfo(businessUtil.getUserInfo(userVo));
|
||||
return userDataResp;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
@Autowired
|
||||
private WalletRecordMapper walletRecordMapper;
|
||||
|
||||
@Autowired
|
||||
private WithdrawalRecordMapper withdrawalRecordMapper;
|
||||
|
||||
@PostMapping("/storeAmountData")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "表现师金额数据", notes = "用户金额数据")
|
||||
public ResponseData<StoreAmountDataResp> storeAmountData() {
|
||||
|
||||
UserVo userVo = getUserVo();
|
||||
|
||||
if (userVo.getUserType().equals(UserEnums.customer.getCode()) || userVo.getUserType().equals(UserEnums.sale.getCode())) {
|
||||
return ResponseData.success();
|
||||
}
|
||||
|
||||
if (userVo.getUserType().equals(UserEnums.enterprise.getCode())) {
|
||||
Store one = storeService.getOne(new QueryWrapper<Store>().lambda().eq(Store::getBindEnterpriseId, userVo.getUserId()));
|
||||
userVo = new UserVo(UserEnums.store.getCode(), one.getId());
|
||||
}
|
||||
|
||||
StoreAmountDataResp userAmountDataResp = new StoreAmountDataResp();
|
||||
|
||||
Store store = storeService.getById(userVo.getUserId());
|
||||
|
||||
//累计收益
|
||||
userAmountDataResp.setIncome(store.getIncome());
|
||||
|
||||
//可提现金额(去除本月收益)
|
||||
//获取本月开始时间
|
||||
Date beginOfMonth = DateUtil.beginOfMonth(new Date());
|
||||
|
||||
BigDecimal withdrawableAmount = walletRecordMapper.selectMonthBeforeAmount(beginOfMonth, userVo);
|
||||
userAmountDataResp.setWithdrawableAmount(withdrawableAmount.compareTo(BigDecimal.ZERO) == 1 ? withdrawableAmount : BigDecimal.ZERO);
|
||||
|
||||
//已提现金额
|
||||
BigDecimal withdrawnAmount = withdrawalRecordMapper.withdrawnAmount(userVo);
|
||||
userAmountDataResp.setWithdrawnAmount(withdrawnAmount);
|
||||
|
||||
//待提现金额
|
||||
userAmountDataResp.setToBeWithdrawnAmount(store.getBalance().subtract(userAmountDataResp.getWithdrawableAmount()));
|
||||
|
||||
//扣款
|
||||
userAmountDataResp.setViolationDeduction(store.getViolationDeduction());
|
||||
|
||||
return ResponseData.success(userAmountDataResp);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private WalletRecordService walletRecordService;
|
||||
|
||||
@Autowired
|
||||
private GiveWalletRecordService giveWalletRecordService;
|
||||
|
||||
|
||||
@PostMapping("/giveWalletPage")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "抵用金明细", notes = "抵用金明细")
|
||||
public ResponseData<WalletPageResp> giveWalletPage(@RequestBody WalletPageReq req) {
|
||||
return giveWalletRecordService.giveWalletPage(req, getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/walletPage")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "钱包明细", notes = "钱包明细")
|
||||
public ResponseData<WalletPageResp> walletPage(@RequestBody WalletPageReq req) {
|
||||
return walletRecordService.walletPage(req, getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/expenditurePage")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "支出明细", notes = "支出明细")
|
||||
public ResponseData expenditurePage(@RequestBody WalletPageReq req) {
|
||||
return walletRecordService.expenditurePage(req, getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/walletDetail")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "钱包明细详情", notes = "钱包明细详情")
|
||||
public ResponseData walletDetail(@RequestBody BodyIdReq req) {
|
||||
return walletRecordService.walletDetail(req, getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/customerPage")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "设计师列表", notes = "设计师列表")
|
||||
public ResponseData<PageResult<Page<Customer>>> customerPage(@Valid @RequestBody CustomerPageReq req) {
|
||||
return customerService.customerPage(req, getUserVo());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private IllegalDeductionRecordService illegalDeductionRecordService;
|
||||
|
||||
@PostMapping("/illegalDeductionPage")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "扣款明细", notes = "扣款明细")
|
||||
public ResponseData<IllegalDeductionPageResp> illegalDeductionPage(@RequestBody IllegalDeductionPageReq req) {
|
||||
return illegalDeductionRecordService.illegalDeductionPage(req, getUserVo());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private AdvertisingImagesService advertisingImagesService;
|
||||
|
||||
@PostMapping("/advertisingImages")
|
||||
@ApiOperation(value = "广告图", notes = "广告图")
|
||||
public ResponseData<AdvertisingImages> advertisingImages() {
|
||||
|
||||
List<AdvertisingImages> list = advertisingImagesService.list(new QueryWrapper<AdvertisingImages>().lambda()
|
||||
.eq(AdvertisingImages::getDelFlag, PublicCommon.启用)
|
||||
);
|
||||
|
||||
//类型 1富文本 2 设计师主页 3 表现师主页 4 首页 5活动页面 6新闻页面
|
||||
|
||||
if (!list.isEmpty()){
|
||||
Set<UserVo> userVoSet = list.stream().filter(s->s.getType() == 2 || s.getType() == 3)
|
||||
.map(s -> new UserVo(s.getType() == 2? UserEnums.customer.getCode():UserEnums.store.getCode(), Long.valueOf(s.getContent())))
|
||||
.collect(Collectors.toSet());
|
||||
//查询用户信息
|
||||
Map<UserVo, UserInfo> userMap = userService.selectUserInfoMap(userVoSet,null);
|
||||
|
||||
list.stream().forEach(s ->{
|
||||
if (s.getType() == 2 || s.getType() == 3) {
|
||||
s.setUserInfo(userMap.get(new UserVo(s.getType() == 2 ? UserEnums.customer.getCode() : UserEnums.store.getCode(), Long.valueOf(s.getContent()))));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return ResponseData.success(list);
|
||||
}
|
||||
|
||||
@PostMapping("/advertisingImagesDetail")
|
||||
@ApiOperation(value = "广告图", notes = "广告图")
|
||||
public ResponseData<AdvertisingImages> advertisingImages(@RequestBody BodyIdReq req) {
|
||||
return ResponseData.success(advertisingImagesService.getById(req.getId()));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.common.page.PageResult;
|
||||
import com.ruoyi.controller.req.DialoguePageReq;
|
||||
import com.ruoyi.controller.req.VoteCommentPageReq;
|
||||
import com.ruoyi.controller.req.VoteCommentReq;
|
||||
import com.ruoyi.controller.resp.VoteCommentPageResp;
|
||||
import com.ruoyi.controller.resp.VoteCommentResp;
|
||||
import com.ruoyi.frequency.votecomment.service.VoteCommentService;
|
||||
import com.ruoyi.frequency.votecomment.service.VoteCommentService;
|
||||
import com.ruoyi.post.controller.req.DeleteCommentReq;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.BodyIdReq;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
* 投票评论相关
|
||||
*
|
||||
* @author liwenlong
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/voteComment")
|
||||
@Api(tags = "投票评论相关")
|
||||
public class ApiVoteCommentController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private VoteCommentService voteCommentService;
|
||||
|
||||
@PostMapping("/voteComment")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "投票评论", notes = "投票评论")
|
||||
public ResponseData<VoteCommentResp> voteComment(@RequestBody VoteCommentReq req) {
|
||||
return voteCommentService.voteComment(req, getUserVo());
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/voteCommentPage")
|
||||
@ApiOperation(value = "投票评论列表", notes = "投票评论列表")
|
||||
public ResponseData<PageResult<VoteCommentPageResp>> voteCommentPage(@RequestBody VoteCommentPageReq req) {
|
||||
return voteCommentService.voteCommentPage(req, getUserVo());
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/deleteComment")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "删除评论", notes = "删除评论")
|
||||
public ResponseData deleteComment(@RequestBody DeleteCommentReq req) {
|
||||
return voteCommentService.deleteComment(req, getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/voteCommentDetail")
|
||||
@ApiOperation(value = "投票评论详情", notes = "投票评论详情")
|
||||
public ResponseData<VoteCommentResp> voteCommentDetail(@RequestBody BodyIdReq req) {
|
||||
return voteCommentService.voteCommentDetail(req.getId(), getUserVo());
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/voteCommentDialoguePage")
|
||||
@ApiOperation(value = "投票对话评论列表", notes = "投票对话评论列表")
|
||||
public ResponseData<PageResult<Page<VoteCommentPageResp>>> voteCommentDialoguePage(@RequestBody DialoguePageReq req) {
|
||||
return voteCommentService.voteCommentDialoguePage(req, getUserVo());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.common.page.PageResult;
|
||||
import com.ruoyi.controller.req.VoteLikeReq;
|
||||
import com.ruoyi.controller.req.VoteReq;
|
||||
import com.ruoyi.controller.req.WorksLikeReq;
|
||||
import com.ruoyi.controller.resp.VoteDetailResp;
|
||||
import com.ruoyi.controller.resp.VotePageResp;
|
||||
import com.ruoyi.frequency.vote.service.VoteService;
|
||||
import com.ruoyi.frequency.votelike.service.VoteLikeService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.BodyIdReq;
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 投票
|
||||
*
|
||||
* @author liwenlong
|
||||
* @date 2023-10-12
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/vote")
|
||||
@Api(tags = "投票")
|
||||
public class ApiVoteController extends RyController
|
||||
{
|
||||
@Autowired
|
||||
private VoteService voteService;
|
||||
|
||||
|
||||
@PostMapping("/votePage")
|
||||
@ApiOperation(value = "投票列表", notes = "投票列表")
|
||||
public ResponseData<PageResult<Page<VotePageResp>>> votePage(@RequestBody PageBasic req) {
|
||||
return voteService.votePage(req,getUserVo(),false);
|
||||
}
|
||||
|
||||
@PostMapping("/votePageBySelf")
|
||||
@ApiOperation(value = "我参与投票列表", notes = "我参与投票列表")
|
||||
@UserLoginToken
|
||||
public ResponseData<PageResult<Page<VotePageResp>>> votePageBySelf(@RequestBody PageBasic req) {
|
||||
return voteService.votePage(req,getUserVo(),true);
|
||||
}
|
||||
|
||||
@PostMapping("/vote")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "投票", notes = "投票")
|
||||
public ResponseData vote(@RequestBody VoteReq req) {
|
||||
return voteService.vote(req,getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/voteDetail")
|
||||
@ApiOperation(value = "投票详情", notes = "投票详情")
|
||||
public ResponseData<VoteDetailResp> voteDetail(@RequestBody BodyIdReq req) {
|
||||
return voteService.voteDetail(req.getId(),req.getIsAddBrowseNum(),getUserVo());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private VoteLikeService voteLikeService;
|
||||
|
||||
@PostMapping("/voteLike")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "投票点赞", notes = "投票点赞")
|
||||
public ResponseData voteLike(@RequestBody VoteLikeReq req) {
|
||||
return voteLikeService.voteLike(req,getUserVo());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,206 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.code.PublicCommon;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.controller.req.WithApplyReq;
|
||||
import com.ruoyi.controller.req.WithdrawalRecordPageReq;
|
||||
import com.ruoyi.enums.process.ProcessResultEnums;
|
||||
import com.ruoyi.frequency.auth.entity.Auth;
|
||||
import com.ruoyi.frequency.auth.service.AuthService;
|
||||
import com.ruoyi.frequency.bankcard.service.BankCardService;
|
||||
import com.ruoyi.frequency.customer.service.UserService;
|
||||
import com.ruoyi.frequency.highendauth.entity.HighendAuth;
|
||||
import com.ruoyi.frequency.highendauth.service.HighendAuthService;
|
||||
import com.ruoyi.frequency.klkaccount.entity.KlkAccount;
|
||||
import com.ruoyi.frequency.klkaccount.mapper.KlkAccountMapper;
|
||||
import com.ruoyi.frequency.withdrawalconfig.entity.WithdrawalConfig;
|
||||
import com.ruoyi.frequency.withdrawalconfig.service.WithdrawalConfigService;
|
||||
import com.ruoyi.frequency.withdrawalrecord.service.WithdrawalRecordService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.BodyIdReq;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import com.ruoyi.vo.UserVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
|
||||
/**
|
||||
* 提现相关
|
||||
*
|
||||
* @author liwenlong
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/withdrawal")
|
||||
@Api(tags = "提现相关")
|
||||
public class ApiWithdrawalController extends RyController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private WithdrawalRecordService withdrawalRecordService;
|
||||
|
||||
@Autowired
|
||||
private WithdrawalConfigService withdrawalConfigService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询提现配置信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/withdrawalConfig", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "查询提现配置信息")
|
||||
public ResponseData withdrawalConfig() {
|
||||
|
||||
WithdrawalConfig withdrawalConfig = withdrawalConfigService.getOne(new QueryWrapper<WithdrawalConfig>().lambda()
|
||||
.eq(WithdrawalConfig::getUserType, getUserVo().getUserType())
|
||||
.eq(WithdrawalConfig::getDelFlag, PublicCommon.启用));
|
||||
return ResponseData.success(withdrawalConfig);
|
||||
}
|
||||
|
||||
|
||||
@Autowired
|
||||
private AuthService authService;
|
||||
|
||||
@Autowired
|
||||
private HighendAuthService highendAuthService;
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
@Autowired
|
||||
private BankCardService bankCardService;
|
||||
|
||||
|
||||
/**
|
||||
* 申请提现
|
||||
*
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/apply", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "申请提现")
|
||||
public ResponseData apply(@RequestBody @Valid WithApplyReq req) {
|
||||
|
||||
|
||||
UserVo userVo = getUserVo();
|
||||
|
||||
// 判断当前用户能否提现
|
||||
KlkAccount klkAccount = checkCanApply(userVo);
|
||||
|
||||
userService.storeByEnterprise(userVo);
|
||||
|
||||
req.setBank(klkAccount.getAcctOpenBankName());
|
||||
req.setBankCard(klkAccount.getAcctNo());
|
||||
req.setFullName(klkAccount.getAcctName());
|
||||
|
||||
return withdrawalRecordService.apply(req, userVo);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private KlkAccountMapper klkAccountMapper;
|
||||
|
||||
private KlkAccount checkCanApply(UserVo userVo) {
|
||||
KlkAccount klkAccount = klkAccountMapper.selectOne(new LambdaQueryWrapper<KlkAccount>()
|
||||
.eq(KlkAccount::getDelFlag, PublicCommon.启用)
|
||||
.eq(KlkAccount::getUserId, userVo.getUserId())
|
||||
.eq(KlkAccount::getUserType, userVo.getUserType()));
|
||||
if (klkAccount == null) {
|
||||
throw new ServiceException("对不起,您未绑定银行卡,无法提现");
|
||||
}
|
||||
if (klkAccount.getBindStatus() == 1) {
|
||||
throw new ServiceException("对不起,您未绑定银行卡,无法提现");
|
||||
}
|
||||
if (klkAccount.getBindStatus() == 2) {
|
||||
throw new ServiceException("对不起,您绑定的银行卡正在审核中,无法提现");
|
||||
}
|
||||
if (klkAccount.getBindStatus() == 4) {
|
||||
throw new ServiceException("对不起,您绑定的银行卡审核失败,请重新绑定");
|
||||
}
|
||||
return klkAccount;
|
||||
}
|
||||
|
||||
/**
|
||||
* 提现记录
|
||||
*
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/withdrawalRecordPage", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "提现记录")
|
||||
public ResponseData withdrawalRecordPage(@RequestBody @Valid WithdrawalRecordPageReq req) {
|
||||
return withdrawalRecordService.withdrawalRecordPage(req, getUserVo());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 提现记录详情
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/detail", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "提现记录详情")
|
||||
public ResponseData detail(@RequestBody @Valid BodyIdReq req) {
|
||||
return withdrawalRecordService.getDetail(req.getId());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 银行账号
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@UserLoginToken
|
||||
@RequestMapping(value = "/bankAccount", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "银行账号")
|
||||
public ResponseData bankAccount() {
|
||||
|
||||
UserVo userVo = getUserVo();
|
||||
|
||||
userService.storeByEnterprise(userVo);
|
||||
|
||||
WithApplyReq req = new WithApplyReq();
|
||||
|
||||
//判断认证状态
|
||||
HighendAuth highendAuth = highendAuthService.getOne(new QueryWrapper<HighendAuth>().lambda()
|
||||
.eq(HighendAuth::getStoreId, userVo.getUserId())
|
||||
.eq(HighendAuth::getStatus, 3)
|
||||
.eq(HighendAuth::getDelFlag, PublicCommon.启用));
|
||||
if (highendAuth == null) {
|
||||
//获取银行账号
|
||||
Auth auth = authService.getOne(new QueryWrapper<Auth>().lambda()
|
||||
.eq(Auth::getStoreId, userVo.getUserId())
|
||||
.eq(Auth::getResult, ProcessResultEnums.APPROVED.getCode())
|
||||
.eq(Auth::getDelFlag, PublicCommon.启用));
|
||||
if (auth == null) {
|
||||
return ResponseData.error("请先进行平台认证或高端认证");
|
||||
}
|
||||
|
||||
req.setBank(auth.getBank());
|
||||
req.setSubbranch(auth.getSubbranch());
|
||||
req.setBankCard(auth.getBankCard());
|
||||
} else {
|
||||
req.setBank(highendAuth.getBank());
|
||||
req.setSubbranch(highendAuth.getSubbranch());
|
||||
req.setBankCard(highendAuth.getBankCard());
|
||||
}
|
||||
return ResponseData.success(req);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.common.page.PageResult;
|
||||
import com.ruoyi.controller.req.DialoguePageReq;
|
||||
import com.ruoyi.controller.req.WorksCommentPageReq;
|
||||
import com.ruoyi.controller.req.WorksCommentReq;
|
||||
import com.ruoyi.controller.resp.WorksCommentPageResp;
|
||||
import com.ruoyi.controller.resp.WorksCommentResp;
|
||||
import com.ruoyi.frequency.workscomment.service.WorksCommentService;
|
||||
import com.ruoyi.post.controller.req.DeleteCommentReq;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.BodyIdReq;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
* 作品评论相关
|
||||
*
|
||||
* @author liwenlong
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/worksComment")
|
||||
@Api(tags = "作品评论相关")
|
||||
public class ApiWorksCommentController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private WorksCommentService worksCommentService;
|
||||
|
||||
@PostMapping("/worksComment")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "作品评论", notes = "作品评论")
|
||||
public ResponseData<WorksCommentResp> worksComment(@RequestBody WorksCommentReq req) {
|
||||
return worksCommentService.worksComment(req, getUserVo());
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/worksCommentPage")
|
||||
@ApiOperation(value = "作品评论列表", notes = "作品评论列表")
|
||||
public ResponseData<PageResult<WorksCommentPageResp>> worksCommentPage(@RequestBody WorksCommentPageReq req) {
|
||||
return worksCommentService.worksCommentPage(req, getUserVo());
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/deleteComment")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "删除评论", notes = "删除评论")
|
||||
public ResponseData deleteComment(@RequestBody DeleteCommentReq req) {
|
||||
return worksCommentService.deleteComment(req, getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/worksCommentDetail")
|
||||
@ApiOperation(value = "作品评论详情", notes = "作品评论详情")
|
||||
public ResponseData<WorksCommentResp> worksCommentDetail(@RequestBody BodyIdReq req) {
|
||||
return worksCommentService.worksCommentDetail(req.getId(), getUserVo());
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/worksCommentDialoguePage")
|
||||
@ApiOperation(value = "作品对话评论列表", notes = "作品对话评论列表")
|
||||
public ResponseData<PageResult<Page<WorksCommentPageResp>>> worksCommentDialoguePage(@RequestBody DialoguePageReq req) {
|
||||
return worksCommentService.worksCommentDialoguePage(req, getUserVo());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,150 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.code.DictConstant;
|
||||
import com.ruoyi.code.PublicCommon;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.common.page.PageResult;
|
||||
import com.ruoyi.controller.req.*;
|
||||
import com.ruoyi.controller.resp.OrderWorksPricePage;
|
||||
import com.ruoyi.controller.resp.WorksDetailResp;
|
||||
import com.ruoyi.controller.resp.WorksPageResp;
|
||||
import com.ruoyi.frequency.worklike.service.WorkLikeService;
|
||||
import com.ruoyi.frequency.works.entity.Works;
|
||||
import com.ruoyi.frequency.works.service.WorksService;
|
||||
import com.ruoyi.frequency.workstep.service.WorkStepService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.utils.BusinessUtil;
|
||||
import com.ruoyi.vo.BodyIdReq;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import com.ruoyi.vo.UserVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 作品
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/works")
|
||||
@Api(tags = "作品")
|
||||
public class ApiWorksController extends RyController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private WorksService worksService;
|
||||
|
||||
@Autowired
|
||||
private BusinessUtil businessUtil;
|
||||
|
||||
@PostMapping("/worksRelease")
|
||||
@ApiOperation(value = "作品发布", notes = "作品发布")
|
||||
@UserLoginToken
|
||||
public ResponseData worksRelease(@RequestBody WorksReleaseReq req) {
|
||||
|
||||
|
||||
UserVo userVo = getUserVo();
|
||||
|
||||
//最大上传作品数量
|
||||
Integer bigNum = Integer.valueOf(businessUtil.getDict(DictConstant.作品最大数量).getDictValue());
|
||||
|
||||
//判断作品上传数量
|
||||
int worksNum = worksService.count(new QueryWrapper<Works>().lambda()
|
||||
.isNull(Works::getOrderId)
|
||||
.ne(Works::getDelFlag, PublicCommon.删除)
|
||||
.eq(Works::getStoreId, userVo.getUserId()));
|
||||
|
||||
if (worksNum >= bigNum) {
|
||||
return ResponseData.error("作品上传数量不能超过" + bigNum + "个");
|
||||
}
|
||||
|
||||
return worksService.worksRelease(req, userVo);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/worksPage")
|
||||
@ApiOperation(value = "作品列表", notes = "作品列表")
|
||||
public ResponseData<PageResult<Page<WorksPageResp>>> worksPage(@RequestBody WorksPageReq req) {
|
||||
req.setShowEnterprise(2);
|
||||
return worksService.worksPage(req, getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/worksPageBySelf")
|
||||
@ApiOperation(value = "我的作品(自己查看)", notes = "我的作品(自己查看)")
|
||||
public ResponseData<PageResult<Page<WorksPageResp>>> worksPageBySelf(@RequestBody WorksPageReq req) {
|
||||
UserVo userVo = getUserVo();
|
||||
req.setUserId(userVo.getUserId());
|
||||
req.setUserType(userVo.getUserType());
|
||||
req.setIsSelf(1);
|
||||
return worksService.worksPage(req, userVo);
|
||||
}
|
||||
|
||||
@PostMapping("/worksPageByOtherSelf")
|
||||
@ApiOperation(value = "我的作品(他人查看)", notes = "我的作品(他人查看)")
|
||||
public ResponseData<PageResult<Page<WorksPageResp>>> worksPageByOtherSelf(@RequestBody WorksPageReq req) {
|
||||
return worksService.worksPage(req, getUserVo());
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/worksDetail")
|
||||
@ApiOperation(value = "作品详情", notes = "作品详情")
|
||||
public ResponseData<WorksDetailResp> worksDetail(@RequestBody BodyIdReq req) {
|
||||
return worksService.worksDetail(req.getId(), req.getIsAddBrowseNum(), getUserVo());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private WorkLikeService workLikeService;
|
||||
|
||||
@PostMapping("/worksLike")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "作品点赞", notes = "作品点赞")
|
||||
public ResponseData worksLike(@RequestBody WorksLikeReq req) {
|
||||
return workLikeService.worksLike(req, getUserVo());
|
||||
}
|
||||
|
||||
@PostMapping("/hideWork")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "隐藏作品", notes = "隐藏作品")
|
||||
public ResponseData hideWork(@RequestBody BodyIdReq req) {
|
||||
return worksService.hideWork(req, getUserVo());
|
||||
}
|
||||
|
||||
|
||||
@Autowired
|
||||
private WorkStepService workStepService;
|
||||
|
||||
@PostMapping("/worksStep")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "作品踩赞", notes = "作品踩赞")
|
||||
public ResponseData worksStep(@RequestBody WorksStepReq req) {
|
||||
return workStepService.worksStep(req, getUserVo());
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/drawingDetailsPage")
|
||||
@ApiOperation(value = "制图明细", notes = "制图明细")
|
||||
public ResponseData<OrderWorksPricePage> drawingDetailsPage(@RequestBody DrawingDetailsPageReq req) {
|
||||
return worksService.drawingDetailsPage(req, getUserVo());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取有作品的分类
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "/getHaveWorkCategory", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "字典表下级")
|
||||
public ResponseData<List<SysDictData>> getHaveWorkCategory(@RequestBody WorksPageReq req) {
|
||||
return worksService.getHaveWorkCategory(req);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.controller.req.WorksReportReq;
|
||||
import com.ruoyi.frequency.worksreport.service.WorksReportService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
* 作品举报相关
|
||||
* @author liwenlong
|
||||
*
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/postReport")
|
||||
@Api(tags = "作品举报相关")
|
||||
public class ApiWorksReportController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private WorksReportService worksReportService;
|
||||
|
||||
@PostMapping("/worksReport")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "作品举报", notes = "作品举报")
|
||||
public ResponseData worksReport(@RequestBody WorksReportReq req) {
|
||||
return worksReportService.worksReport(req,getUserVo());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.ruoyi.annotations.UserLoginToken;
|
||||
import com.ruoyi.frequency.worksshield.service.WorksShieldService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.BodyIdReq;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
* 作品屏蔽
|
||||
* @author liwenlong
|
||||
*
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/worksShield")
|
||||
@Api(tags = "作品屏蔽")
|
||||
public class ApiWorksShieldController extends RyController {
|
||||
|
||||
@Autowired
|
||||
private WorksShieldService worksShieldService;
|
||||
|
||||
@PostMapping("/worksShield")
|
||||
@UserLoginToken
|
||||
@ApiOperation(value = "作品屏蔽", notes = "作品屏蔽")
|
||||
public ResponseData worksShield(@RequestBody BodyIdReq req) {
|
||||
return worksShieldService.worksShield(req.getId(),getUserVo());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.ruoyi.controller;
|
||||
|
||||
import com.ruoyi.frequency.workstype.entity.WorksType;
|
||||
import com.ruoyi.frequency.workstype.service.WorksTypeService;
|
||||
import com.ruoyi.response.ResponseData;
|
||||
import com.ruoyi.vo.RyController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作品类型
|
||||
*/
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/worksType")
|
||||
@Api(tags = "作品类型")
|
||||
public class ApiWorksTypeController extends RyController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private WorksTypeService worksTypeService;
|
||||
|
||||
|
||||
@PostMapping("/worksTypeTree")
|
||||
@ApiOperation(value = "作品类型树", notes = "作品类型树")
|
||||
public ResponseData<List<WorksType>> worksTypeTree() {
|
||||
return ResponseData.success(worksTypeService.worksTypeList());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ActivityPageReq extends PageBasic {
|
||||
|
||||
@ApiModelProperty(value = "关键字")
|
||||
private String keyword;
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
public class AddressInsertReq {
|
||||
|
||||
@NotBlank(message = "收货人姓名不能为空")
|
||||
@ApiModelProperty(value = "收货人姓名", required = true)
|
||||
private String username;
|
||||
|
||||
@NotBlank(message = "收货人联系方式不能为空")
|
||||
@ApiModelProperty(value = "收货人联系方式", required = true)
|
||||
private String mobile;
|
||||
|
||||
private String areaCode;
|
||||
|
||||
@ApiModelProperty(value = "省份名称", required = true)
|
||||
private String province;
|
||||
|
||||
@ApiModelProperty(value = "城市名称")
|
||||
private String city;
|
||||
|
||||
@ApiModelProperty(value = "区域名称")
|
||||
private String area;
|
||||
|
||||
@ApiModelProperty(value = "地址")
|
||||
private String address;
|
||||
|
||||
@ApiModelProperty(value = "详细地址")
|
||||
private String detail;
|
||||
|
||||
@ApiModelProperty(value = "经度")
|
||||
private String longitude;
|
||||
|
||||
@ApiModelProperty(value = "纬度")
|
||||
private String latitude;
|
||||
|
||||
@ApiModelProperty(value = "是否默认")
|
||||
@NotNull(message = "是否默认不能为空")
|
||||
private Integer isDefault;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
public class AddressUpdateReq {
|
||||
|
||||
@ApiModelProperty(value = "用户地址id", required = true)
|
||||
private Long id;
|
||||
|
||||
@NotBlank(message = "收货人姓名不能为空")
|
||||
@ApiModelProperty(value = "收货人姓名", required = true)
|
||||
private String username;
|
||||
|
||||
@NotBlank(message = "收货人联系方式不能为空")
|
||||
@ApiModelProperty(value = "收货人联系方式", required = true)
|
||||
private String mobile;
|
||||
|
||||
private String areaCode;
|
||||
|
||||
@ApiModelProperty(value = "省份名称", required = true)
|
||||
private String province;
|
||||
|
||||
@ApiModelProperty(value = "城市名称")
|
||||
private String city;
|
||||
|
||||
@ApiModelProperty(value = "区域名称")
|
||||
private String area;
|
||||
|
||||
@ApiModelProperty(value = "地址")
|
||||
private String address;
|
||||
|
||||
@ApiModelProperty(value = "详细地址")
|
||||
private String detail;
|
||||
|
||||
@ApiModelProperty(value = "经度")
|
||||
private String longitude;
|
||||
|
||||
@ApiModelProperty(value = "纬度")
|
||||
private String latitude;
|
||||
|
||||
@ApiModelProperty(value = "是否默认")
|
||||
@NotNull(message = "是否默认不能为空")
|
||||
private Integer isDefault;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2024/1/29 14:43
|
||||
*/
|
||||
@Data
|
||||
public class AnswerPageReq extends PageBasic {
|
||||
|
||||
@ApiModelProperty("用户类型 1设计师 2表现师")
|
||||
private Integer userType;
|
||||
|
||||
private Long platformAnswerTypeId;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/10/16 10:25
|
||||
*/
|
||||
@Data
|
||||
public class AppealMessagePageReq extends PageBasic {
|
||||
|
||||
@ApiModelProperty("申诉id")
|
||||
@NotNull(message = "申诉id不能为空")
|
||||
private Long appealId;
|
||||
|
||||
@ApiModelProperty("开始时间")
|
||||
private Date beginTime;
|
||||
|
||||
@ApiModelProperty("结束时间")
|
||||
private Date endTime;
|
||||
|
||||
@ApiModelProperty("最早一條消息的时间")
|
||||
private Date lasttimestamp;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author 刘耀
|
||||
* @Date 2022/1/18 19:36
|
||||
*/
|
||||
@Data
|
||||
public class ApplyAfterSalesReq {
|
||||
private Long orderId;
|
||||
|
||||
//1 退款 2 退款退货
|
||||
private Integer refundType;
|
||||
|
||||
//退款原因
|
||||
private String refundReason;
|
||||
|
||||
//退款说明
|
||||
private String refundExplain;
|
||||
|
||||
//申请配图
|
||||
private String refundImages;
|
||||
|
||||
private Long refundId;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/10/18 15:46
|
||||
*/
|
||||
@Data
|
||||
public class BondPayReq {
|
||||
|
||||
|
||||
@ApiModelProperty("金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@ApiModelProperty("支付类型: 1 app支付宝 2 h5支付宝 3 app微信 4 h5微信 5 小程序 6 苹果支付 7 余额")
|
||||
private Integer payType;
|
||||
|
||||
@ApiModelProperty("使用余额支付时 支付密码")
|
||||
private String payPwd;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/10/18 15:48
|
||||
*/
|
||||
@Data
|
||||
public class BondRecordPageReq extends PageBasic {
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class CalculateFirstAmountReq {
|
||||
private BigDecimal amount;
|
||||
private Long orderId;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CanFellReq {
|
||||
private String code;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import com.ruoyi.vo.UserVo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class CommentPageReq extends PageBasic {
|
||||
|
||||
@NotNull(message = "关联id不能为空")
|
||||
@ApiModelProperty(value = "关联id", required = true)
|
||||
private Long linkId;
|
||||
|
||||
@ApiModelProperty(value = "上级评论id", required = false)
|
||||
private Long parentId;
|
||||
|
||||
@ApiModelProperty(value = "拉黑用户")
|
||||
private List<UserVo> blockUserList;
|
||||
|
||||
@ApiModelProperty(value = "屏蔽用户")
|
||||
private List<UserVo> shieldUserList;
|
||||
|
||||
@ApiModelProperty("排序 1时间 2热度")
|
||||
private Integer sortType;
|
||||
|
||||
@ApiModelProperty(value = "1升序 2 降序")
|
||||
private Integer isAsc;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
public class CommentReq {
|
||||
|
||||
@NotNull(message = "关联id不能为空")
|
||||
@ApiModelProperty(value = "关联id", required = true)
|
||||
private Long linkId;
|
||||
|
||||
@ApiModelProperty(value = "上级评论id,如果没有上级评论,(不传值默认0,评论作品)")
|
||||
private Long parentId = 0L;
|
||||
|
||||
@ApiModelProperty(value = "评论内容", required = true)
|
||||
@NotNull(message = "评论内容不能为空")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty("评论图片")
|
||||
private String image;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/10/13 9:44
|
||||
*/
|
||||
@Data
|
||||
public class ConfirmStoreReq {
|
||||
|
||||
@ApiModelProperty("订单id")
|
||||
private Long orderId;
|
||||
|
||||
@ApiModelProperty("表现师id")
|
||||
private Long storeId;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ContentCanUseReq {
|
||||
/**
|
||||
* 需检测的文本内容,文本字数的上限为2500字,需使用UTF-8编码
|
||||
*/
|
||||
private String content;
|
||||
/**
|
||||
* 需要检测的图片或音频的url
|
||||
*/
|
||||
private String mediaUrl;
|
||||
/**
|
||||
* 场景枚举值(1 资料;2 评论;3 论坛;4 社交日志)
|
||||
*/
|
||||
private Integer scene;
|
||||
/**
|
||||
* 文本标题,需使用UTF-8编码
|
||||
*/
|
||||
private String title;
|
||||
/**
|
||||
* 用户昵称,需使用UTF-8编码
|
||||
*/
|
||||
private String nickname;
|
||||
/**
|
||||
* 个性签名,该参数仅在资料类场景有效(scene=1),需使用UTF-8编码
|
||||
*/
|
||||
private String signature;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @Author liwenlong
|
||||
*/
|
||||
@Data
|
||||
public class CreateOrderReq {
|
||||
|
||||
@NotNull(message = "商品id不能为空")
|
||||
@ApiModelProperty(required = true, value = "商品id")
|
||||
private Long goodsId;
|
||||
|
||||
@NotNull(message = "规格id不能为空")
|
||||
@ApiModelProperty(required = true, value = "规格id")
|
||||
private Long specId;
|
||||
|
||||
@NotNull(message = "数量不能为空")
|
||||
@ApiModelProperty(required = true, value = "数量")
|
||||
private Integer quantity;
|
||||
|
||||
@ApiModelProperty("支付类型")
|
||||
private Integer payType;
|
||||
|
||||
@ApiModelProperty("选择余额支付的时候密码校验")
|
||||
private String balancePayPwd;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@NotNull(message = "用户地址id不能为空")
|
||||
@ApiModelProperty(required = true, value = "用户地址id")
|
||||
private Long addressId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Date 2022/1/19 10:27
|
||||
*/
|
||||
@Data
|
||||
public class CustomerDeliverGoodsReq {
|
||||
private Long orderId;
|
||||
|
||||
private Integer orderType;
|
||||
|
||||
private String comCourierId;//退货物流单号
|
||||
|
||||
private Long dictId;
|
||||
|
||||
private Long refundId;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/10/13 17:13
|
||||
*/
|
||||
@Data
|
||||
public class CustomerPayReq {
|
||||
|
||||
|
||||
@ApiModelProperty("订单id")
|
||||
private Long orderId;
|
||||
|
||||
@ApiModelProperty("支付类型: 1 app支付宝 2 h5支付宝 3 app微信 4 h5微信 5 小程序 6 苹果支付 7 余额")
|
||||
private Integer payType;
|
||||
|
||||
@ApiModelProperty("使用余额支付时 支付密码")
|
||||
private String payPwd;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2024/1/27 16:56
|
||||
*/
|
||||
@Data
|
||||
public class DrawingDetailsPageReq extends PageBasic {
|
||||
|
||||
@ApiModelProperty("订单id")
|
||||
private Long orderId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/10/13 9:55
|
||||
*/
|
||||
@Data
|
||||
public class EvaluateReq {
|
||||
|
||||
@ApiModelProperty("订单id")
|
||||
private Long orderId;
|
||||
|
||||
@ApiModelProperty("质量评分")
|
||||
private BigDecimal qualityStar;
|
||||
|
||||
@ApiModelProperty("效率评分")
|
||||
private BigDecimal efficiencyStar;
|
||||
|
||||
@ApiModelProperty("服务评分")
|
||||
private BigDecimal serviceStar;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/2/13 15:07
|
||||
*/
|
||||
@Data
|
||||
public class GoodsPageReq extends PageBasic {
|
||||
|
||||
|
||||
@ApiModelProperty("商品类型id")
|
||||
private Long goodsTypeId;
|
||||
|
||||
@ApiModelProperty("关键字搜索")
|
||||
private String keyword;
|
||||
|
||||
@ApiModelProperty("排序 1 综合推荐 2 销量 3 价格 4上架时间")
|
||||
private Integer sortType;
|
||||
|
||||
@ApiModelProperty(value = "1升序 2 降序")
|
||||
private Integer isAsc;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class HotSearchListReq {
|
||||
|
||||
@ApiModelProperty(value = "关键字")
|
||||
private String keyword;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/2/13 16:15
|
||||
*/
|
||||
@Data
|
||||
public class InsertShoppingCarReq {
|
||||
@NotNull(message = "规格id不能为空")
|
||||
private Long speId; //规格Id
|
||||
@NotNull(message = "规格数量不能为空")
|
||||
private Integer quantity; //数量
|
||||
|
||||
@NotNull(message = "商品id不能为空")
|
||||
private Long goodsId;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class IsNeedGetOrderDetailReq {
|
||||
|
||||
private String date;
|
||||
|
||||
private Long orderId;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class IsNeedGetOrderDetailReq2 {
|
||||
|
||||
private Date date;
|
||||
|
||||
private Long orderId;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class LakalaPaySuccessReq {
|
||||
/**
|
||||
* 商户订单号
|
||||
*/
|
||||
private String outOrderNo;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
public class LikeReq {
|
||||
|
||||
/**
|
||||
* 1 新闻 2 新闻评论 3 活动
|
||||
*/
|
||||
@NotNull(message = "类型不能为空")
|
||||
private Integer type;
|
||||
|
||||
@NotNull(message = "关联id不能为空")
|
||||
@ApiModelProperty("关联id 新闻id/新闻评论id/活动id")
|
||||
private Long linkId;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2024/1/26 17:37
|
||||
*/
|
||||
@Data
|
||||
public class MallEvaluateReq {
|
||||
|
||||
@ApiModelProperty("订单id")
|
||||
private Long orderId;
|
||||
|
||||
@ApiModelProperty("评价星级;1~5个星级")
|
||||
private BigDecimal star;
|
||||
|
||||
@ApiModelProperty("评价内容")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty("评价图片")
|
||||
private String images;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/2/15 13:56
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class MallOrderConfirmReq {
|
||||
|
||||
private Long orderId;
|
||||
|
||||
private Integer orderType;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/2/15 10:16
|
||||
*/
|
||||
@Data
|
||||
public class MallOrderPageReq extends PageBasic {
|
||||
|
||||
@ApiModelProperty("订单状态")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/2/16 9:23
|
||||
*/
|
||||
@Data
|
||||
public class MallOrderPayReq {
|
||||
|
||||
private Long orderId;//订单id
|
||||
|
||||
private Integer payType = -1;//支付方式, -1 不使用 1:支付宝 2 微信
|
||||
|
||||
private String balancePayPwd;//选择余额支付的时候密码校验
|
||||
|
||||
private String remark;
|
||||
|
||||
private BigDecimal commissionPrice ;//佣金金额 不使用佣金余额支付时为空
|
||||
|
||||
private BigDecimal integralPrice;//积分金额 不使用积分金额支付时为空
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/2/14 13:59
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class MallSettlementReq {
|
||||
|
||||
@NotNull(message = "规格id不能为空")
|
||||
@ApiModelProperty(value = "规格id", required = true)
|
||||
private Long specId;
|
||||
|
||||
@NotNull(message = "数量不能为空")
|
||||
@ApiModelProperty(value = "数量", required = true)
|
||||
private Integer quantity;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class NewsPageReq extends PageBasic {
|
||||
|
||||
@ApiModelProperty(value = "关键字")
|
||||
private String keyword;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/12/25 10:58
|
||||
*/
|
||||
@Data
|
||||
public class NoticeListReq {
|
||||
|
||||
@ApiModelProperty("用户类型")
|
||||
private Integer userType;
|
||||
|
||||
@ApiModelProperty("公告类型")
|
||||
private String noticeType;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2024/1/26 17:10
|
||||
*/
|
||||
@Data
|
||||
public class OnceAgainCreateOrderReq {
|
||||
|
||||
@NotNull(message = "订单id不能为空")
|
||||
@ApiModelProperty(required = true, value = "订单id不能为空")
|
||||
private Long orderId;
|
||||
|
||||
@ApiModelProperty("支付类型")
|
||||
private Integer payType;
|
||||
|
||||
@ApiModelProperty("选择余额支付的时候密码校验")
|
||||
private String balancePayPwd;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@NotNull(message = "用户地址id不能为空")
|
||||
@ApiModelProperty(required = true, value = "用户地址id")
|
||||
private Long addressId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2024/1/27 17:27
|
||||
*/
|
||||
@Data
|
||||
public class OrderAdjustPriceConfirmReq {
|
||||
|
||||
|
||||
@NotNull(message = "id不能为空")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("支付类型: 1 app支付宝 2 h5支付宝 3 app微信 4 h5微信 5 小程序 6 苹果支付 7 余额")
|
||||
private Integer payType;
|
||||
|
||||
@ApiModelProperty("使用余额支付时 支付密码")
|
||||
private String payPwd;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2024/1/24 10:41
|
||||
*/
|
||||
@Data
|
||||
public class OrderAdjustPricePayCountReq {
|
||||
|
||||
@ApiModelProperty(value = "订单id")
|
||||
private Long orderId;
|
||||
|
||||
@ApiModelProperty(value = "调价金额")
|
||||
private BigDecimal amount;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2024/1/24 10:44
|
||||
*/
|
||||
@Data
|
||||
public class OrderAdjustPricePayReq {
|
||||
|
||||
@ApiModelProperty("订单id")
|
||||
private Long orderId;
|
||||
|
||||
@ApiModelProperty(value = "调价金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@ApiModelProperty("调价备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("支付类型: 1 app支付宝 2 h5支付宝 3 app微信 4 h5微信 5 小程序 6 苹果支付 7 余额")
|
||||
private Integer payType;
|
||||
|
||||
@ApiModelProperty("使用余额支付时 支付密码")
|
||||
private String payPwd;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/10/13 9:49
|
||||
*/
|
||||
@Data
|
||||
public class OrderAdjustPriceReq {
|
||||
|
||||
@ApiModelProperty("订单id")
|
||||
private Long orderId;
|
||||
|
||||
@ApiModelProperty("调价价格")
|
||||
private BigDecimal amount;
|
||||
|
||||
@ApiModelProperty("调价备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("支付类型: 1 app支付宝 2 h5支付宝 3 app微信 4 h5微信 5 小程序 6 苹果支付 7 余额")
|
||||
private Integer payType;
|
||||
|
||||
@ApiModelProperty("使用余额支付时 支付密码")
|
||||
private String payPwd;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.frequency.appeal.entity.Appeal;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/10/13 9:42
|
||||
*/
|
||||
@Data
|
||||
public class OrderAppealReq {
|
||||
|
||||
@ApiModelProperty("订单id")
|
||||
private Long orderId;
|
||||
|
||||
@ApiModelProperty("申诉信息")
|
||||
private Appeal appeal;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/10/20 10:56
|
||||
*/
|
||||
@Data
|
||||
public class OrderChangeRecordPageReq extends PageBasic {
|
||||
|
||||
@ApiModelProperty("订单id")
|
||||
@NotNull(message = "订单id不能为空")
|
||||
private Long orderId;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/11/3 11:49
|
||||
*/
|
||||
@Data
|
||||
public class OrderExtensionReq {
|
||||
|
||||
@ApiModelProperty("订单id")
|
||||
private Long orderId;
|
||||
|
||||
@ApiModelProperty("延期时间")
|
||||
private Date extensionTime;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
public class OrderMessagePageReq {
|
||||
@NotNull(message = "订单ID不能为空")
|
||||
private Long orderId;
|
||||
|
||||
@NotNull(message = "订单类型不能为空")
|
||||
private Integer orderType;
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import com.ruoyi.vo.UserVo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/10/13 9:35
|
||||
*/
|
||||
@Data
|
||||
public class OrderPageReq extends PageBasic {
|
||||
|
||||
@ApiModelProperty("订单状态:-1 已取消 0首款待支付 1待确认 2进行中 3待收图 4待评价 5已评价 ")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("开始时间")
|
||||
private Date beginTime;
|
||||
|
||||
@ApiModelProperty("结束时间")
|
||||
private Date endTime;
|
||||
|
||||
@ApiModelProperty("作品id")
|
||||
private Long typeId;
|
||||
|
||||
@ApiModelProperty("排序类型 1最新 2价格")
|
||||
private Integer sortType = 1;
|
||||
|
||||
@ApiModelProperty("排序类型 1升序 2降序")
|
||||
private Integer lifting;
|
||||
|
||||
@ApiModelProperty("作品ids")
|
||||
private List<Long> typeIds;
|
||||
|
||||
@ApiModelProperty("项目大厅")
|
||||
private Boolean isHall = false;
|
||||
|
||||
@ApiModelProperty(value = "关键字搜索")
|
||||
private String keyword;
|
||||
|
||||
@ApiModelProperty("是否高端认证:1:普通技术 2高端技术")
|
||||
private Integer ifHighend;
|
||||
|
||||
@ApiModelProperty("查询设计师和表现师互相之间的订单")
|
||||
private Boolean isEachOther = false;
|
||||
|
||||
@ApiModelProperty("查询设计师和表现师互相之间的订单,对方的用户ID")
|
||||
private Long otherUserId;
|
||||
|
||||
@ApiModelProperty("查询设计师和表现师互相之间的订单,对方的用户类型 通过判断来处理")
|
||||
private Integer otherUserType;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "拉黑用户")
|
||||
private List<UserVo> blockUserList;
|
||||
|
||||
@ApiModelProperty(value = "屏蔽用户")
|
||||
private List<UserVo> shieldUserList;
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/10/13 9:34
|
||||
*/
|
||||
@Data
|
||||
public class OrderReleaseReq {
|
||||
|
||||
@ApiModelProperty("作品类型ID")
|
||||
private Long worksTypeId;
|
||||
|
||||
@ApiModelProperty("订单标题")
|
||||
@Excel(name = "订单标题")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty("订单金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@ApiModelProperty("对图时间")
|
||||
private Date deliverTime;
|
||||
|
||||
@ApiModelProperty("内容")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty("素材")
|
||||
@Excel(name = "素材")
|
||||
private String sourceMaterial;
|
||||
|
||||
@ApiModelProperty("表现师发布订单传---设计师nickname")
|
||||
private Long customerId;
|
||||
|
||||
@ApiModelProperty("设计师在表现师主页发布订单传---表现师id")
|
||||
private Long storeId;
|
||||
|
||||
@ApiModelProperty("支付类型: 1 app支付宝 2 h5支付宝 3 app微信 4 h5微信 5 小程序 6 苹果支付 7 余额")
|
||||
private Integer payType;
|
||||
|
||||
@ApiModelProperty("使用余额支付时 支付密码")
|
||||
private String payPwd;
|
||||
|
||||
@ApiModelProperty("图纸张数")
|
||||
private Integer drawingNum;
|
||||
|
||||
@ApiModelProperty("是否是高端客户 1普通 2 高端 ")
|
||||
private Integer ifHighend;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/10/18 14:04
|
||||
*/
|
||||
@Data
|
||||
public class OrdinaryAuthReq {
|
||||
|
||||
|
||||
@ApiModelProperty("认证类型 1普通认证 3酷家乐")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("身份证正面")
|
||||
private String idFront;
|
||||
|
||||
@ApiModelProperty("身份证反面")
|
||||
private String idBack;
|
||||
|
||||
@ApiModelProperty("手持身份证照片")
|
||||
private String idHandHand;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("身份证号码")
|
||||
private String idcardNo;
|
||||
|
||||
@ApiModelProperty("性别;性别 S:未知,M:男,F:女")
|
||||
private String sex;
|
||||
|
||||
@ApiModelProperty("从业时间")
|
||||
private String practiceDate;
|
||||
|
||||
@ApiModelProperty("擅长领域")
|
||||
private String specialityArea;
|
||||
|
||||
@ApiModelProperty("区域")
|
||||
private String area;
|
||||
|
||||
@ApiModelProperty("开户行")
|
||||
private String bank;
|
||||
|
||||
@ApiModelProperty("开户支行")
|
||||
private String subbranch;
|
||||
|
||||
@ApiModelProperty("银行卡")
|
||||
private String bankCard;
|
||||
|
||||
@ApiModelProperty("认证金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@ApiModelProperty("支付类型: 1 app支付宝 2 h5支付宝 3 app微信 4 h5微信 5 小程序 6 苹果支付 7 余额")
|
||||
private Integer payType;
|
||||
|
||||
@ApiModelProperty("使用余额支付时 支付密码")
|
||||
private String payPwd;
|
||||
|
||||
@ApiModelProperty("工种")
|
||||
private String branchWork;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2024/1/29 14:40
|
||||
*/
|
||||
@Data
|
||||
public class PlatformRulesPageReq extends PageBasic {
|
||||
|
||||
@ApiModelProperty("用户类型 1设计师 2表现师")
|
||||
private Integer userType;
|
||||
|
||||
private Long platformRulesTypeId;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/10/13 9:52
|
||||
*/
|
||||
@Data
|
||||
public class ReceiveDrawingsAndPayReq {
|
||||
|
||||
@ApiModelProperty("订单id")
|
||||
private Long orderId;
|
||||
|
||||
@ApiModelProperty("支付类型: 1 app支付宝 2 h5支付宝 3 app微信 4 h5微信 5 小程序 6 苹果支付 7 余额")
|
||||
private Integer payType;
|
||||
|
||||
@ApiModelProperty("使用余额支付时 支付密码")
|
||||
private String payPwd;
|
||||
|
||||
@ApiModelProperty("是否同意作品进入到会员作品库 1 否 2 同意")
|
||||
private Integer isAgree = 2;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/11/15 15:27
|
||||
*/
|
||||
@Data
|
||||
public class RefuseReq {
|
||||
|
||||
@ApiModelProperty(value = "id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "拒绝原因")
|
||||
private String reason;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.frequency.orderpanorama.entity.OrderPanorama;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/10/13 9:50
|
||||
*/
|
||||
@Data
|
||||
public class SampleImagesUploadReq {
|
||||
|
||||
@ApiModelProperty("订单id")
|
||||
private Long orderId;
|
||||
|
||||
@ApiModelProperty("作品图片")
|
||||
private String coverImage;
|
||||
|
||||
@ApiModelProperty("作品图片")
|
||||
private String images;
|
||||
|
||||
@ApiModelProperty("3D图片")
|
||||
private List<OrderPanorama> orderPanoramaList;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/10/16 11:59
|
||||
*/
|
||||
@Data
|
||||
public class SearchPageReq extends PageBasic {
|
||||
|
||||
@ApiModelProperty(value = "类型 1作品库 2绘图员 3论坛 4订单")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "关键字")
|
||||
private String keyword;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/10/16 10:27
|
||||
*/
|
||||
@Data
|
||||
public class SendMessageReq {
|
||||
|
||||
|
||||
@ApiModelProperty("申诉主表id")
|
||||
@NotNull(message = "申诉id不能为空")
|
||||
private Long appealId;
|
||||
|
||||
@ApiModelProperty("对话消息;文字或图片")
|
||||
private String message;
|
||||
|
||||
@ApiModelProperty("图片")
|
||||
private String images;
|
||||
|
||||
@ApiModelProperty("消息类型")
|
||||
private String messageType;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/2/14 10:45
|
||||
*/
|
||||
@Data
|
||||
public class ShoppingCarCreateOrderReq {
|
||||
|
||||
private List<Long> shoppingCardIdList;//购物车id
|
||||
|
||||
private Long addressId;//用户地址id
|
||||
|
||||
private String remark;//备注
|
||||
|
||||
private Integer payType = -1;//支付方式,-1 不使用 1:支付宝 2 微信
|
||||
|
||||
private String balancePayPwd;//选择余额支付的时候密码校验
|
||||
|
||||
private BigDecimal commissionPrice;//佣金金额 不使用佣金余额支付时为空
|
||||
|
||||
private BigDecimal integralPrice;//积分金额 不使用积分金额支付时为空
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author 刘耀
|
||||
* @Date 2022/1/17 16:17
|
||||
*/
|
||||
@Data
|
||||
public class ShoppingCartSettlementReq {
|
||||
|
||||
@ApiModelProperty(value = "购物车id集合")
|
||||
private List<Long> shoppingCardIdList;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class StatisticsReq {
|
||||
|
||||
//1 普通 2 高端 3 酷家乐
|
||||
private Integer ifHighend;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class TxContentReq {
|
||||
private String content;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author a
|
||||
* @date 2023/10/18 14:05
|
||||
*/
|
||||
@Data
|
||||
public class UpscaleAuthReq {
|
||||
|
||||
@ApiModelProperty("支付类型: 1 app支付宝 2 h5支付宝 3 app微信 4 h5微信 5 小程序 6 苹果支付 7 余额")
|
||||
private Integer payType;
|
||||
|
||||
@ApiModelProperty("使用余额支付时 支付密码")
|
||||
private String payPwd;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.ruoyi.controller.req;
|
||||
|
||||
import com.ruoyi.vo.PageBasic;
|
||||
import com.ruoyi.vo.UserVo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author liwenlong
|
||||
* @date 2023/4/17 14:18
|
||||
*/
|
||||
@Data
|
||||
public class VoteCommentPageReq extends PageBasic {
|
||||
|
||||
@NotNull(message = "投票id不能为空")
|
||||
@ApiModelProperty(value = "投票id", required = true)
|
||||
private Long voteId;
|
||||
|
||||
@ApiModelProperty(value = "上级评论id", required = false)
|
||||
private Long parentId;
|
||||
|
||||
@ApiModelProperty("排序 1时间 2热度")
|
||||
private Integer sortType;
|
||||
|
||||
@ApiModelProperty(value = "1升序 2 降序")
|
||||
private Integer isAsc;
|
||||
|
||||
@ApiModelProperty(value = "拉黑用户")
|
||||
private List<UserVo> blockUserList;
|
||||
|
||||
@ApiModelProperty(value = "屏蔽用户")
|
||||
private List<UserVo> shieldUserList;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user