新增分销商模块(6个表)
This commit is contained in:
@@ -7,9 +7,7 @@ import cn.hutool.http.HttpRequest;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.gxwebsoft.cms.entity.*;
|
import com.gxwebsoft.cms.entity.*;
|
||||||
import com.gxwebsoft.cms.param.MpMenuParam;
|
import com.gxwebsoft.cms.param.*;
|
||||||
import com.gxwebsoft.cms.param.NavigationParam;
|
|
||||||
import com.gxwebsoft.cms.param.WebsiteParam;
|
|
||||||
import com.gxwebsoft.cms.service.*;
|
import com.gxwebsoft.cms.service.*;
|
||||||
import com.gxwebsoft.common.core.exception.BusinessException;
|
import com.gxwebsoft.common.core.exception.BusinessException;
|
||||||
import com.gxwebsoft.common.core.security.JwtUtil;
|
import com.gxwebsoft.common.core.security.JwtUtil;
|
||||||
@@ -26,6 +24,7 @@ import com.gxwebsoft.common.system.service.DictService;
|
|||||||
import com.gxwebsoft.oa.entity.Company;
|
import com.gxwebsoft.oa.entity.Company;
|
||||||
import com.gxwebsoft.oa.param.LinkParam;
|
import com.gxwebsoft.oa.param.LinkParam;
|
||||||
import com.gxwebsoft.oa.service.LinkService;
|
import com.gxwebsoft.oa.service.LinkService;
|
||||||
|
import com.gxwebsoft.shop.entity.MerchantAccount;
|
||||||
import com.gxwebsoft.shop.entity.Order;
|
import com.gxwebsoft.shop.entity.Order;
|
||||||
import com.gxwebsoft.shop.service.OrderService;
|
import com.gxwebsoft.shop.service.OrderService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@@ -83,21 +82,22 @@ public class WebsiteController extends BaseController {
|
|||||||
@Resource
|
@Resource
|
||||||
private DictDataService dictDataService;
|
private DictDataService dictDataService;
|
||||||
|
|
||||||
@ApiOperation("获取网站信息")
|
@ApiOperation("获取网站信息")
|
||||||
@GetMapping("/getSiteInfo")
|
@GetMapping("/getSiteInfo")
|
||||||
public ApiResult<?> getSiteInfo(HttpServletRequest request) {
|
public ApiResult<Website> getSiteInfo(HttpServletRequest request) {
|
||||||
final Integer tenantId = getTenantId();
|
final Integer tenantId = getTenantId();
|
||||||
String key = "SiteInfo:" + tenantId;
|
String key = "SiteInfo:" + tenantId;
|
||||||
final String siteInfo = redisUtil.get(key);
|
final String siteInfo = redisUtil.get(key);
|
||||||
String access_token = JwtUtil.getAccessToken(request);
|
String access_token = JwtUtil.getAccessToken(request);
|
||||||
|
// redisUtil.set("Domain:ffai.cn",10157);
|
||||||
if(tenantId.equals(0)){
|
// redisUtil.set("Domain:www.xn--15qx69a6lbn8t0tlmve.com",10157);
|
||||||
return fail("租户ID不存在",null);
|
// redisUtil.set("Domain:xn--15qx69a6lbn8t0tlmve.com",10157);
|
||||||
}
|
// redisUtil.set("Domain:oa.gxwebsoft.com",5);
|
||||||
// 从缓存读取信息
|
// redisUtil.set("Domain:gxwebsoft.com",5);
|
||||||
if(StrUtil.isNotBlank(siteInfo)){
|
// 从缓存读取信息
|
||||||
// return success(JSONObject.parseObject(siteInfo,Website.class));
|
if(StrUtil.isNotBlank(siteInfo)){
|
||||||
}
|
return success(JSONObject.parseObject(siteInfo,Website.class));
|
||||||
|
}
|
||||||
|
|
||||||
// 获取站点信息
|
// 获取站点信息
|
||||||
final WebsiteParam websiteParam = new WebsiteParam();
|
final WebsiteParam websiteParam = new WebsiteParam();
|
||||||
@@ -108,93 +108,87 @@ public class WebsiteController extends BaseController {
|
|||||||
|
|
||||||
HashMap<String, Object> map = new HashMap<>();
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
|
|
||||||
// 获取站点信息
|
// 获取站点信息
|
||||||
final List<Website> websites = websiteService.listRel(websiteParam);
|
final List<Website> websites = websiteService.listRel(websiteParam);
|
||||||
final Website website = websites.get(0);
|
final Website website = websites.get(0);
|
||||||
map.put("website",website);
|
|
||||||
|
|
||||||
// 原生导航条
|
// 附加自定义字段
|
||||||
final List<MpPages> tabBar = mpPagesService.list(new LambdaQueryWrapper<MpPages>().eq(MpPages::getSubpackage, "MainPackage").last("limit 5"));
|
website.setFields(websiteFieldService.list());
|
||||||
map.put("tabBar",tabBar);
|
|
||||||
|
|
||||||
// 读取幻灯片广告
|
// 附加自定义导航
|
||||||
final List<Ad> list = adService.list(new LambdaQueryWrapper<Ad>().eq(Ad::getAdType,"幻灯片"));
|
final NavigationParam navigationParam = new NavigationParam();
|
||||||
if (!CollectionUtils.isEmpty(list)) {
|
navigationParam.setHide(0);
|
||||||
map.put("slide",list);
|
website.setNavigations(navigationService.listRel(navigationParam));
|
||||||
}
|
|
||||||
|
|
||||||
// 小程序端导航图标
|
// 读取幻灯片广告
|
||||||
final MpMenuParam mpMenuParam = new MpMenuParam();
|
final AdParam adParam = new AdParam();
|
||||||
final List<MpMenu> mpMenus = mpMenuService.listRel(mpMenuParam);
|
final PageResult<Ad> adPageResult = adService.pageRel(adParam);
|
||||||
final Map<String, List<MpMenu>> mpMenuMap = mpMenus.stream().collect(Collectors.groupingBy(MpMenu::getGroupName));
|
website.setAds(adPageResult.getList());
|
||||||
map.put("mpMenus",mpMenuMap);
|
|
||||||
|
|
||||||
// 附加自定义导航
|
// 首页布局
|
||||||
final NavigationParam navigationParam = new NavigationParam();
|
final Design design = designService.getOne(new LambdaQueryWrapper<Design>().eq(Design::getHome, 1).last("limit 1"));
|
||||||
navigationParam.setHide(0);
|
if (design != null) {
|
||||||
final List<Navigation> navigations = navigationService.listRel(navigationParam);
|
website.setLayout(design.getLayout());
|
||||||
final Map<Integer, List<Navigation>> collect = navigations.stream().collect(Collectors.groupingBy(Navigation::getPosition));
|
|
||||||
website.setNavigations(navigations);
|
|
||||||
// 封装网站顶部菜单
|
|
||||||
if(!CollectionUtils.isEmpty(collect.get(1))){
|
|
||||||
final List<Navigation> topNavs = toTreeData(collect.get(1), 0, Navigation::getParentId, Navigation::getNavigationId, Navigation::setChildren);
|
|
||||||
website.setTopNavs(topNavs);
|
|
||||||
}
|
|
||||||
// 封装网站底部菜单
|
|
||||||
if (!CollectionUtils.isEmpty(collect.get(2))) {
|
|
||||||
final List<Navigation> bottomNavs = toTreeData(collect.get(2), 0, Navigation::getParentId, Navigation::getNavigationId, Navigation::setChildren);
|
|
||||||
website.setBottomNavs(bottomNavs);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 首页布局
|
|
||||||
final Design design = designService.getOne(new LambdaQueryWrapper<Design>().eq(Design::getHome, 1).last("limit 1"));
|
|
||||||
if (design != null) {
|
|
||||||
website.setLayout(design.getLayout());
|
|
||||||
}
|
|
||||||
|
|
||||||
// 读取友情链接
|
|
||||||
final LinkParam linkParam = new LinkParam();
|
|
||||||
linkParam.setLinkType("友情链接");
|
|
||||||
website.setLinks(linkService.listRel(linkParam));
|
|
||||||
|
|
||||||
// 配置信息
|
|
||||||
HashMap<String, Object> config = new HashMap<>();
|
|
||||||
config.put("LICENSE_CODE", "");
|
|
||||||
config.put("MAP_KEY", "");
|
|
||||||
final List<WebsiteField> fields = websiteFieldService.list();
|
|
||||||
fields.forEach(d -> {
|
|
||||||
config.put(d.getName(),d.getValue());
|
|
||||||
});
|
|
||||||
map.put("config",config);
|
|
||||||
// website.setConfig(config);
|
|
||||||
|
|
||||||
// 服务器时间
|
|
||||||
HashMap<String, Object> serverTime = new HashMap<>();
|
|
||||||
// 今天日期
|
|
||||||
DateTime date = DateUtil.date();
|
|
||||||
String today= DateUtil.today();
|
|
||||||
// 明天日期
|
|
||||||
final DateTime dateTime = DateUtil.tomorrow();
|
|
||||||
String tomorrow = DateUtil.format(dateTime, "yyyy-MM-dd");
|
|
||||||
// 后天日期
|
|
||||||
final DateTime dateTime2 = DateUtil.offsetDay(date, 2);
|
|
||||||
final String afterDay = DateUtil.format(dateTime2, "yyyy-MM-dd");
|
|
||||||
// 今天星期几
|
|
||||||
final int week = DateUtil.thisDayOfWeek();
|
|
||||||
final DateTime nextWeek = DateUtil.nextWeek();
|
|
||||||
serverTime.put("now",DateUtil.now()); // 2024-07-18 22:06:36
|
|
||||||
serverTime.put("today",today); // 2024-07-18
|
|
||||||
serverTime.put("tomorrow",tomorrow); // 2024-07-19
|
|
||||||
serverTime.put("afterDay",afterDay); // 2024-07-20
|
|
||||||
serverTime.put("nextWeek",nextWeek); // 2024-07-25 22:06:36
|
|
||||||
serverTime.put("week",week); // 5
|
|
||||||
website.setServerTime(serverTime);
|
|
||||||
redisUtil.set(key,website,1L, TimeUnit.DAYS);
|
|
||||||
return success(map);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 提取文章分类作为网站导航
|
||||||
|
// final ArticleCategoryParam param = new ArticleCategoryParam();
|
||||||
|
// param.setDeleted(0);
|
||||||
|
// param.setStatus(0);
|
||||||
|
// website.setCategoryList(articleCategoryService.listRel(param));
|
||||||
|
|
||||||
|
// 读取友情链接
|
||||||
|
final LinkParam linkParam = new LinkParam();
|
||||||
|
linkParam.setLinkType("友情链接");
|
||||||
|
website.setLinks(linkService.listRel(linkParam));
|
||||||
|
|
||||||
|
// 读取会员信息
|
||||||
|
if(access_token != null){
|
||||||
|
// 请求主服务器获取租户信息
|
||||||
|
String result = HttpRequest.get("https://server.gxwebsoft.com/api/auth/user")
|
||||||
|
.header("Authorization", access_token)
|
||||||
|
.header("Tenantid", tenantId.toString())
|
||||||
|
.timeout(20000)//超时,毫秒
|
||||||
|
.execute().body();
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||||
|
final String data = jsonObject.getString("data");
|
||||||
|
final User user = JSONObject.parseObject(data, User.class);
|
||||||
|
// 商户账号
|
||||||
|
// website.setMerchantAccount(merchantAccountService.getOne(new LambdaQueryWrapper<MerchantAccount>().eq(MerchantAccount::getPhone, user.getPhone()).last("limit 1")));
|
||||||
|
// website.setUserInfo(user);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 授权信息
|
||||||
|
HashMap<String, Object> config = new HashMap<>();
|
||||||
|
config.put("LICENSE_CODE", "");
|
||||||
|
config.put("MAP_KEY", "");
|
||||||
|
website.setConfig(config);
|
||||||
|
|
||||||
|
// 服务器时间
|
||||||
|
HashMap<String, Object> serverTime = new HashMap<>();
|
||||||
|
// 今天日期
|
||||||
|
DateTime date = DateUtil.date();
|
||||||
|
String today= DateUtil.today();
|
||||||
|
// 明天日期
|
||||||
|
final DateTime dateTime = DateUtil.tomorrow();
|
||||||
|
String tomorrow = DateUtil.format(dateTime, "yyyy-MM-dd");
|
||||||
|
// 后天日期
|
||||||
|
final DateTime dateTime2 = DateUtil.offsetDay(date, 2);
|
||||||
|
final String afterDay = DateUtil.format(dateTime2, "yyyy-MM-dd");
|
||||||
|
// 今天星期几
|
||||||
|
final int week = DateUtil.thisDayOfWeek();
|
||||||
|
final DateTime nextWeek = DateUtil.nextWeek();
|
||||||
|
serverTime.put("now",DateUtil.now());
|
||||||
|
serverTime.put("today",today);
|
||||||
|
serverTime.put("tomorrow",tomorrow);
|
||||||
|
serverTime.put("afterDay",afterDay);
|
||||||
|
serverTime.put("week",week);
|
||||||
|
serverTime.put("nextWeek",nextWeek);
|
||||||
|
website.setServerTime(serverTime);
|
||||||
|
redisUtil.set(key,website,1L, TimeUnit.DAYS);
|
||||||
|
return success(website);
|
||||||
|
}
|
||||||
|
|
||||||
private void createWebsite(String access_token) {
|
private void createWebsite(String access_token) {
|
||||||
final Integer tenantId = getTenantId();
|
final Integer tenantId = getTenantId();
|
||||||
// 请求主服务器获取租户信息
|
// 请求主服务器获取租户信息
|
||||||
|
|||||||
@@ -0,0 +1,529 @@
|
|||||||
|
package com.gxwebsoft.cms.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateTime;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.http.HttpRequest;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.gxwebsoft.cms.entity.*;
|
||||||
|
import com.gxwebsoft.cms.param.MpMenuParam;
|
||||||
|
import com.gxwebsoft.cms.param.NavigationParam;
|
||||||
|
import com.gxwebsoft.cms.param.WebsiteParam;
|
||||||
|
import com.gxwebsoft.cms.service.*;
|
||||||
|
import com.gxwebsoft.common.core.exception.BusinessException;
|
||||||
|
import com.gxwebsoft.common.core.security.JwtUtil;
|
||||||
|
import com.gxwebsoft.common.core.utils.RedisUtil;
|
||||||
|
import com.gxwebsoft.common.core.web.ApiResult;
|
||||||
|
import com.gxwebsoft.common.core.web.BaseController;
|
||||||
|
import com.gxwebsoft.common.core.web.BatchParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.common.system.entity.Dict;
|
||||||
|
import com.gxwebsoft.common.system.entity.DictData;
|
||||||
|
import com.gxwebsoft.common.system.entity.User;
|
||||||
|
import com.gxwebsoft.common.system.service.DictDataService;
|
||||||
|
import com.gxwebsoft.common.system.service.DictService;
|
||||||
|
import com.gxwebsoft.oa.entity.Company;
|
||||||
|
import com.gxwebsoft.oa.param.LinkParam;
|
||||||
|
import com.gxwebsoft.oa.service.LinkService;
|
||||||
|
import com.gxwebsoft.shop.entity.Order;
|
||||||
|
import com.gxwebsoft.shop.service.OrderService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.apache.commons.lang3.time.DateUtils;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import static com.gxwebsoft.common.core.utils.CommonUtil.toTreeData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网站信息记录表控制器
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:14:15
|
||||||
|
*/
|
||||||
|
@Api(tags = "网站信息记录表管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/cms/website-old")
|
||||||
|
public class WebsiteOldController extends BaseController {
|
||||||
|
@Resource
|
||||||
|
private WebsiteService websiteService;
|
||||||
|
@Resource
|
||||||
|
private WebsiteFieldService websiteFieldService;
|
||||||
|
@Resource
|
||||||
|
private DesignService designService;
|
||||||
|
@Resource
|
||||||
|
private NavigationService navigationService;
|
||||||
|
@Resource
|
||||||
|
private AdService adService;
|
||||||
|
@Resource
|
||||||
|
private FormService formService;
|
||||||
|
@Resource
|
||||||
|
private ArticleCategoryService articleCategoryService;
|
||||||
|
@Resource
|
||||||
|
private LinkService linkService;
|
||||||
|
@Resource
|
||||||
|
private RedisUtil redisUtil;
|
||||||
|
@Resource
|
||||||
|
private MpPagesService mpPagesService;
|
||||||
|
@Resource
|
||||||
|
private MpMenuService mpMenuService;
|
||||||
|
@Resource
|
||||||
|
private OrderService orderService;
|
||||||
|
@Resource
|
||||||
|
private DictService dictService;
|
||||||
|
@Resource
|
||||||
|
private DictDataService dictDataService;
|
||||||
|
|
||||||
|
@ApiOperation("获取网站信息")
|
||||||
|
@GetMapping("/getSiteInfo")
|
||||||
|
public ApiResult<?> getSiteInfo(HttpServletRequest request) {
|
||||||
|
final Integer tenantId = getTenantId();
|
||||||
|
String key = "SiteInfo:" + tenantId;
|
||||||
|
final String siteInfo = redisUtil.get(key);
|
||||||
|
String access_token = JwtUtil.getAccessToken(request);
|
||||||
|
|
||||||
|
if(tenantId.equals(0)){
|
||||||
|
return fail("租户ID不存在",null);
|
||||||
|
}
|
||||||
|
// 从缓存读取信息
|
||||||
|
if(StrUtil.isNotBlank(siteInfo)){
|
||||||
|
// return success(JSONObject.parseObject(siteInfo,Website.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取站点信息
|
||||||
|
final WebsiteParam websiteParam = new WebsiteParam();
|
||||||
|
if (websiteService.count() == 0) {
|
||||||
|
// 创建网站
|
||||||
|
createWebsite(access_token);
|
||||||
|
}
|
||||||
|
|
||||||
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
|
|
||||||
|
// 获取站点信息
|
||||||
|
final List<Website> websites = websiteService.listRel(websiteParam);
|
||||||
|
final Website website = websites.get(0);
|
||||||
|
map.put("website",website);
|
||||||
|
|
||||||
|
// 原生导航条
|
||||||
|
final List<MpPages> tabBar = mpPagesService.list(new LambdaQueryWrapper<MpPages>().eq(MpPages::getSubpackage, "MainPackage").last("limit 5"));
|
||||||
|
map.put("tabBar",tabBar);
|
||||||
|
|
||||||
|
// 读取幻灯片广告
|
||||||
|
final List<Ad> list = adService.list(new LambdaQueryWrapper<Ad>().eq(Ad::getAdType,"幻灯片"));
|
||||||
|
if (!CollectionUtils.isEmpty(list)) {
|
||||||
|
map.put("slide",list);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 小程序端导航图标
|
||||||
|
final MpMenuParam mpMenuParam = new MpMenuParam();
|
||||||
|
final List<MpMenu> mpMenus = mpMenuService.listRel(mpMenuParam);
|
||||||
|
final Map<String, List<MpMenu>> mpMenuMap = mpMenus.stream().collect(Collectors.groupingBy(MpMenu::getGroupName));
|
||||||
|
map.put("mpMenus",mpMenuMap);
|
||||||
|
|
||||||
|
// 附加自定义导航
|
||||||
|
final NavigationParam navigationParam = new NavigationParam();
|
||||||
|
navigationParam.setHide(0);
|
||||||
|
final List<Navigation> navigations = navigationService.listRel(navigationParam);
|
||||||
|
final Map<Integer, List<Navigation>> collect = navigations.stream().collect(Collectors.groupingBy(Navigation::getPosition));
|
||||||
|
website.setNavigations(navigations);
|
||||||
|
map.put("menus",navigations);
|
||||||
|
// 封装网站顶部菜单
|
||||||
|
if(!CollectionUtils.isEmpty(collect.get(1))){
|
||||||
|
final List<Navigation> topNavs = toTreeData(collect.get(1), 0, Navigation::getParentId, Navigation::getNavigationId, Navigation::setChildren);
|
||||||
|
website.setTopNavs(topNavs);
|
||||||
|
}
|
||||||
|
// 封装网站底部菜单
|
||||||
|
if (!CollectionUtils.isEmpty(collect.get(2))) {
|
||||||
|
final List<Navigation> bottomNavs = toTreeData(collect.get(2), 0, Navigation::getParentId, Navigation::getNavigationId, Navigation::setChildren);
|
||||||
|
website.setBottomNavs(bottomNavs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 首页布局
|
||||||
|
final Design design = designService.getOne(new LambdaQueryWrapper<Design>().eq(Design::getHome, 1).last("limit 1"));
|
||||||
|
if (design != null) {
|
||||||
|
website.setLayout(design.getLayout());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 读取友情链接
|
||||||
|
final LinkParam linkParam = new LinkParam();
|
||||||
|
linkParam.setLinkType("友情链接");
|
||||||
|
website.setLinks(linkService.listRel(linkParam));
|
||||||
|
|
||||||
|
// 配置信息
|
||||||
|
HashMap<String, Object> config = new HashMap<>();
|
||||||
|
config.put("LICENSE_CODE", "");
|
||||||
|
config.put("MAP_KEY", "");
|
||||||
|
final List<WebsiteField> fields = websiteFieldService.list();
|
||||||
|
fields.forEach(d -> {
|
||||||
|
config.put(d.getName(),d.getValue());
|
||||||
|
});
|
||||||
|
map.put("config",config);
|
||||||
|
// website.setConfig(config);
|
||||||
|
|
||||||
|
// 服务器时间
|
||||||
|
HashMap<String, Object> serverTime = new HashMap<>();
|
||||||
|
// 今天日期
|
||||||
|
DateTime date = DateUtil.date();
|
||||||
|
String today= DateUtil.today();
|
||||||
|
// 明天日期
|
||||||
|
final DateTime dateTime = DateUtil.tomorrow();
|
||||||
|
String tomorrow = DateUtil.format(dateTime, "yyyy-MM-dd");
|
||||||
|
// 后天日期
|
||||||
|
final DateTime dateTime2 = DateUtil.offsetDay(date, 2);
|
||||||
|
final String afterDay = DateUtil.format(dateTime2, "yyyy-MM-dd");
|
||||||
|
// 今天星期几
|
||||||
|
final int week = DateUtil.thisDayOfWeek();
|
||||||
|
final DateTime nextWeek = DateUtil.nextWeek();
|
||||||
|
serverTime.put("now",DateUtil.now()); // 2024-07-18 22:06:36
|
||||||
|
serverTime.put("today",today); // 2024-07-18
|
||||||
|
serverTime.put("tomorrow",tomorrow); // 2024-07-19
|
||||||
|
serverTime.put("afterDay",afterDay); // 2024-07-20
|
||||||
|
serverTime.put("nextWeek",nextWeek); // 2024-07-25 22:06:36
|
||||||
|
serverTime.put("week",week); // 5
|
||||||
|
website.setServerTime(serverTime);
|
||||||
|
redisUtil.set(key,website,1L, TimeUnit.DAYS);
|
||||||
|
return success(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createWebsite(String access_token) {
|
||||||
|
final Integer tenantId = getTenantId();
|
||||||
|
// 请求主服务器获取租户信息
|
||||||
|
String result = HttpRequest.get("https://server.gxwebsoft.com/api/auth/tenant")
|
||||||
|
.header("Authorization", access_token)
|
||||||
|
.header("Tenantid", tenantId.toString())
|
||||||
|
.timeout(20000)//超时,毫秒
|
||||||
|
.execute().body();
|
||||||
|
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||||
|
final String data = jsonObject.getString("data");
|
||||||
|
final Company company = JSONObject.parseObject(data, Company.class);
|
||||||
|
if(company == null){
|
||||||
|
throw new BusinessException("站点不存在");
|
||||||
|
}
|
||||||
|
// 创建网站记录
|
||||||
|
final Website website = new Website();
|
||||||
|
website.setTenantId(company.getTenantId());
|
||||||
|
website.setWebsiteName(company.getShortName());
|
||||||
|
website.setWebsiteLogo(company.getCompanyLogo());
|
||||||
|
website.setWebsiteIcon("/favicon.ico");
|
||||||
|
website.setWebsiteType("企业官网");
|
||||||
|
website.setDomain(company.getDomain());
|
||||||
|
website.setExpirationTime(company.getExpirationTime());
|
||||||
|
website.setIndustryParent(company.getIndustryParent());
|
||||||
|
website.setIndustryChild(company.getIndustryChild());
|
||||||
|
website.setCompanyId(company.getCompanyId());
|
||||||
|
website.setAddress(company.getAddress());
|
||||||
|
website.setComments(company.getComments());
|
||||||
|
website.setKeywords(company.getCompanyName());
|
||||||
|
website.setUserId(company.getUserId());
|
||||||
|
websiteService.save(website);
|
||||||
|
|
||||||
|
// 创建默认页面及导航
|
||||||
|
final Navigation navigation = new Navigation();
|
||||||
|
final Design design = new Design();
|
||||||
|
// 1.首页
|
||||||
|
design.setName("首页");
|
||||||
|
design.setHome(1);
|
||||||
|
design.setPath("/");
|
||||||
|
design.setComponent("/index");
|
||||||
|
design.setSortNumber(0);
|
||||||
|
designService.save(design);
|
||||||
|
navigation.setTitle(design.getName());
|
||||||
|
navigation.setPath(design.getPath());
|
||||||
|
navigation.setComponent(design.getComponent());
|
||||||
|
navigation.setHome(design.getHome());
|
||||||
|
navigation.setPageId(design.getPageId());
|
||||||
|
navigation.setSortNumber(0);
|
||||||
|
navigation.setType(1);
|
||||||
|
navigation.setPosition(1);
|
||||||
|
navigationService.save(navigation);
|
||||||
|
// 2.关于我们
|
||||||
|
design.setName("关于我们");
|
||||||
|
design.setPath("/about");
|
||||||
|
design.setComponent("/about/index");
|
||||||
|
design.setSortNumber(1);
|
||||||
|
designService.save(design);
|
||||||
|
navigation.setTitle(design.getName());
|
||||||
|
navigation.setPath(design.getPath());
|
||||||
|
navigation.setComponent(design.getComponent());
|
||||||
|
navigation.setPageId(design.getPageId());
|
||||||
|
navigation.setSortNumber(1);
|
||||||
|
navigation.setType(1);
|
||||||
|
navigationService.save(navigation);
|
||||||
|
// 3.产品展示
|
||||||
|
final ArticleCategory articleCategory = new ArticleCategory();
|
||||||
|
articleCategory.setTitle("产品展示");
|
||||||
|
articleCategory.setPath("/product/" + articleCategory.getCategoryId());
|
||||||
|
articleCategory.setComponent("/article/photo");
|
||||||
|
articleCategory.setSortNumber(2);
|
||||||
|
articleCategoryService.save(articleCategory);
|
||||||
|
navigation.setTitle(articleCategory.getTitle());
|
||||||
|
navigation.setPath(articleCategory.getPath());
|
||||||
|
navigation.setComponent(articleCategory.getComponent());
|
||||||
|
navigation.setArticleCategoryId(articleCategory.getCategoryId());
|
||||||
|
navigation.setSortNumber(2);
|
||||||
|
navigation.setType(2);
|
||||||
|
navigationService.save(navigation);
|
||||||
|
// 4.新闻资讯
|
||||||
|
articleCategory.setTitle("新闻资讯");
|
||||||
|
articleCategoryService.save(articleCategory);
|
||||||
|
navigation.setTitle(articleCategory.getTitle());
|
||||||
|
navigation.setPath("/article/" + articleCategory.getCategoryId());
|
||||||
|
navigation.setComponent("/article/index");
|
||||||
|
navigation.setArticleCategoryId(articleCategory.getCategoryId());
|
||||||
|
navigation.setSortNumber(3);
|
||||||
|
navigation.setType(2);
|
||||||
|
navigation.setPosition(1);
|
||||||
|
navigationService.save(navigation);
|
||||||
|
// 5.表单页面
|
||||||
|
final Form form = new Form();
|
||||||
|
form.setName("业务咨询");
|
||||||
|
form.setLayout("[{\"id\":\"vhEB\",\"type\":\"text\",\"name\":\"姓名\",\"checked\":true},{\"id\":\"Hg7v\",\"type\":\"phone\",\"name\":\"手机号码\",\"checked\":true},{\"id\":\"byBy\",\"type\":\"textarea\",\"name\":\"需求描述\",\"checked\":false}]");
|
||||||
|
form.setComments("简单描述您的需求,我们会尽快联系您");
|
||||||
|
formService.save(form);
|
||||||
|
navigation.setTitle(form.getName());
|
||||||
|
navigation.setPath("/form/" + form.getFormId());
|
||||||
|
navigation.setComponent("/form/index");
|
||||||
|
navigation.setFormId(form.getFormId());
|
||||||
|
navigation.setSortNumber(4);
|
||||||
|
navigation.setType(4);
|
||||||
|
navigation.setPosition(1);
|
||||||
|
navigationService.save(navigation);
|
||||||
|
// 6.联系我们
|
||||||
|
design.setName("联系我们");
|
||||||
|
design.setPath("/contact");
|
||||||
|
design.setComponent("/about/index");
|
||||||
|
design.setSortNumber(5);
|
||||||
|
designService.save(design);
|
||||||
|
navigation.setTitle(design.getName());
|
||||||
|
navigation.setPath(design.getPath());
|
||||||
|
navigation.setComponent(design.getComponent());
|
||||||
|
navigation.setPageId(design.getPageId());
|
||||||
|
navigation.setSortNumber(5);
|
||||||
|
navigation.setType(1);
|
||||||
|
navigation.setPosition(1);
|
||||||
|
navigationService.save(navigation);
|
||||||
|
// 添加字典
|
||||||
|
final Dict dict = new Dict();
|
||||||
|
dict.setDictName("路由方式");
|
||||||
|
dict.setDictCode("navType");
|
||||||
|
dict.setSortNumber(100);
|
||||||
|
final boolean save = dictService.save(dict);
|
||||||
|
final Integer dictId = dict.getDictId();
|
||||||
|
final DictData dictData = new DictData();
|
||||||
|
dictData.setDictDataName("uni.navigateTo");
|
||||||
|
dictData.setDictDataCode("uni.navigateTo");
|
||||||
|
dictData.setComments("保留当前页面,跳转到应用内的某个页面,使用uni.navigateBack可以返回到原页面");
|
||||||
|
dictDataService.save(dictData);
|
||||||
|
dictData.setDictDataName("uni.redirectTo");
|
||||||
|
dictData.setDictDataCode("uni.redirectTo");
|
||||||
|
dictData.setComments("关闭当前页面,跳转到应用内的某个页面");
|
||||||
|
dictDataService.save(dictData);
|
||||||
|
dictData.setDictDataName("uni.reLaunch");
|
||||||
|
dictData.setDictDataCode("uni.reLaunch");
|
||||||
|
dictData.setComments("关闭所有页面,打开到应用内的某个页面");
|
||||||
|
dictDataService.save(dictData);
|
||||||
|
dictData.setDictDataName("uni.switchTab");
|
||||||
|
dictData.setDictDataCode("uni.switchTab");
|
||||||
|
dictData.setComments("跳转到 tabBar 页面,并关闭其他所有非 tabBar 页面");
|
||||||
|
dictDataService.save(dictData);
|
||||||
|
// 网站配置参数
|
||||||
|
List<WebsiteField> fields = new ArrayList<>();
|
||||||
|
WebsiteField field = new WebsiteField();
|
||||||
|
field.setType(0);
|
||||||
|
field.setName("siteLogo");
|
||||||
|
field.setValue(company.getCompanyLogo());
|
||||||
|
field.setComments("网站LOGO");
|
||||||
|
websiteFieldService.save(field);
|
||||||
|
field.setName("siteName");
|
||||||
|
field.setValue(company.getShortName());
|
||||||
|
field.setComments("网站名称");
|
||||||
|
websiteFieldService.save(field);
|
||||||
|
field.setName("icpNo");
|
||||||
|
field.setValue("-");
|
||||||
|
field.setComments("备案号");
|
||||||
|
websiteFieldService.save(field);
|
||||||
|
field.setName("qrcode");
|
||||||
|
field.setValue("");
|
||||||
|
field.setComments("公众号二维码");
|
||||||
|
websiteFieldService.save(field);
|
||||||
|
field.setName("bottomBg");
|
||||||
|
field.setValue("https://oss.wsdns.cn/20240717/13165035c35e4f25a6c9fbd3636c6292.png");
|
||||||
|
field.setComments("网站底部背景图");
|
||||||
|
websiteFieldService.save(field);
|
||||||
|
field.setName("address");
|
||||||
|
field.setValue(company.getAddress());
|
||||||
|
field.setComments("办公地址");
|
||||||
|
websiteFieldService.save(field);
|
||||||
|
field.setName("tel");
|
||||||
|
field.setValue(company.getTel());
|
||||||
|
field.setComments("公司电话");
|
||||||
|
websiteFieldService.save(field);
|
||||||
|
field.setName("domain");
|
||||||
|
field.setValue(company.getDomain());
|
||||||
|
field.setComments("网站域名");
|
||||||
|
websiteFieldService.save(field);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("获取服务器时间")
|
||||||
|
@GetMapping("/getServerTime")
|
||||||
|
public ApiResult<?> getServerTime(){
|
||||||
|
// 服务器时间
|
||||||
|
final ServerTimeVO vo = new ServerTimeVO();
|
||||||
|
final int hour = DateUtil.hour(DateUtil.date(), true);
|
||||||
|
final int minute = DateUtil.minute(DateUtil.date());
|
||||||
|
vo.setDate(DateUtil.date());
|
||||||
|
vo.setToday(DateUtil.today());
|
||||||
|
vo.setHour(hour);
|
||||||
|
vo.setMinute(minute);
|
||||||
|
vo.setHourMinute(String.format("%02d", hour).concat(String.format("%02d", minute)));
|
||||||
|
final int compare = Integer.compare(Integer.valueOf(vo.getHourMinute()), 900);
|
||||||
|
vo.setIsAfter(compare);
|
||||||
|
|
||||||
|
final User loginUser = getLoginUser();
|
||||||
|
if (loginUser != null) {
|
||||||
|
if (orderService.count(new LambdaQueryWrapper<Order>().eq(Order::getPayStatus,0)) > 0) {
|
||||||
|
vo.setHasNoPayOrder(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return success(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("获取未来一周的日期")
|
||||||
|
@GetMapping("/getNext7day")
|
||||||
|
public ApiResult<?> getNext7day(){
|
||||||
|
List<Next7dayVO> dateList = new ArrayList<>();
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
SimpleDateFormat sdf2 = new SimpleDateFormat("MM-dd");
|
||||||
|
for (int i = 0; i < 7; i++) {
|
||||||
|
Date date = DateUtils.addDays(new Date(), +i);
|
||||||
|
String formatDate = sdf.format(date);
|
||||||
|
String dateTime = sdf2.format(date);
|
||||||
|
final Next7dayVO vo = new Next7dayVO();
|
||||||
|
vo.setDate(dateTime);
|
||||||
|
vo.setDateTime(formatDate);
|
||||||
|
final DateTime parse = DateUtil.parse(formatDate);
|
||||||
|
int dayOfWeek = DateUtil.dayOfWeek(parse);
|
||||||
|
vo.setWeek(dayOfWeek - 1);
|
||||||
|
dateList.add(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
return success(dateList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('cms:website:remove')")
|
||||||
|
@ApiOperation("清除缓存")
|
||||||
|
@DeleteMapping("/clearSiteInfo/{key}")
|
||||||
|
public ApiResult<?> clearSiteInfo(@PathVariable("key") String key) {
|
||||||
|
final String siteInfo = redisUtil.get(key);
|
||||||
|
if(StrUtil.isNotBlank(siteInfo)){
|
||||||
|
// 清除指定key
|
||||||
|
redisUtil.delete(key);
|
||||||
|
// 清除小程序缓存
|
||||||
|
redisUtil.delete("MpInfo:".concat(getTenantId().toString()));
|
||||||
|
// 选择支付方式
|
||||||
|
redisUtil.delete("SelectPayment:".concat(getTenantId().toString()));
|
||||||
|
return success("清除成功");
|
||||||
|
}
|
||||||
|
return success("清除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("分页查询网站信息记录表")
|
||||||
|
@GetMapping("/page")
|
||||||
|
public ApiResult<PageResult<Website>> page(WebsiteParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(websiteService.pageRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('cms:website:list')")
|
||||||
|
@ApiOperation("查询全部网站信息记录表")
|
||||||
|
@GetMapping()
|
||||||
|
public ApiResult<List<Website>> list(WebsiteParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(websiteService.listRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("根据id查询网站信息记录表")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public ApiResult<Website> get(@PathVariable("id") Integer id) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(websiteService.getByIdRel(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('cms:website:save')")
|
||||||
|
@ApiOperation("添加网站信息记录表")
|
||||||
|
@PostMapping()
|
||||||
|
public ApiResult<?> save(@RequestBody Website website) {
|
||||||
|
// 记录当前登录用户id
|
||||||
|
User loginUser = getLoginUser();
|
||||||
|
if (loginUser != null) {
|
||||||
|
website.setUserId(loginUser.getUserId());
|
||||||
|
}
|
||||||
|
if (websiteService.save(website)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('cms:website:update')")
|
||||||
|
@ApiOperation("修改网站信息记录表")
|
||||||
|
@PutMapping()
|
||||||
|
public ApiResult<?> update(@RequestBody Website website) {
|
||||||
|
if (websiteService.updateById(website)) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('cms:website:remove')")
|
||||||
|
@ApiOperation("删除网站信息记录表")
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||||
|
if (websiteService.removeById(id)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('cms:website:save')")
|
||||||
|
@ApiOperation("批量添加网站信息记录表")
|
||||||
|
@PostMapping("/batch")
|
||||||
|
public ApiResult<?> saveBatch(@RequestBody List<Website> list) {
|
||||||
|
if (websiteService.saveBatch(list)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('cms:website:update')")
|
||||||
|
@ApiOperation("批量修改网站信息记录表")
|
||||||
|
@PutMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<Website> batchParam) {
|
||||||
|
if (batchParam.update(websiteService, "website_id")) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('cms:website:remove')")
|
||||||
|
@ApiOperation("批量删除网站信息记录表")
|
||||||
|
@DeleteMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||||
|
if (websiteService.removeByIds(ids)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,131 @@
|
|||||||
|
package com.gxwebsoft.shop.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.gxwebsoft.common.core.web.BaseController;
|
||||||
|
import com.gxwebsoft.shop.entity.DealerUser;
|
||||||
|
import com.gxwebsoft.shop.service.DealerApplyService;
|
||||||
|
import com.gxwebsoft.shop.entity.DealerApply;
|
||||||
|
import com.gxwebsoft.shop.param.DealerApplyParam;
|
||||||
|
import com.gxwebsoft.common.core.web.ApiResult;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
|
import com.gxwebsoft.common.core.web.BatchParam;
|
||||||
|
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||||
|
import com.gxwebsoft.common.system.entity.User;
|
||||||
|
import com.gxwebsoft.shop.service.DealerUserService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商申请记录表控制器
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
@Api(tags = "分销商申请记录表管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/shop/dealer-apply")
|
||||||
|
public class DealerApplyController extends BaseController {
|
||||||
|
@Resource
|
||||||
|
private DealerApplyService dealerApplyService;
|
||||||
|
@Resource
|
||||||
|
private DealerUserService dealerUserService;
|
||||||
|
|
||||||
|
@ApiOperation("分页查询分销商申请记录表")
|
||||||
|
@GetMapping("/page")
|
||||||
|
public ApiResult<PageResult<DealerApply>> page(DealerApplyParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(dealerApplyService.pageRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询全部分销商申请记录表")
|
||||||
|
@GetMapping()
|
||||||
|
public ApiResult<List<DealerApply>> list(DealerApplyParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(dealerApplyService.listRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("根据id查询分销商申请记录表")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public ApiResult<DealerApply> get(@PathVariable("id") Integer id) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(dealerApplyService.getByIdRel(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("添加分销商申请记录表")
|
||||||
|
@PostMapping()
|
||||||
|
public ApiResult<?> save(@RequestBody DealerApply dealerApply) {
|
||||||
|
final Integer refereeId = dealerApply.getRefereeId();
|
||||||
|
final DealerUser dealerUser = new DealerUser();
|
||||||
|
// 记录当前登录用户id
|
||||||
|
User loginUser = getLoginUser();
|
||||||
|
if (loginUser != null) {
|
||||||
|
dealerApply.setUserId(loginUser.getUserId());
|
||||||
|
dealerUser.setUserId(loginUser.getUserId());
|
||||||
|
dealerUser.setMobile(loginUser.getPhone());
|
||||||
|
dealerUser.setTenantId(loginUser.getTenantId());
|
||||||
|
}
|
||||||
|
if (dealerUserService.count(new LambdaQueryWrapper<DealerUser>().eq(DealerUser::getUserId,refereeId)) == 0) {
|
||||||
|
return fail("邀请人ID不存在");
|
||||||
|
}
|
||||||
|
if (dealerApplyService.save(dealerApply)) {
|
||||||
|
dealerUser.setRealName(dealerApply.getRealName());
|
||||||
|
dealerUser.setRefereeId(dealerApply.getRefereeId());
|
||||||
|
System.out.println("dealerUser = " + dealerUser);
|
||||||
|
dealerUserService.save(dealerUser);
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("修改分销商申请记录表")
|
||||||
|
@PutMapping()
|
||||||
|
public ApiResult<?> update(@RequestBody DealerApply dealerApply) {
|
||||||
|
if (dealerApplyService.updateById(dealerApply)) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("删除分销商申请记录表")
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||||
|
if (dealerApplyService.removeById(id)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量添加分销商申请记录表")
|
||||||
|
@PostMapping("/batch")
|
||||||
|
public ApiResult<?> saveBatch(@RequestBody List<DealerApply> list) {
|
||||||
|
if (dealerApplyService.saveBatch(list)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量修改分销商申请记录表")
|
||||||
|
@PutMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<DealerApply> batchParam) {
|
||||||
|
if (batchParam.update(dealerApplyService, "apply_id")) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量删除分销商申请记录表")
|
||||||
|
@DeleteMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||||
|
if (dealerApplyService.removeByIds(ids)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,115 @@
|
|||||||
|
package com.gxwebsoft.shop.controller;
|
||||||
|
|
||||||
|
import com.gxwebsoft.common.core.web.BaseController;
|
||||||
|
import com.gxwebsoft.shop.service.DealerCapitalService;
|
||||||
|
import com.gxwebsoft.shop.entity.DealerCapital;
|
||||||
|
import com.gxwebsoft.shop.param.DealerCapitalParam;
|
||||||
|
import com.gxwebsoft.common.core.web.ApiResult;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
|
import com.gxwebsoft.common.core.web.BatchParam;
|
||||||
|
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||||
|
import com.gxwebsoft.common.system.entity.User;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商资金明细表控制器
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
@Api(tags = "分销商资金明细表管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/shop/dealer-capital")
|
||||||
|
public class DealerCapitalController extends BaseController {
|
||||||
|
@Resource
|
||||||
|
private DealerCapitalService dealerCapitalService;
|
||||||
|
|
||||||
|
@ApiOperation("分页查询分销商资金明细表")
|
||||||
|
@GetMapping("/page")
|
||||||
|
public ApiResult<PageResult<DealerCapital>> page(DealerCapitalParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(dealerCapitalService.pageRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询全部分销商资金明细表")
|
||||||
|
@GetMapping()
|
||||||
|
public ApiResult<List<DealerCapital>> list(DealerCapitalParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(dealerCapitalService.listRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:dealerCapital:list')")
|
||||||
|
@ApiOperation("根据id查询分销商资金明细表")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public ApiResult<DealerCapital> get(@PathVariable("id") Integer id) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(dealerCapitalService.getByIdRel(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("添加分销商资金明细表")
|
||||||
|
@PostMapping()
|
||||||
|
public ApiResult<?> save(@RequestBody DealerCapital dealerCapital) {
|
||||||
|
// 记录当前登录用户id
|
||||||
|
User loginUser = getLoginUser();
|
||||||
|
if (loginUser != null) {
|
||||||
|
dealerCapital.setUserId(loginUser.getUserId());
|
||||||
|
}
|
||||||
|
if (dealerCapitalService.save(dealerCapital)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("修改分销商资金明细表")
|
||||||
|
@PutMapping()
|
||||||
|
public ApiResult<?> update(@RequestBody DealerCapital dealerCapital) {
|
||||||
|
if (dealerCapitalService.updateById(dealerCapital)) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("删除分销商资金明细表")
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||||
|
if (dealerCapitalService.removeById(id)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量添加分销商资金明细表")
|
||||||
|
@PostMapping("/batch")
|
||||||
|
public ApiResult<?> saveBatch(@RequestBody List<DealerCapital> list) {
|
||||||
|
if (dealerCapitalService.saveBatch(list)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量修改分销商资金明细表")
|
||||||
|
@PutMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<DealerCapital> batchParam) {
|
||||||
|
if (batchParam.update(dealerCapitalService, "id")) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量删除分销商资金明细表")
|
||||||
|
@DeleteMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||||
|
if (dealerCapitalService.removeByIds(ids)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,115 @@
|
|||||||
|
package com.gxwebsoft.shop.controller;
|
||||||
|
|
||||||
|
import com.gxwebsoft.common.core.web.BaseController;
|
||||||
|
import com.gxwebsoft.shop.service.DealerOrderService;
|
||||||
|
import com.gxwebsoft.shop.entity.DealerOrder;
|
||||||
|
import com.gxwebsoft.shop.param.DealerOrderParam;
|
||||||
|
import com.gxwebsoft.common.core.web.ApiResult;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
|
import com.gxwebsoft.common.core.web.BatchParam;
|
||||||
|
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||||
|
import com.gxwebsoft.common.system.entity.User;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商订单记录表控制器
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
@Api(tags = "分销商订单记录表管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/shop/dealer-order")
|
||||||
|
public class DealerOrderController extends BaseController {
|
||||||
|
@Resource
|
||||||
|
private DealerOrderService dealerOrderService;
|
||||||
|
|
||||||
|
@ApiOperation("分页查询分销商订单记录表")
|
||||||
|
@GetMapping("/page")
|
||||||
|
public ApiResult<PageResult<DealerOrder>> page(DealerOrderParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(dealerOrderService.pageRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询全部分销商订单记录表")
|
||||||
|
@GetMapping()
|
||||||
|
public ApiResult<List<DealerOrder>> list(DealerOrderParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(dealerOrderService.listRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:dealerOrder:list')")
|
||||||
|
@ApiOperation("根据id查询分销商订单记录表")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public ApiResult<DealerOrder> get(@PathVariable("id") Integer id) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(dealerOrderService.getByIdRel(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("添加分销商订单记录表")
|
||||||
|
@PostMapping()
|
||||||
|
public ApiResult<?> save(@RequestBody DealerOrder dealerOrder) {
|
||||||
|
// 记录当前登录用户id
|
||||||
|
User loginUser = getLoginUser();
|
||||||
|
if (loginUser != null) {
|
||||||
|
dealerOrder.setUserId(loginUser.getUserId());
|
||||||
|
}
|
||||||
|
if (dealerOrderService.save(dealerOrder)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("修改分销商订单记录表")
|
||||||
|
@PutMapping()
|
||||||
|
public ApiResult<?> update(@RequestBody DealerOrder dealerOrder) {
|
||||||
|
if (dealerOrderService.updateById(dealerOrder)) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("删除分销商订单记录表")
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||||
|
if (dealerOrderService.removeById(id)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量添加分销商订单记录表")
|
||||||
|
@PostMapping("/batch")
|
||||||
|
public ApiResult<?> saveBatch(@RequestBody List<DealerOrder> list) {
|
||||||
|
if (dealerOrderService.saveBatch(list)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量修改分销商订单记录表")
|
||||||
|
@PutMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<DealerOrder> batchParam) {
|
||||||
|
if (batchParam.update(dealerOrderService, "id")) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量删除分销商订单记录表")
|
||||||
|
@DeleteMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||||
|
if (dealerOrderService.removeByIds(ids)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,115 @@
|
|||||||
|
package com.gxwebsoft.shop.controller;
|
||||||
|
|
||||||
|
import com.gxwebsoft.common.core.web.BaseController;
|
||||||
|
import com.gxwebsoft.shop.service.DealerRefereeService;
|
||||||
|
import com.gxwebsoft.shop.entity.DealerReferee;
|
||||||
|
import com.gxwebsoft.shop.param.DealerRefereeParam;
|
||||||
|
import com.gxwebsoft.common.core.web.ApiResult;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
|
import com.gxwebsoft.common.core.web.BatchParam;
|
||||||
|
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||||
|
import com.gxwebsoft.common.system.entity.User;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商推荐关系表控制器
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
@Api(tags = "分销商推荐关系表管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/shop/dealer-referee")
|
||||||
|
public class DealerRefereeController extends BaseController {
|
||||||
|
@Resource
|
||||||
|
private DealerRefereeService dealerRefereeService;
|
||||||
|
|
||||||
|
@ApiOperation("分页查询分销商推荐关系表")
|
||||||
|
@GetMapping("/page")
|
||||||
|
public ApiResult<PageResult<DealerReferee>> page(DealerRefereeParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(dealerRefereeService.pageRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询全部分销商推荐关系表")
|
||||||
|
@GetMapping()
|
||||||
|
public ApiResult<List<DealerReferee>> list(DealerRefereeParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(dealerRefereeService.listRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:dealerReferee:list')")
|
||||||
|
@ApiOperation("根据id查询分销商推荐关系表")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public ApiResult<DealerReferee> get(@PathVariable("id") Integer id) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(dealerRefereeService.getByIdRel(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("添加分销商推荐关系表")
|
||||||
|
@PostMapping()
|
||||||
|
public ApiResult<?> save(@RequestBody DealerReferee dealerReferee) {
|
||||||
|
// 记录当前登录用户id
|
||||||
|
User loginUser = getLoginUser();
|
||||||
|
if (loginUser != null) {
|
||||||
|
dealerReferee.setUserId(loginUser.getUserId());
|
||||||
|
}
|
||||||
|
if (dealerRefereeService.save(dealerReferee)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("修改分销商推荐关系表")
|
||||||
|
@PutMapping()
|
||||||
|
public ApiResult<?> update(@RequestBody DealerReferee dealerReferee) {
|
||||||
|
if (dealerRefereeService.updateById(dealerReferee)) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("删除分销商推荐关系表")
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||||
|
if (dealerRefereeService.removeById(id)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量添加分销商推荐关系表")
|
||||||
|
@PostMapping("/batch")
|
||||||
|
public ApiResult<?> saveBatch(@RequestBody List<DealerReferee> list) {
|
||||||
|
if (dealerRefereeService.saveBatch(list)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量修改分销商推荐关系表")
|
||||||
|
@PutMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<DealerReferee> batchParam) {
|
||||||
|
if (batchParam.update(dealerRefereeService, "id")) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量删除分销商推荐关系表")
|
||||||
|
@DeleteMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||||
|
if (dealerRefereeService.removeByIds(ids)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,110 @@
|
|||||||
|
package com.gxwebsoft.shop.controller;
|
||||||
|
|
||||||
|
import com.gxwebsoft.common.core.web.BaseController;
|
||||||
|
import com.gxwebsoft.shop.service.DealerSettingService;
|
||||||
|
import com.gxwebsoft.shop.entity.DealerSetting;
|
||||||
|
import com.gxwebsoft.shop.param.DealerSettingParam;
|
||||||
|
import com.gxwebsoft.common.core.web.ApiResult;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
|
import com.gxwebsoft.common.core.web.BatchParam;
|
||||||
|
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||||
|
import com.gxwebsoft.common.system.entity.User;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商设置表控制器
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
@Api(tags = "分销商设置表管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/shop/dealer-setting")
|
||||||
|
public class DealerSettingController extends BaseController {
|
||||||
|
@Resource
|
||||||
|
private DealerSettingService dealerSettingService;
|
||||||
|
|
||||||
|
@ApiOperation("分页查询分销商设置表")
|
||||||
|
@GetMapping("/page")
|
||||||
|
public ApiResult<PageResult<DealerSetting>> page(DealerSettingParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(dealerSettingService.pageRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询全部分销商设置表")
|
||||||
|
@GetMapping()
|
||||||
|
public ApiResult<List<DealerSetting>> list(DealerSettingParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(dealerSettingService.listRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:dealerSetting:list')")
|
||||||
|
@ApiOperation("根据id查询分销商设置表")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public ApiResult<DealerSetting> get(@PathVariable("id") String id) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(dealerSettingService.getByIdRel(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("添加分销商设置表")
|
||||||
|
@PostMapping()
|
||||||
|
public ApiResult<?> save(@RequestBody DealerSetting dealerSetting) {
|
||||||
|
if (dealerSettingService.save(dealerSetting)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("修改分销商设置表")
|
||||||
|
@PutMapping()
|
||||||
|
public ApiResult<?> update(@RequestBody DealerSetting dealerSetting) {
|
||||||
|
if (dealerSettingService.updateById(dealerSetting)) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("删除分销商设置表")
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||||
|
if (dealerSettingService.removeById(id)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量添加分销商设置表")
|
||||||
|
@PostMapping("/batch")
|
||||||
|
public ApiResult<?> saveBatch(@RequestBody List<DealerSetting> list) {
|
||||||
|
if (dealerSettingService.saveBatch(list)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量修改分销商设置表")
|
||||||
|
@PutMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<DealerSetting> batchParam) {
|
||||||
|
if (batchParam.update(dealerSettingService, "key")) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量删除分销商设置表")
|
||||||
|
@DeleteMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||||
|
if (dealerSettingService.removeByIds(ids)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
package com.gxwebsoft.shop.controller;
|
||||||
|
|
||||||
|
import com.gxwebsoft.common.core.web.BaseController;
|
||||||
|
import com.gxwebsoft.shop.service.DealerUserService;
|
||||||
|
import com.gxwebsoft.shop.entity.DealerUser;
|
||||||
|
import com.gxwebsoft.shop.param.DealerUserParam;
|
||||||
|
import com.gxwebsoft.common.core.web.ApiResult;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
|
import com.gxwebsoft.common.core.web.BatchParam;
|
||||||
|
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||||
|
import com.gxwebsoft.common.system.entity.User;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商用户记录表控制器
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
@Api(tags = "分销商用户记录表管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/shop/dealer-user")
|
||||||
|
public class DealerUserController extends BaseController {
|
||||||
|
@Resource
|
||||||
|
private DealerUserService dealerUserService;
|
||||||
|
|
||||||
|
@ApiOperation("分页查询分销商用户记录表")
|
||||||
|
@GetMapping("/page")
|
||||||
|
public ApiResult<PageResult<DealerUser>> page(DealerUserParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(dealerUserService.pageRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询全部分销商用户记录表")
|
||||||
|
@GetMapping()
|
||||||
|
public ApiResult<List<DealerUser>> list(DealerUserParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(dealerUserService.listRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("根据id查询分销商用户记录表")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public ApiResult<DealerUser> get(@PathVariable("id") Integer id) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(dealerUserService.getByIdRel(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("添加分销商用户记录表")
|
||||||
|
@PostMapping()
|
||||||
|
public ApiResult<?> save(@RequestBody DealerUser dealerUser) {
|
||||||
|
// 记录当前登录用户id
|
||||||
|
User loginUser = getLoginUser();
|
||||||
|
if (loginUser != null) {
|
||||||
|
dealerUser.setUserId(loginUser.getUserId());
|
||||||
|
}
|
||||||
|
if (dealerUserService.save(dealerUser)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("修改分销商用户记录表")
|
||||||
|
@PutMapping()
|
||||||
|
public ApiResult<?> update(@RequestBody DealerUser dealerUser) {
|
||||||
|
if (dealerUserService.updateById(dealerUser)) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("删除分销商用户记录表")
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||||
|
if (dealerUserService.removeById(id)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量添加分销商用户记录表")
|
||||||
|
@PostMapping("/batch")
|
||||||
|
public ApiResult<?> saveBatch(@RequestBody List<DealerUser> list) {
|
||||||
|
if (dealerUserService.saveBatch(list)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量修改分销商用户记录表")
|
||||||
|
@PutMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<DealerUser> batchParam) {
|
||||||
|
if (batchParam.update(dealerUserService, "user_id")) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量删除分销商用户记录表")
|
||||||
|
@DeleteMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||||
|
if (dealerUserService.removeByIds(ids)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,115 @@
|
|||||||
|
package com.gxwebsoft.shop.controller;
|
||||||
|
|
||||||
|
import com.gxwebsoft.common.core.web.BaseController;
|
||||||
|
import com.gxwebsoft.shop.service.DealerWithdrawService;
|
||||||
|
import com.gxwebsoft.shop.entity.DealerWithdraw;
|
||||||
|
import com.gxwebsoft.shop.param.DealerWithdrawParam;
|
||||||
|
import com.gxwebsoft.common.core.web.ApiResult;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
|
import com.gxwebsoft.common.core.web.BatchParam;
|
||||||
|
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||||
|
import com.gxwebsoft.common.system.entity.User;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商提现明细表控制器
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
@Api(tags = "分销商提现明细表管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/shop/dealer-withdraw")
|
||||||
|
public class DealerWithdrawController extends BaseController {
|
||||||
|
@Resource
|
||||||
|
private DealerWithdrawService dealerWithdrawService;
|
||||||
|
|
||||||
|
@ApiOperation("分页查询分销商提现明细表")
|
||||||
|
@GetMapping("/page")
|
||||||
|
public ApiResult<PageResult<DealerWithdraw>> page(DealerWithdrawParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(dealerWithdrawService.pageRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询全部分销商提现明细表")
|
||||||
|
@GetMapping()
|
||||||
|
public ApiResult<List<DealerWithdraw>> list(DealerWithdrawParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(dealerWithdrawService.listRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:dealerWithdraw:list')")
|
||||||
|
@ApiOperation("根据id查询分销商提现明细表")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public ApiResult<DealerWithdraw> get(@PathVariable("id") Integer id) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(dealerWithdrawService.getByIdRel(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("添加分销商提现明细表")
|
||||||
|
@PostMapping()
|
||||||
|
public ApiResult<?> save(@RequestBody DealerWithdraw dealerWithdraw) {
|
||||||
|
// 记录当前登录用户id
|
||||||
|
User loginUser = getLoginUser();
|
||||||
|
if (loginUser != null) {
|
||||||
|
dealerWithdraw.setUserId(loginUser.getUserId());
|
||||||
|
}
|
||||||
|
if (dealerWithdrawService.save(dealerWithdraw)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("修改分销商提现明细表")
|
||||||
|
@PutMapping()
|
||||||
|
public ApiResult<?> update(@RequestBody DealerWithdraw dealerWithdraw) {
|
||||||
|
if (dealerWithdrawService.updateById(dealerWithdraw)) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("删除分销商提现明细表")
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||||
|
if (dealerWithdrawService.removeById(id)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量添加分销商提现明细表")
|
||||||
|
@PostMapping("/batch")
|
||||||
|
public ApiResult<?> saveBatch(@RequestBody List<DealerWithdraw> list) {
|
||||||
|
if (dealerWithdrawService.saveBatch(list)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量修改分销商提现明细表")
|
||||||
|
@PutMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<DealerWithdraw> batchParam) {
|
||||||
|
if (batchParam.update(dealerWithdrawService, "id")) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量删除分销商提现明细表")
|
||||||
|
@DeleteMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||||
|
if (dealerWithdrawService.removeByIds(ids)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@ package com.gxwebsoft.shop.controller;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||||
|
import com.gxwebsoft.common.core.utils.JSONUtil;
|
||||||
import com.gxwebsoft.common.core.web.ApiResult;
|
import com.gxwebsoft.common.core.web.ApiResult;
|
||||||
import com.gxwebsoft.common.core.web.BaseController;
|
import com.gxwebsoft.common.core.web.BaseController;
|
||||||
import com.gxwebsoft.common.core.web.BatchParam;
|
import com.gxwebsoft.common.core.web.BatchParam;
|
||||||
@@ -51,14 +52,17 @@ public class GoodsCategoryController extends BaseController {
|
|||||||
if (categoryIds.isEmpty()) {
|
if (categoryIds.isEmpty()) {
|
||||||
return success(list);
|
return success(list);
|
||||||
}
|
}
|
||||||
|
// System.out.println("param.getType() = " + param.getType());
|
||||||
|
// final List<Goods> goods = goodsService.getGoodsSpecType0();
|
||||||
|
// System.out.println("goodsBySpec = " + goods);
|
||||||
|
|
||||||
final List<Goods> goods = goodsService.getGoodsSpec();
|
final List<Goods> goods = goodsService.list(new LambdaQueryWrapper<Goods>().in(Goods::getCategoryId, categoryIds).eq(Goods::getIsShow,1).eq(Goods::getDeleted,0));
|
||||||
System.out.println("goodsBySpec = " + goods);
|
|
||||||
|
|
||||||
// final List<Goods> goods = goodsService.list(new LambdaQueryWrapper<Goods>().in(Goods::getCategoryId, categoryIds).eq(Goods::getStatus,0).eq(Goods::getDeleted,0));
|
|
||||||
final Map<Integer, List<Goods>> collectGoods = goods.stream().collect(Collectors.groupingBy(Goods::getCategoryId));
|
final Map<Integer, List<Goods>> collectGoods = goods.stream().collect(Collectors.groupingBy(Goods::getCategoryId));
|
||||||
|
|
||||||
final List<GoodsSpec> specs = goodsSpecService.list(new LambdaQueryWrapper<GoodsSpec>().in(GoodsSpec::getGoodsId, categoryIds));
|
final Set<Integer> goodsIds = goods.stream().map(Goods::getGoodsId).collect(Collectors.toSet());
|
||||||
|
System.out.println("goodsIds = " + goodsIds);
|
||||||
|
|
||||||
|
final List<GoodsSpec> specs = goodsSpecService.list(new LambdaQueryWrapper<GoodsSpec>().in(GoodsSpec::getGoodsId, goodsIds));
|
||||||
System.out.println("specs = " + specs);
|
System.out.println("specs = " + specs);
|
||||||
final Map<Integer, List<GoodsSpec>> collectGoodsSpec = specs.stream().collect(Collectors.groupingBy(GoodsSpec::getGoodsId));
|
final Map<Integer, List<GoodsSpec>> collectGoodsSpec = specs.stream().collect(Collectors.groupingBy(GoodsSpec::getGoodsId));
|
||||||
|
|
||||||
@@ -66,16 +70,16 @@ public class GoodsCategoryController extends BaseController {
|
|||||||
d.setName(d.getTitle());
|
d.setName(d.getTitle());
|
||||||
final List<Goods> goodsList = collectGoods.get(d.getCategoryId());
|
final List<Goods> goodsList = collectGoods.get(d.getCategoryId());
|
||||||
if (!CollectionUtils.isEmpty(goodsList)) {
|
if (!CollectionUtils.isEmpty(goodsList)) {
|
||||||
// goodsList.forEach(v -> {
|
goodsList.forEach(v -> {
|
||||||
// System.out.println("v = " + v);
|
System.out.println("v = " + v.getSpecValue());
|
||||||
// final String specValue = v.getSpecValue();
|
final String specValue = v.getSpecValue();
|
||||||
// System.out.println("collectGoodsSpec = " + collectGoodsSpec);
|
final List<GoodsSpec> goodsSpecs = collectGoodsSpec.get(v.getGoodsId());
|
||||||
// final List<GoodsSpec> goodsSpecs = collectGoodsSpec.get(v.getGoodsId());
|
if (!CollectionUtils.isEmpty(goodsSpecs)) {
|
||||||
// if (!CollectionUtils.isEmpty(goodsSpecs)) {
|
final GoodsSpec spec = goodsSpecs.get(0);
|
||||||
// final GoodsSpec spec = goodsSpecs.get(0);
|
v.setSpecValue(spec.getSpecValue());
|
||||||
// v.setGoodsSpecValue(spec.getSpecValue());
|
v.setGoodsSpecValue(JSONUtil.parseObject(spec.getSpecValue(),Object.class));
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
d.setChildrens(collectGoods.get(d.getCategoryId()));
|
d.setChildrens(collectGoods.get(d.getCategoryId()));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -47,20 +47,27 @@ public class GoodsController extends BaseController {
|
|||||||
|
|
||||||
@ApiOperation("统计信息")
|
@ApiOperation("统计信息")
|
||||||
@GetMapping("/data")
|
@GetMapping("/data")
|
||||||
public ApiResult<Map<String, Integer>> data() {
|
public ApiResult<Map<String, Integer>> data(GoodsParam param) {
|
||||||
Map<String, Integer> data = new HashMap<>();
|
Map<String, Integer> data = new HashMap<>();
|
||||||
Integer totalNum = goodsService.count(
|
final LambdaQueryWrapper<Goods> wrapper = new LambdaQueryWrapper<>();
|
||||||
new LambdaQueryWrapper<Goods>().eq(Goods::getIsShow,1).gt(Goods::getStock,0)
|
|
||||||
);
|
|
||||||
Integer totalNum2 = goodsService.count(
|
|
||||||
new LambdaQueryWrapper<Goods>().eq(Goods::getIsShow,0)
|
|
||||||
);
|
|
||||||
Integer totalNum3 = goodsService.count(
|
|
||||||
new LambdaQueryWrapper<Goods>().eq(Goods::getStock,0)
|
|
||||||
);
|
|
||||||
|
|
||||||
|
if (param.getMerchantId() != null) {
|
||||||
|
wrapper.eq(Goods::getMerchantId,param.getMerchantId());
|
||||||
|
}
|
||||||
|
|
||||||
|
Integer totalNum = goodsService.count(
|
||||||
|
wrapper.eq(Goods::getIsShow,1).gt(Goods::getStock,0)
|
||||||
|
);
|
||||||
data.put("totalNum", totalNum);
|
data.put("totalNum", totalNum);
|
||||||
|
|
||||||
|
Integer totalNum2 = goodsService.count(
|
||||||
|
wrapper.eq(Goods::getIsShow,0)
|
||||||
|
);
|
||||||
data.put("totalNum2", totalNum2);
|
data.put("totalNum2", totalNum2);
|
||||||
|
|
||||||
|
Integer totalNum3 = goodsService.count(
|
||||||
|
wrapper.eq(Goods::getStock,0)
|
||||||
|
);
|
||||||
data.put("totalNum3", totalNum3);
|
data.put("totalNum3", totalNum3);
|
||||||
|
|
||||||
// 下架已售罄的商品
|
// 下架已售罄的商品
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
package com.gxwebsoft.shop.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商申请记录表
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value = "DealerApply对象", description = "分销商申请记录表")
|
||||||
|
@TableName("shop_dealer_apply")
|
||||||
|
public class DealerApply implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "主键ID")
|
||||||
|
@TableId(value = "apply_id", type = IdType.AUTO)
|
||||||
|
private Integer applyId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户ID")
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "姓名")
|
||||||
|
private String realName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "手机号")
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "推荐人用户ID")
|
||||||
|
private Integer refereeId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "申请方式(10需后台审核 20无需审核)")
|
||||||
|
private Integer applyType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "申请时间")
|
||||||
|
private Integer applyTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审核状态 (10待审核 20审核通过 30驳回)")
|
||||||
|
private Integer applyStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审核时间")
|
||||||
|
private Integer auditTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "驳回原因")
|
||||||
|
private String rejectReason;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "商城ID")
|
||||||
|
private Integer tenantId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
package com.gxwebsoft.shop.entity;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商资金明细表
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value = "DealerCapital对象", description = "分销商资金明细表")
|
||||||
|
@TableName("shop_dealer_capital")
|
||||||
|
public class DealerCapital implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "主键ID")
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分销商用户ID")
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "订单ID")
|
||||||
|
private Integer orderId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "资金流动类型 (10佣金收入 20提现支出 30转账支出 40转账收入)")
|
||||||
|
private Integer flowType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "金额")
|
||||||
|
private BigDecimal money;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "描述")
|
||||||
|
private String describe;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "对方用户ID")
|
||||||
|
private Integer toUserId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "商城ID")
|
||||||
|
private Integer tenantId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
package com.gxwebsoft.shop.entity;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商订单记录表
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value = "DealerOrder对象", description = "分销商订单记录表")
|
||||||
|
@TableName("shop_dealer_order")
|
||||||
|
public class DealerOrder implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "主键ID")
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "买家用户ID")
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "订单ID")
|
||||||
|
private Integer orderId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "订单总金额(不含运费)")
|
||||||
|
private BigDecimal orderPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分销商用户id(一级)")
|
||||||
|
private Integer firstUserId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分销商用户id(二级)")
|
||||||
|
private Integer secondUserId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分销商用户id(三级)")
|
||||||
|
private Integer thirdUserId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分销佣金(一级)")
|
||||||
|
private BigDecimal firstMoney;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分销佣金(二级)")
|
||||||
|
private BigDecimal secondMoney;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分销佣金(三级)")
|
||||||
|
private BigDecimal thirdMoney;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "订单是否失效(0未失效 1已失效)")
|
||||||
|
private Integer isInvalid;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "佣金结算(0未结算 1已结算)")
|
||||||
|
private Integer isSettled;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "结算时间")
|
||||||
|
private Integer settleTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "商城ID")
|
||||||
|
private Integer tenantId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package com.gxwebsoft.shop.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商推荐关系表
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value = "DealerReferee对象", description = "分销商推荐关系表")
|
||||||
|
@TableName("shop_dealer_referee")
|
||||||
|
public class DealerReferee implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "主键ID")
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分销商用户ID")
|
||||||
|
private Integer dealerId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户id(被推荐人)")
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "推荐关系层级(1,2,3)")
|
||||||
|
private Integer level;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "商城ID")
|
||||||
|
private Integer tenantId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
package com.gxwebsoft.shop.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商设置表
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value = "DealerSetting对象", description = "分销商设置表")
|
||||||
|
@TableName("shop_dealer_setting")
|
||||||
|
public class DealerSetting implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "设置项标示")
|
||||||
|
@TableId(value = "key", type = IdType.AUTO)
|
||||||
|
private String key;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "设置项描述")
|
||||||
|
private String describe;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "设置内容(json格式)")
|
||||||
|
private String values;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "商城ID")
|
||||||
|
private Integer tenantId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "更新时间")
|
||||||
|
private Integer updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
package com.gxwebsoft.shop.entity;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.DesensitizedUtil;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商用户记录表
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value = "DealerUser对象", description = "分销商用户记录表")
|
||||||
|
@TableName("shop_dealer_user")
|
||||||
|
public class DealerUser implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分销商用户ID")
|
||||||
|
@TableId(value = "user_id", type = IdType.AUTO)
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "姓名")
|
||||||
|
private String realName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "手机号")
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "支付密码")
|
||||||
|
private String payPassword;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "当前可提现佣金")
|
||||||
|
private BigDecimal money;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "已冻结佣金")
|
||||||
|
private BigDecimal freezeMoney;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "累积提现佣金")
|
||||||
|
private BigDecimal totalMoney;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "推荐人用户ID")
|
||||||
|
private Integer refereeId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "成员数量(一级)")
|
||||||
|
private Integer firstNum;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "成员数量(二级)")
|
||||||
|
private Integer secondNum;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "成员数量(三级)")
|
||||||
|
private Integer thirdNum;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否删除")
|
||||||
|
private Integer isDelete;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "租户id")
|
||||||
|
private Integer tenantId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "推荐人姓名(脱敏)")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String dealerName;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
package com.gxwebsoft.shop.entity;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商提现明细表
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value = "DealerWithdraw对象", description = "分销商提现明细表")
|
||||||
|
@TableName("shop_dealer_withdraw")
|
||||||
|
public class DealerWithdraw implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "主键ID")
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分销商用户ID")
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "提现金额")
|
||||||
|
private BigDecimal money;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "打款方式 (10微信 20支付宝 30银行卡)")
|
||||||
|
private Integer payType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "支付宝姓名")
|
||||||
|
private String alipayName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "支付宝账号")
|
||||||
|
private String alipayAccount;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "开户行名称")
|
||||||
|
private String bankName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "银行开户名")
|
||||||
|
private String bankAccount;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "银行卡号")
|
||||||
|
private String bankCard;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "申请状态 (10待审核 20审核通过 30驳回 40已打款)")
|
||||||
|
private Integer applyStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审核时间")
|
||||||
|
private Integer auditTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "驳回原因")
|
||||||
|
private String rejectReason;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "来源客户端(APP、H5、小程序等)")
|
||||||
|
private String platform;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "租户id")
|
||||||
|
private Integer tenantId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.gxwebsoft.shop.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.gxwebsoft.shop.entity.DealerApply;
|
||||||
|
import com.gxwebsoft.shop.param.DealerApplyParam;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商申请记录表Mapper
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
public interface DealerApplyMapper extends BaseMapper<DealerApply> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<DealerApply>
|
||||||
|
*/
|
||||||
|
List<DealerApply> selectPageRel(@Param("page") IPage<DealerApply> page,
|
||||||
|
@Param("param") DealerApplyParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<User>
|
||||||
|
*/
|
||||||
|
List<DealerApply> selectListRel(@Param("param") DealerApplyParam param);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.gxwebsoft.shop.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.gxwebsoft.shop.entity.DealerCapital;
|
||||||
|
import com.gxwebsoft.shop.param.DealerCapitalParam;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商资金明细表Mapper
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
public interface DealerCapitalMapper extends BaseMapper<DealerCapital> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<DealerCapital>
|
||||||
|
*/
|
||||||
|
List<DealerCapital> selectPageRel(@Param("page") IPage<DealerCapital> page,
|
||||||
|
@Param("param") DealerCapitalParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<User>
|
||||||
|
*/
|
||||||
|
List<DealerCapital> selectListRel(@Param("param") DealerCapitalParam param);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.gxwebsoft.shop.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.gxwebsoft.shop.entity.DealerOrder;
|
||||||
|
import com.gxwebsoft.shop.param.DealerOrderParam;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商订单记录表Mapper
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
public interface DealerOrderMapper extends BaseMapper<DealerOrder> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<DealerOrder>
|
||||||
|
*/
|
||||||
|
List<DealerOrder> selectPageRel(@Param("page") IPage<DealerOrder> page,
|
||||||
|
@Param("param") DealerOrderParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<User>
|
||||||
|
*/
|
||||||
|
List<DealerOrder> selectListRel(@Param("param") DealerOrderParam param);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.gxwebsoft.shop.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.gxwebsoft.shop.entity.DealerReferee;
|
||||||
|
import com.gxwebsoft.shop.param.DealerRefereeParam;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商推荐关系表Mapper
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
public interface DealerRefereeMapper extends BaseMapper<DealerReferee> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<DealerReferee>
|
||||||
|
*/
|
||||||
|
List<DealerReferee> selectPageRel(@Param("page") IPage<DealerReferee> page,
|
||||||
|
@Param("param") DealerRefereeParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<User>
|
||||||
|
*/
|
||||||
|
List<DealerReferee> selectListRel(@Param("param") DealerRefereeParam param);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.gxwebsoft.shop.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.gxwebsoft.shop.entity.DealerSetting;
|
||||||
|
import com.gxwebsoft.shop.param.DealerSettingParam;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商设置表Mapper
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
public interface DealerSettingMapper extends BaseMapper<DealerSetting> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<DealerSetting>
|
||||||
|
*/
|
||||||
|
List<DealerSetting> selectPageRel(@Param("page") IPage<DealerSetting> page,
|
||||||
|
@Param("param") DealerSettingParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<User>
|
||||||
|
*/
|
||||||
|
List<DealerSetting> selectListRel(@Param("param") DealerSettingParam param);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.gxwebsoft.shop.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.gxwebsoft.shop.entity.DealerUser;
|
||||||
|
import com.gxwebsoft.shop.param.DealerUserParam;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商用户记录表Mapper
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
public interface DealerUserMapper extends BaseMapper<DealerUser> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<DealerUser>
|
||||||
|
*/
|
||||||
|
List<DealerUser> selectPageRel(@Param("page") IPage<DealerUser> page,
|
||||||
|
@Param("param") DealerUserParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<User>
|
||||||
|
*/
|
||||||
|
List<DealerUser> selectListRel(@Param("param") DealerUserParam param);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.gxwebsoft.shop.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.gxwebsoft.shop.entity.DealerWithdraw;
|
||||||
|
import com.gxwebsoft.shop.param.DealerWithdrawParam;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商提现明细表Mapper
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
public interface DealerWithdrawMapper extends BaseMapper<DealerWithdraw> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<DealerWithdraw>
|
||||||
|
*/
|
||||||
|
List<DealerWithdraw> selectPageRel(@Param("page") IPage<DealerWithdraw> page,
|
||||||
|
@Param("param") DealerWithdrawParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<User>
|
||||||
|
*/
|
||||||
|
List<DealerWithdraw> selectListRel(@Param("param") DealerWithdrawParam param);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.gxwebsoft.shop.mapper.DealerApplyMapper">
|
||||||
|
|
||||||
|
<!-- 关联查询sql -->
|
||||||
|
<sql id="selectSql">
|
||||||
|
SELECT a.*
|
||||||
|
FROM shop_dealer_apply a
|
||||||
|
<where>
|
||||||
|
<if test="param.applyId != null">
|
||||||
|
AND a.apply_id = #{param.applyId}
|
||||||
|
</if>
|
||||||
|
<if test="param.userId != null">
|
||||||
|
AND a.user_id = #{param.userId}
|
||||||
|
</if>
|
||||||
|
<if test="param.realName != null">
|
||||||
|
AND a.real_name LIKE CONCAT('%', #{param.realName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.mobile != null">
|
||||||
|
AND a.mobile LIKE CONCAT('%', #{param.mobile}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.refereeId != null">
|
||||||
|
AND a.referee_id = #{param.refereeId}
|
||||||
|
</if>
|
||||||
|
<if test="param.applyType != null">
|
||||||
|
AND a.apply_type = #{param.applyType}
|
||||||
|
</if>
|
||||||
|
<if test="param.applyTime != null">
|
||||||
|
AND a.apply_time = #{param.applyTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.applyStatus != null">
|
||||||
|
AND a.apply_status = #{param.applyStatus}
|
||||||
|
</if>
|
||||||
|
<if test="param.auditTime != null">
|
||||||
|
AND a.audit_time = #{param.auditTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.rejectReason != null">
|
||||||
|
AND a.reject_reason LIKE CONCAT('%', #{param.rejectReason}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeStart != null">
|
||||||
|
AND a.create_time >= #{param.createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeEnd != null">
|
||||||
|
AND a.create_time <= #{param.createTimeEnd}
|
||||||
|
</if>
|
||||||
|
<if test="param.keywords != null">
|
||||||
|
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 分页查询 -->
|
||||||
|
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.DealerApply">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询全部 -->
|
||||||
|
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.DealerApply">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.gxwebsoft.shop.mapper.DealerCapitalMapper">
|
||||||
|
|
||||||
|
<!-- 关联查询sql -->
|
||||||
|
<sql id="selectSql">
|
||||||
|
SELECT a.*
|
||||||
|
FROM shop_dealer_capital a
|
||||||
|
<where>
|
||||||
|
<if test="param.id != null">
|
||||||
|
AND a.id = #{param.id}
|
||||||
|
</if>
|
||||||
|
<if test="param.userId != null">
|
||||||
|
AND a.user_id = #{param.userId}
|
||||||
|
</if>
|
||||||
|
<if test="param.orderId != null">
|
||||||
|
AND a.order_id = #{param.orderId}
|
||||||
|
</if>
|
||||||
|
<if test="param.flowType != null">
|
||||||
|
AND a.flow_type = #{param.flowType}
|
||||||
|
</if>
|
||||||
|
<if test="param.money != null">
|
||||||
|
AND a.money = #{param.money}
|
||||||
|
</if>
|
||||||
|
<if test="param.describe != null">
|
||||||
|
AND a.describe LIKE CONCAT('%', #{param.describe}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.toUserId != null">
|
||||||
|
AND a.to_user_id = #{param.toUserId}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeStart != null">
|
||||||
|
AND a.create_time >= #{param.createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeEnd != null">
|
||||||
|
AND a.create_time <= #{param.createTimeEnd}
|
||||||
|
</if>
|
||||||
|
<if test="param.keywords != null">
|
||||||
|
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 分页查询 -->
|
||||||
|
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.DealerCapital">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询全部 -->
|
||||||
|
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.DealerCapital">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.gxwebsoft.shop.mapper.DealerOrderMapper">
|
||||||
|
|
||||||
|
<!-- 关联查询sql -->
|
||||||
|
<sql id="selectSql">
|
||||||
|
SELECT a.*
|
||||||
|
FROM shop_dealer_order a
|
||||||
|
<where>
|
||||||
|
<if test="param.id != null">
|
||||||
|
AND a.id = #{param.id}
|
||||||
|
</if>
|
||||||
|
<if test="param.userId != null">
|
||||||
|
AND a.user_id = #{param.userId}
|
||||||
|
</if>
|
||||||
|
<if test="param.orderId != null">
|
||||||
|
AND a.order_id = #{param.orderId}
|
||||||
|
</if>
|
||||||
|
<if test="param.orderPrice != null">
|
||||||
|
AND a.order_price = #{param.orderPrice}
|
||||||
|
</if>
|
||||||
|
<if test="param.firstUserId != null">
|
||||||
|
AND a.first_user_id = #{param.firstUserId}
|
||||||
|
</if>
|
||||||
|
<if test="param.secondUserId != null">
|
||||||
|
AND a.second_user_id = #{param.secondUserId}
|
||||||
|
</if>
|
||||||
|
<if test="param.thirdUserId != null">
|
||||||
|
AND a.third_user_id = #{param.thirdUserId}
|
||||||
|
</if>
|
||||||
|
<if test="param.firstMoney != null">
|
||||||
|
AND a.first_money = #{param.firstMoney}
|
||||||
|
</if>
|
||||||
|
<if test="param.secondMoney != null">
|
||||||
|
AND a.second_money = #{param.secondMoney}
|
||||||
|
</if>
|
||||||
|
<if test="param.thirdMoney != null">
|
||||||
|
AND a.third_money = #{param.thirdMoney}
|
||||||
|
</if>
|
||||||
|
<if test="param.isInvalid != null">
|
||||||
|
AND a.is_invalid = #{param.isInvalid}
|
||||||
|
</if>
|
||||||
|
<if test="param.isSettled != null">
|
||||||
|
AND a.is_settled = #{param.isSettled}
|
||||||
|
</if>
|
||||||
|
<if test="param.settleTime != null">
|
||||||
|
AND a.settle_time = #{param.settleTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeStart != null">
|
||||||
|
AND a.create_time >= #{param.createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeEnd != null">
|
||||||
|
AND a.create_time <= #{param.createTimeEnd}
|
||||||
|
</if>
|
||||||
|
<if test="param.keywords != null">
|
||||||
|
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 分页查询 -->
|
||||||
|
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.DealerOrder">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询全部 -->
|
||||||
|
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.DealerOrder">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.gxwebsoft.shop.mapper.DealerRefereeMapper">
|
||||||
|
|
||||||
|
<!-- 关联查询sql -->
|
||||||
|
<sql id="selectSql">
|
||||||
|
SELECT a.*
|
||||||
|
FROM shop_dealer_referee a
|
||||||
|
<where>
|
||||||
|
<if test="param.id != null">
|
||||||
|
AND a.id = #{param.id}
|
||||||
|
</if>
|
||||||
|
<if test="param.dealerId != null">
|
||||||
|
AND a.dealer_id = #{param.dealerId}
|
||||||
|
</if>
|
||||||
|
<if test="param.userId != null">
|
||||||
|
AND a.user_id = #{param.userId}
|
||||||
|
</if>
|
||||||
|
<if test="param.level != null">
|
||||||
|
AND a.level = #{param.level}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeStart != null">
|
||||||
|
AND a.create_time >= #{param.createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeEnd != null">
|
||||||
|
AND a.create_time <= #{param.createTimeEnd}
|
||||||
|
</if>
|
||||||
|
<if test="param.keywords != null">
|
||||||
|
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 分页查询 -->
|
||||||
|
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.DealerReferee">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询全部 -->
|
||||||
|
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.DealerReferee">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.gxwebsoft.shop.mapper.DealerSettingMapper">
|
||||||
|
|
||||||
|
<!-- 关联查询sql -->
|
||||||
|
<sql id="selectSql">
|
||||||
|
SELECT a.*
|
||||||
|
FROM shop_dealer_setting a
|
||||||
|
<where>
|
||||||
|
<if test="param.key != null">
|
||||||
|
AND a.key = #{param.key}
|
||||||
|
</if>
|
||||||
|
<if test="param.describe != null">
|
||||||
|
AND a.describe LIKE CONCAT('%', #{param.describe}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.values != null">
|
||||||
|
AND a.values LIKE CONCAT('%', #{param.values}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.keywords != null">
|
||||||
|
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 分页查询 -->
|
||||||
|
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.DealerSetting">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询全部 -->
|
||||||
|
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.DealerSetting">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.gxwebsoft.shop.mapper.DealerUserMapper">
|
||||||
|
|
||||||
|
<!-- 关联查询sql -->
|
||||||
|
<sql id="selectSql">
|
||||||
|
SELECT a.*,b.real_name as dealerName
|
||||||
|
FROM shop_dealer_user a
|
||||||
|
LEFT JOIN shop_dealer_user b ON a.referee_id = b.user_id
|
||||||
|
<where>
|
||||||
|
<if test="param.userId != null">
|
||||||
|
AND a.user_id = #{param.userId}
|
||||||
|
</if>
|
||||||
|
<if test="param.realName != null">
|
||||||
|
AND a.real_name LIKE CONCAT('%', #{param.realName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.mobile != null">
|
||||||
|
AND a.mobile LIKE CONCAT('%', #{param.mobile}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.payPassword != null">
|
||||||
|
AND a.pay_password LIKE CONCAT('%', #{param.payPassword}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.money != null">
|
||||||
|
AND a.money = #{param.money}
|
||||||
|
</if>
|
||||||
|
<if test="param.freezeMoney != null">
|
||||||
|
AND a.freeze_money = #{param.freezeMoney}
|
||||||
|
</if>
|
||||||
|
<if test="param.totalMoney != null">
|
||||||
|
AND a.total_money = #{param.totalMoney}
|
||||||
|
</if>
|
||||||
|
<if test="param.refereeId != null">
|
||||||
|
AND a.referee_id = #{param.refereeId}
|
||||||
|
</if>
|
||||||
|
<if test="param.firstNum != null">
|
||||||
|
AND a.first_num = #{param.firstNum}
|
||||||
|
</if>
|
||||||
|
<if test="param.secondNum != null">
|
||||||
|
AND a.second_num = #{param.secondNum}
|
||||||
|
</if>
|
||||||
|
<if test="param.thirdNum != null">
|
||||||
|
AND a.third_num = #{param.thirdNum}
|
||||||
|
</if>
|
||||||
|
<if test="param.isDelete != null">
|
||||||
|
AND a.is_delete = #{param.isDelete}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeStart != null">
|
||||||
|
AND a.create_time >= #{param.createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeEnd != null">
|
||||||
|
AND a.create_time <= #{param.createTimeEnd}
|
||||||
|
</if>
|
||||||
|
<if test="param.keywords != null">
|
||||||
|
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 分页查询 -->
|
||||||
|
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.DealerUser">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询全部 -->
|
||||||
|
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.DealerUser">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.gxwebsoft.shop.mapper.DealerWithdrawMapper">
|
||||||
|
|
||||||
|
<!-- 关联查询sql -->
|
||||||
|
<sql id="selectSql">
|
||||||
|
SELECT a.*
|
||||||
|
FROM shop_dealer_withdraw a
|
||||||
|
<where>
|
||||||
|
<if test="param.id != null">
|
||||||
|
AND a.id = #{param.id}
|
||||||
|
</if>
|
||||||
|
<if test="param.userId != null">
|
||||||
|
AND a.user_id = #{param.userId}
|
||||||
|
</if>
|
||||||
|
<if test="param.money != null">
|
||||||
|
AND a.money = #{param.money}
|
||||||
|
</if>
|
||||||
|
<if test="param.payType != null">
|
||||||
|
AND a.pay_type = #{param.payType}
|
||||||
|
</if>
|
||||||
|
<if test="param.alipayName != null">
|
||||||
|
AND a.alipay_name LIKE CONCAT('%', #{param.alipayName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.alipayAccount != null">
|
||||||
|
AND a.alipay_account LIKE CONCAT('%', #{param.alipayAccount}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.bankName != null">
|
||||||
|
AND a.bank_name LIKE CONCAT('%', #{param.bankName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.bankAccount != null">
|
||||||
|
AND a.bank_account LIKE CONCAT('%', #{param.bankAccount}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.bankCard != null">
|
||||||
|
AND a.bank_card LIKE CONCAT('%', #{param.bankCard}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.applyStatus != null">
|
||||||
|
AND a.apply_status = #{param.applyStatus}
|
||||||
|
</if>
|
||||||
|
<if test="param.auditTime != null">
|
||||||
|
AND a.audit_time = #{param.auditTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.rejectReason != null">
|
||||||
|
AND a.reject_reason LIKE CONCAT('%', #{param.rejectReason}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.platform != null">
|
||||||
|
AND a.platform LIKE CONCAT('%', #{param.platform}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeStart != null">
|
||||||
|
AND a.create_time >= #{param.createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeEnd != null">
|
||||||
|
AND a.create_time <= #{param.createTimeEnd}
|
||||||
|
</if>
|
||||||
|
<if test="param.keywords != null">
|
||||||
|
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 分页查询 -->
|
||||||
|
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.DealerWithdraw">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询全部 -->
|
||||||
|
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.DealerWithdraw">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package com.gxwebsoft.shop.param;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||||
|
import com.gxwebsoft.common.core.web.BaseParam;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商申请记录表查询参数
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
@ApiModel(value = "DealerApplyParam对象", description = "分销商申请记录表查询参数")
|
||||||
|
public class DealerApplyParam extends BaseParam {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "主键ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer applyId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "姓名")
|
||||||
|
private String realName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "手机号")
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "推荐人用户ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer refereeId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "申请方式(10需后台审核 20无需审核)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer applyType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "申请时间")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer applyTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审核状态 (10待审核 20审核通过 30驳回)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer applyStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审核时间")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer auditTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "驳回原因")
|
||||||
|
private String rejectReason;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
package com.gxwebsoft.shop.param;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||||
|
import com.gxwebsoft.common.core.web.BaseParam;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商资金明细表查询参数
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
@ApiModel(value = "DealerCapitalParam对象", description = "分销商资金明细表查询参数")
|
||||||
|
public class DealerCapitalParam extends BaseParam {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "主键ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分销商用户ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "订单ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer orderId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "资金流动类型 (10佣金收入 20提现支出 30转账支出 40转账收入)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer flowType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "金额")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private BigDecimal money;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "描述")
|
||||||
|
private String describe;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "对方用户ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer toUserId;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
package com.gxwebsoft.shop.param;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||||
|
import com.gxwebsoft.common.core.web.BaseParam;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商订单记录表查询参数
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
@ApiModel(value = "DealerOrderParam对象", description = "分销商订单记录表查询参数")
|
||||||
|
public class DealerOrderParam extends BaseParam {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "主键ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "买家用户ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "订单ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer orderId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "订单总金额(不含运费)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private BigDecimal orderPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分销商用户id(一级)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer firstUserId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分销商用户id(二级)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer secondUserId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分销商用户id(三级)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer thirdUserId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分销佣金(一级)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private BigDecimal firstMoney;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分销佣金(二级)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private BigDecimal secondMoney;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分销佣金(三级)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private BigDecimal thirdMoney;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "订单是否失效(0未失效 1已失效)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer isInvalid;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "佣金结算(0未结算 1已结算)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer isSettled;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "结算时间")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer settleTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.gxwebsoft.shop.param;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||||
|
import com.gxwebsoft.common.core.web.BaseParam;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商推荐关系表查询参数
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
@ApiModel(value = "DealerRefereeParam对象", description = "分销商推荐关系表查询参数")
|
||||||
|
public class DealerRefereeParam extends BaseParam {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "主键ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分销商用户ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer dealerId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户id(被推荐人)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "推荐关系层级(1,2,3)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer level;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package com.gxwebsoft.shop.param;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||||
|
import com.gxwebsoft.common.core.web.BaseParam;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商设置表查询参数
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
@ApiModel(value = "DealerSettingParam对象", description = "分销商设置表查询参数")
|
||||||
|
public class DealerSettingParam extends BaseParam {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "设置项标示")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private String key;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "设置项描述")
|
||||||
|
private String describe;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "设置内容(json格式)")
|
||||||
|
private String values;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
package com.gxwebsoft.shop.param;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||||
|
import com.gxwebsoft.common.core.web.BaseParam;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商用户记录表查询参数
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
@ApiModel(value = "DealerUserParam对象", description = "分销商用户记录表查询参数")
|
||||||
|
public class DealerUserParam extends BaseParam {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分销商用户ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "姓名")
|
||||||
|
private String realName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "手机号")
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "支付密码")
|
||||||
|
private String payPassword;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "当前可提现佣金")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private BigDecimal money;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "已冻结佣金")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private BigDecimal freezeMoney;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "累积提现佣金")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private BigDecimal totalMoney;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "推荐人用户ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer refereeId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "成员数量(一级)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer firstNum;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "成员数量(二级)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer secondNum;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "成员数量(三级)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer thirdNum;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否删除")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer isDelete;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
package com.gxwebsoft.shop.param;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||||
|
import com.gxwebsoft.common.core.web.BaseParam;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商提现明细表查询参数
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
@ApiModel(value = "DealerWithdrawParam对象", description = "分销商提现明细表查询参数")
|
||||||
|
public class DealerWithdrawParam extends BaseParam {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "主键ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分销商用户ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "提现金额")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private BigDecimal money;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "打款方式 (10微信 20支付宝 30银行卡)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer payType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "支付宝姓名")
|
||||||
|
private String alipayName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "支付宝账号")
|
||||||
|
private String alipayAccount;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "开户行名称")
|
||||||
|
private String bankName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "银行开户名")
|
||||||
|
private String bankAccount;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "银行卡号")
|
||||||
|
private String bankCard;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "申请状态 (10待审核 20审核通过 30驳回 40已打款)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer applyStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审核时间")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer auditTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "驳回原因")
|
||||||
|
private String rejectReason;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "来源客户端(APP、H5、小程序等)")
|
||||||
|
private String platform;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -33,7 +33,7 @@ public class GoodsCategoryParam extends BaseParam {
|
|||||||
@ApiModelProperty(value = "分类名称")
|
@ApiModelProperty(value = "分类名称")
|
||||||
private String title;
|
private String title;
|
||||||
|
|
||||||
@ApiModelProperty(value = "类型 0列表 1单页 2外链")
|
@ApiModelProperty(value = "类型 0商城 1外卖")
|
||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private Integer type;
|
private Integer type;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.gxwebsoft.shop.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.shop.entity.DealerApply;
|
||||||
|
import com.gxwebsoft.shop.param.DealerApplyParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商申请记录表Service
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
public interface DealerApplyService extends IService<DealerApply> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页关联查询
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return PageResult<DealerApply>
|
||||||
|
*/
|
||||||
|
PageResult<DealerApply> pageRel(DealerApplyParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<DealerApply>
|
||||||
|
*/
|
||||||
|
List<DealerApply> listRel(DealerApplyParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param applyId 主键ID
|
||||||
|
* @return DealerApply
|
||||||
|
*/
|
||||||
|
DealerApply getByIdRel(Integer applyId);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.gxwebsoft.shop.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.shop.entity.DealerCapital;
|
||||||
|
import com.gxwebsoft.shop.param.DealerCapitalParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商资金明细表Service
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
public interface DealerCapitalService extends IService<DealerCapital> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页关联查询
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return PageResult<DealerCapital>
|
||||||
|
*/
|
||||||
|
PageResult<DealerCapital> pageRel(DealerCapitalParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<DealerCapital>
|
||||||
|
*/
|
||||||
|
List<DealerCapital> listRel(DealerCapitalParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param id 主键ID
|
||||||
|
* @return DealerCapital
|
||||||
|
*/
|
||||||
|
DealerCapital getByIdRel(Integer id);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.gxwebsoft.shop.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.shop.entity.DealerOrder;
|
||||||
|
import com.gxwebsoft.shop.param.DealerOrderParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商订单记录表Service
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
public interface DealerOrderService extends IService<DealerOrder> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页关联查询
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return PageResult<DealerOrder>
|
||||||
|
*/
|
||||||
|
PageResult<DealerOrder> pageRel(DealerOrderParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<DealerOrder>
|
||||||
|
*/
|
||||||
|
List<DealerOrder> listRel(DealerOrderParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param id 主键ID
|
||||||
|
* @return DealerOrder
|
||||||
|
*/
|
||||||
|
DealerOrder getByIdRel(Integer id);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.gxwebsoft.shop.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.shop.entity.DealerReferee;
|
||||||
|
import com.gxwebsoft.shop.param.DealerRefereeParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商推荐关系表Service
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
public interface DealerRefereeService extends IService<DealerReferee> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页关联查询
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return PageResult<DealerReferee>
|
||||||
|
*/
|
||||||
|
PageResult<DealerReferee> pageRel(DealerRefereeParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<DealerReferee>
|
||||||
|
*/
|
||||||
|
List<DealerReferee> listRel(DealerRefereeParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param id 主键ID
|
||||||
|
* @return DealerReferee
|
||||||
|
*/
|
||||||
|
DealerReferee getByIdRel(Integer id);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.gxwebsoft.shop.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.shop.entity.DealerSetting;
|
||||||
|
import com.gxwebsoft.shop.param.DealerSettingParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商设置表Service
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
public interface DealerSettingService extends IService<DealerSetting> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页关联查询
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return PageResult<DealerSetting>
|
||||||
|
*/
|
||||||
|
PageResult<DealerSetting> pageRel(DealerSettingParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<DealerSetting>
|
||||||
|
*/
|
||||||
|
List<DealerSetting> listRel(DealerSettingParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param key 设置项标示
|
||||||
|
* @return DealerSetting
|
||||||
|
*/
|
||||||
|
DealerSetting getByIdRel(String key);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.gxwebsoft.shop.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.shop.entity.DealerUser;
|
||||||
|
import com.gxwebsoft.shop.param.DealerUserParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商用户记录表Service
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
public interface DealerUserService extends IService<DealerUser> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页关联查询
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return PageResult<DealerUser>
|
||||||
|
*/
|
||||||
|
PageResult<DealerUser> pageRel(DealerUserParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<DealerUser>
|
||||||
|
*/
|
||||||
|
List<DealerUser> listRel(DealerUserParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param userId 分销商用户ID
|
||||||
|
* @return DealerUser
|
||||||
|
*/
|
||||||
|
DealerUser getByIdRel(Integer userId);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.gxwebsoft.shop.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.shop.entity.DealerWithdraw;
|
||||||
|
import com.gxwebsoft.shop.param.DealerWithdrawParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商提现明细表Service
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
public interface DealerWithdrawService extends IService<DealerWithdraw> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页关联查询
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return PageResult<DealerWithdraw>
|
||||||
|
*/
|
||||||
|
PageResult<DealerWithdraw> pageRel(DealerWithdrawParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<DealerWithdraw>
|
||||||
|
*/
|
||||||
|
List<DealerWithdraw> listRel(DealerWithdrawParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param id 主键ID
|
||||||
|
* @return DealerWithdraw
|
||||||
|
*/
|
||||||
|
DealerWithdraw getByIdRel(Integer id);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -3,6 +3,7 @@ package com.gxwebsoft.shop.service;
|
|||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.gxwebsoft.common.core.web.PageResult;
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
import com.gxwebsoft.shop.entity.Goods;
|
import com.gxwebsoft.shop.entity.Goods;
|
||||||
|
import com.gxwebsoft.shop.param.GoodsCategoryParam;
|
||||||
import com.gxwebsoft.shop.param.GoodsParam;
|
import com.gxwebsoft.shop.param.GoodsParam;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.gxwebsoft.shop.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.gxwebsoft.shop.mapper.DealerApplyMapper;
|
||||||
|
import com.gxwebsoft.shop.service.DealerApplyService;
|
||||||
|
import com.gxwebsoft.shop.entity.DealerApply;
|
||||||
|
import com.gxwebsoft.shop.param.DealerApplyParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商申请记录表Service实现
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class DealerApplyServiceImpl extends ServiceImpl<DealerApplyMapper, DealerApply> implements DealerApplyService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<DealerApply> pageRel(DealerApplyParam param) {
|
||||||
|
PageParam<DealerApply, DealerApplyParam> page = new PageParam<>(param);
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
List<DealerApply> list = baseMapper.selectPageRel(page, param);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DealerApply> listRel(DealerApplyParam param) {
|
||||||
|
List<DealerApply> list = baseMapper.selectListRel(param);
|
||||||
|
// 排序
|
||||||
|
PageParam<DealerApply, DealerApplyParam> page = new PageParam<>();
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
return page.sortRecords(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DealerApply getByIdRel(Integer applyId) {
|
||||||
|
DealerApplyParam param = new DealerApplyParam();
|
||||||
|
param.setApplyId(applyId);
|
||||||
|
return param.getOne(baseMapper.selectListRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.gxwebsoft.shop.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.gxwebsoft.shop.mapper.DealerCapitalMapper;
|
||||||
|
import com.gxwebsoft.shop.service.DealerCapitalService;
|
||||||
|
import com.gxwebsoft.shop.entity.DealerCapital;
|
||||||
|
import com.gxwebsoft.shop.param.DealerCapitalParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商资金明细表Service实现
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class DealerCapitalServiceImpl extends ServiceImpl<DealerCapitalMapper, DealerCapital> implements DealerCapitalService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<DealerCapital> pageRel(DealerCapitalParam param) {
|
||||||
|
PageParam<DealerCapital, DealerCapitalParam> page = new PageParam<>(param);
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
List<DealerCapital> list = baseMapper.selectPageRel(page, param);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DealerCapital> listRel(DealerCapitalParam param) {
|
||||||
|
List<DealerCapital> list = baseMapper.selectListRel(param);
|
||||||
|
// 排序
|
||||||
|
PageParam<DealerCapital, DealerCapitalParam> page = new PageParam<>();
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
return page.sortRecords(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DealerCapital getByIdRel(Integer id) {
|
||||||
|
DealerCapitalParam param = new DealerCapitalParam();
|
||||||
|
param.setId(id);
|
||||||
|
return param.getOne(baseMapper.selectListRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.gxwebsoft.shop.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.gxwebsoft.shop.mapper.DealerOrderMapper;
|
||||||
|
import com.gxwebsoft.shop.service.DealerOrderService;
|
||||||
|
import com.gxwebsoft.shop.entity.DealerOrder;
|
||||||
|
import com.gxwebsoft.shop.param.DealerOrderParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商订单记录表Service实现
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class DealerOrderServiceImpl extends ServiceImpl<DealerOrderMapper, DealerOrder> implements DealerOrderService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<DealerOrder> pageRel(DealerOrderParam param) {
|
||||||
|
PageParam<DealerOrder, DealerOrderParam> page = new PageParam<>(param);
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
List<DealerOrder> list = baseMapper.selectPageRel(page, param);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DealerOrder> listRel(DealerOrderParam param) {
|
||||||
|
List<DealerOrder> list = baseMapper.selectListRel(param);
|
||||||
|
// 排序
|
||||||
|
PageParam<DealerOrder, DealerOrderParam> page = new PageParam<>();
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
return page.sortRecords(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DealerOrder getByIdRel(Integer id) {
|
||||||
|
DealerOrderParam param = new DealerOrderParam();
|
||||||
|
param.setId(id);
|
||||||
|
return param.getOne(baseMapper.selectListRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.gxwebsoft.shop.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.gxwebsoft.shop.mapper.DealerRefereeMapper;
|
||||||
|
import com.gxwebsoft.shop.service.DealerRefereeService;
|
||||||
|
import com.gxwebsoft.shop.entity.DealerReferee;
|
||||||
|
import com.gxwebsoft.shop.param.DealerRefereeParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商推荐关系表Service实现
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class DealerRefereeServiceImpl extends ServiceImpl<DealerRefereeMapper, DealerReferee> implements DealerRefereeService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<DealerReferee> pageRel(DealerRefereeParam param) {
|
||||||
|
PageParam<DealerReferee, DealerRefereeParam> page = new PageParam<>(param);
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
List<DealerReferee> list = baseMapper.selectPageRel(page, param);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DealerReferee> listRel(DealerRefereeParam param) {
|
||||||
|
List<DealerReferee> list = baseMapper.selectListRel(param);
|
||||||
|
// 排序
|
||||||
|
PageParam<DealerReferee, DealerRefereeParam> page = new PageParam<>();
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
return page.sortRecords(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DealerReferee getByIdRel(Integer id) {
|
||||||
|
DealerRefereeParam param = new DealerRefereeParam();
|
||||||
|
param.setId(id);
|
||||||
|
return param.getOne(baseMapper.selectListRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.gxwebsoft.shop.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.gxwebsoft.shop.mapper.DealerSettingMapper;
|
||||||
|
import com.gxwebsoft.shop.service.DealerSettingService;
|
||||||
|
import com.gxwebsoft.shop.entity.DealerSetting;
|
||||||
|
import com.gxwebsoft.shop.param.DealerSettingParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商设置表Service实现
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class DealerSettingServiceImpl extends ServiceImpl<DealerSettingMapper, DealerSetting> implements DealerSettingService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<DealerSetting> pageRel(DealerSettingParam param) {
|
||||||
|
PageParam<DealerSetting, DealerSettingParam> page = new PageParam<>(param);
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
List<DealerSetting> list = baseMapper.selectPageRel(page, param);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DealerSetting> listRel(DealerSettingParam param) {
|
||||||
|
List<DealerSetting> list = baseMapper.selectListRel(param);
|
||||||
|
// 排序
|
||||||
|
PageParam<DealerSetting, DealerSettingParam> page = new PageParam<>();
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
return page.sortRecords(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DealerSetting getByIdRel(String key) {
|
||||||
|
DealerSettingParam param = new DealerSettingParam();
|
||||||
|
param.setKey(key);
|
||||||
|
return param.getOne(baseMapper.selectListRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.gxwebsoft.shop.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.gxwebsoft.shop.mapper.DealerUserMapper;
|
||||||
|
import com.gxwebsoft.shop.service.DealerUserService;
|
||||||
|
import com.gxwebsoft.shop.entity.DealerUser;
|
||||||
|
import com.gxwebsoft.shop.param.DealerUserParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商用户记录表Service实现
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class DealerUserServiceImpl extends ServiceImpl<DealerUserMapper, DealerUser> implements DealerUserService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<DealerUser> pageRel(DealerUserParam param) {
|
||||||
|
PageParam<DealerUser, DealerUserParam> page = new PageParam<>(param);
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
List<DealerUser> list = baseMapper.selectPageRel(page, param);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DealerUser> listRel(DealerUserParam param) {
|
||||||
|
List<DealerUser> list = baseMapper.selectListRel(param);
|
||||||
|
// 排序
|
||||||
|
PageParam<DealerUser, DealerUserParam> page = new PageParam<>();
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
return page.sortRecords(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DealerUser getByIdRel(Integer userId) {
|
||||||
|
DealerUserParam param = new DealerUserParam();
|
||||||
|
param.setUserId(userId);
|
||||||
|
return param.getOne(baseMapper.selectListRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.gxwebsoft.shop.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.gxwebsoft.shop.mapper.DealerWithdrawMapper;
|
||||||
|
import com.gxwebsoft.shop.service.DealerWithdrawService;
|
||||||
|
import com.gxwebsoft.shop.entity.DealerWithdraw;
|
||||||
|
import com.gxwebsoft.shop.param.DealerWithdrawParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分销商提现明细表Service实现
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-07-28 11:57:41
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class DealerWithdrawServiceImpl extends ServiceImpl<DealerWithdrawMapper, DealerWithdraw> implements DealerWithdrawService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<DealerWithdraw> pageRel(DealerWithdrawParam param) {
|
||||||
|
PageParam<DealerWithdraw, DealerWithdrawParam> page = new PageParam<>(param);
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
List<DealerWithdraw> list = baseMapper.selectPageRel(page, param);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DealerWithdraw> listRel(DealerWithdrawParam param) {
|
||||||
|
List<DealerWithdraw> list = baseMapper.selectListRel(param);
|
||||||
|
// 排序
|
||||||
|
PageParam<DealerWithdraw, DealerWithdrawParam> page = new PageParam<>();
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
return page.sortRecords(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DealerWithdraw getByIdRel(Integer id) {
|
||||||
|
DealerWithdrawParam param = new DealerWithdrawParam();
|
||||||
|
param.setId(id);
|
||||||
|
return param.getOne(baseMapper.selectListRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -77,7 +77,15 @@ public class ShopGenerator {
|
|||||||
// "shop_users",
|
// "shop_users",
|
||||||
// "shop_user_address",
|
// "shop_user_address",
|
||||||
// "shop_user_balance_log"
|
// "shop_user_balance_log"
|
||||||
"shop_recharge_order"
|
// "shop_recharge_order"
|
||||||
|
// 经销商表
|
||||||
|
"shop_dealer_apply",
|
||||||
|
"shop_dealer_capital",
|
||||||
|
"shop_dealer_order",
|
||||||
|
"shop_dealer_referee",
|
||||||
|
"shop_dealer_setting",
|
||||||
|
"shop_dealer_user",
|
||||||
|
"shop_dealer_withdraw"
|
||||||
};
|
};
|
||||||
// 需要去除的表前缀
|
// 需要去除的表前缀
|
||||||
private static final String[] TABLE_PREFIX = new String[]{
|
private static final String[] TABLE_PREFIX = new String[]{
|
||||||
|
|||||||
Reference in New Issue
Block a user