调整品牌校区数据获取,调整依赖,调整校区插件,调整上传

This commit is contained in:
DB 2024-06-13 17:40:43 +08:00
parent cc11addd6b
commit b97031b4dd
74 changed files with 1485 additions and 2314 deletions

View File

@ -1,6 +1,7 @@
package com.cpop.core.strategy.json;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson2.JSONArray;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.TreeNode;
@ -30,8 +31,9 @@ public class ArrayToStringDeserializer extends JsonDeserializer<String> {
} else if (treeNode instanceof DoubleNode) {
return ((DoubleNode) treeNode).asText();
} else if (treeNode instanceof ArrayNode) {
JSONArray array = JSONArray.parseArray((treeNode).toString());
//字符串数组会多出两个引号需要手动去除
return StrUtil.replace(StrUtil.join(",", (ArrayNode) treeNode), "\"", "");
return StrUtil.join(",", array);
} else if (treeNode instanceof TextNode) {
return ((TextNode) treeNode).asText();
}

View File

@ -27,31 +27,31 @@ public class CpopGenerator {
* 数据库 URL
*/
// private static final String URL = "jdbc:mysql://localhost:3306/cpop-dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8";
private static final String URL = "jdbc:mysql://localhost:3306/cpop_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8";
private static final String URL = "jdbc:mysql://bj-cynosdbmysql-grp-anccz88g.sql.tencentcdb.com:24808/cpop_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8";
/**
* 数据库用户名
*/
private static final String USERNAME = "root";
private static final String USERNAME = "cpop_dev";
/**
* 数据库密码
*/
private static final String PASSWORD = "Admin@123";
private static final String PASSWORD = "Ch5WkZRsCATsnMXw";
//private static final String PASSWORD = "Customer0401";
/**
* 输出路径
*/
private static final String EXPORT_URL = "/Cpop-Jambox";
private static final String EXPORT_URL = "/Cpop-Oam";
/**
* 模块
*/
private static final String EXPORT_ITEM = "jambox";
private static final String EXPORT_ITEM = "oam";
/**
* 表前缀
*/
private static final String TABLE_PREFIX = "cp_j_";
private static final String TABLE_PREFIX = "cp_sys_";
/**
* 主入口

View File

@ -5,7 +5,7 @@
#set(entityClassName = table.buildEntityClassName())
package #(packageConfig.entityPackage);
#for(importClass : table.buildImports())
#for(importClass : table.buildImports(false))
import #(importClass);
#end
#if(withActiveRecord)

View File

@ -9,9 +9,9 @@ cpop:
gateway:
rsa-keypair:
# 公钥文件
publicKeyFile: D:\Cpop\Cpop-Union\Cpop-Core\src\main\resources\static\keypair\publicKey
publicKeyFile: E:\Cpop\Cpop-Union-1.1.0\Cpop-Oam\Cpop-Oam-Web\src\main\resources\static\keypair\publicKey
# 公钥文件
privateKeyFile: D:\Cpop\Cpop-Union\Cpop-Core\src\main\resources\static\keypair\privateKey
privateKeyFile: E:\Cpop\Cpop-Union-1.1.0\Cpop-Oam\Cpop-Oam-Web\src\main\resources\static\keypair\privateKey
# DataSource Config
spring:
@ -54,9 +54,9 @@ mongo-plus:
#数据库名
database: cpop_dev
#用户名,没有可不填(若账号中出现@,!等等符号,不需要再进行转码!!!)
username: mongo_kBXjhm
username: mongo_AGwXPs
#密码,同上(若密码中出现@,!等等符号,不需要再进行转码!!!)
password: mongo_7RF4Zj
password: mongo_xe4Dhe
#验证数据库 admin
authentication-database: admin
connect-timeout-m-s: 50000

View File

@ -48,15 +48,15 @@ mongo-plus:
data:
mongodb:
#ip
host: 1panel.cpopsz.com
host: mongodb
#端口
port: 27017
#数据库名
database: cpop_test
#用户名,没有可不填(若账号中出现@,!等等符号,不需要再进行转码!!!)
username: mongo_kBXjhm
username: mongo_AGwXPs
#密码,同上(若密码中出现@,!等等符号,不需要再进行转码!!!)
password: mongo_7RF4Zj
password: mongo_xe4Dhe
#验证数据库 admin
authentication-database: admin
connect-timeout-m-s: 50000
@ -71,9 +71,9 @@ mybatis-flex:
username: cpop_test
password: zkrK3nT8TzsJABwr
jambox:
url: jdbc:mysql://bj-cynosdbmysql-grp-anccz88g.sql.tencentcdb.com:24808/cpop_test?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
username: cpop_test
password: zkrK3nT8TzsJABwr
url: jdbc:mysql://bj-cynosdbmysql-grp-anccz88g.sql.tencentcdb.com:24808/jambox_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: jambox_test
password: R6fkprEYRttsQHh8
# springdoc-openapi项目配置
springdoc:

View File

@ -0,0 +1,38 @@
package com.cpop.oam.business.bo;
import com.cpop.core.anno.StringArrayConvert;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* @author DB
* @since 2023/10/25 16:43
*/
@Data
@Accessors(chain = true)
@Schema(description = "品牌请求参数")
public class BrandBo {
/**
* 主键
*/
@NotBlank(message = "主键不能为空")
@Schema(description = "主键",requiredMode = Schema.RequiredMode.REQUIRED)
private String id;
/**
* 微信商户id
*/
@Schema(description = "微信商户id")
private String wxMchId;
/**
* 授权产品
*/
@StringArrayConvert
@Schema(description = "授权产品")
private String authProduct;
}

View File

@ -16,6 +16,12 @@ import lombok.experimental.Accessors;
@Schema(description = "ChangePlugOpenBo对象")
public class ChangePlugOpenBo {
/**
* 主键
*/
@Schema(description = "主键")
private String id;
/**
* 校区
*/

View File

@ -0,0 +1,45 @@
package com.cpop.oam.business.bo;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* @author DB
* @version 1.0.0
* @since 2024-01-05 14:31
*/
@Data
@Accessors(chain = true)
@Schema(description = "ChangePlugOpenBo对象")
public class ChangePlugVisibleBo {
/**
* 主键
*/
@Schema(description = "主键")
private String id;
/**
* 校区
*/
@NotBlank(message = "校区不能为空")
@Schema(description = "校区",requiredMode = Schema.RequiredMode.REQUIRED)
private String storeId;
/**
* 插件
*/
@NotBlank(message = "插件不能为空")
@Schema(description = "插件",requiredMode = Schema.RequiredMode.REQUIRED)
private String plugTag;
/**
* 开启与关闭
*/
@NotNull(message = "开启与关闭不能为空")
@Schema(description = "开启与关闭",requiredMode = Schema.RequiredMode.REQUIRED)
private Boolean isVisible;
}

View File

@ -0,0 +1,66 @@
package com.cpop.oam.business.bo;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* @author DB
* @version 1.0.0
* @since 2024-01-05 12:47
*/
@Data
@Accessors(chain = true)
@Schema(description = "插件请求参数")
public class PlugBo {
/**
* 主键
*/
@Schema(description = "主键")
private String id;
/**
* 插件名
*/
@NotBlank(message = "插件名不能为空")
@Schema(description = "插件名",requiredMode = Schema.RequiredMode.REQUIRED)
private String name;
/**
* 插件标签
*/
@NotBlank(message = "插件标签不能为空")
@Schema(description = "插件标签",requiredMode = Schema.RequiredMode.REQUIRED)
private String plugTag;
/**
* 插件图标地址
*/
@Schema(description = "插件图标地址")
private String picUrl;
/**
* 排序
*/
@NotNull(message = "排序不能为空")
@Schema(description = "排序",requiredMode = Schema.RequiredMode.REQUIRED)
private Integer orderNo;
/**
* 备注
*/
@Schema(description = "备注")
private String remark;
/**
* 状态(0:禁用;1:使用)
*/
@NotNull(message = "状态不能为空")
@Schema(description = "状态",requiredMode = Schema.RequiredMode.REQUIRED)
private Integer status;
}

View File

@ -1,4 +1,4 @@
package com.cpop.system.business.bo;
package com.cpop.oam.business.bo;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;

View File

@ -1,4 +1,4 @@
package com.cpop.system.business.bo;
package com.cpop.oam.business.bo;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;

View File

@ -1,4 +1,4 @@
package com.cpop.system.business.bo;
package com.cpop.oam.business.bo;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;

View File

@ -1,4 +1,4 @@
package com.cpop.system.business.bo;
package com.cpop.oam.business.bo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

View File

@ -0,0 +1,92 @@
package com.cpop.oam.business.controller.backstage;
import com.cpop.core.base.entity.PageDomain;
import com.cpop.core.base.entity.R;
import com.cpop.core.utils.SqlUtils;
import com.cpop.oam.business.bo.BrandBo;
import com.cpop.oam.business.vo.BrandInfoVo;
import com.cpop.oam.business.vo.BrandPageVo;
import com.mybatisflex.core.datasource.DataSourceKey;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.row.DbChain;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import static com.cpop.oam.business.entity.table.BrandTableDef.BRAND;
/**
* 系统-品牌表 控制层
*
* @author DB
* @since 2023-10-25
*/
@RestController
@Tag(name = "品牌接口")
@RequestMapping("/backstage/brand")
public class BackstageBrandController {
/**
* 查询品牌分页列表
*
* @param brandName 请求参数
* @return {@link R }<{@link Page }<{@link BrandPageVo }>>
* @author DB
* @since 2023/09/13 17:55
*/
@Operation(summary = "查询品牌分页列表")
@GetMapping("/getBrandPage")
public R<Page<BrandPageVo>> getBrandPageList(String brandName) {
PageDomain pageDomain = SqlUtils.getInstance().getPageDomain();
Page<BrandPageVo> page = DataSourceKey.use("jambox", () -> {
return DbChain.table(BRAND).select(BRAND.ID, BRAND.BRAND_NAME, BRAND.BRAND_LOGO, BRAND.WX_MCH_ID, BRAND.CREATE_TIME, BRAND.WX_MCH_ID, BRAND.BRAND_ADDR)
.and(BRAND.BRAND_NAME.likeLeft(brandName))
.orderBy(BRAND.CREATE_TIME.desc()).pageAs(Page.of(pageDomain.getPage(), pageDomain.getPageSize()), BrandPageVo.class);
});
return R.ok(page);
}
/**
* 获取品牌信息
*
* @param id id
* @return {@link R }<{@link BrandInfoVo }>
* @author DB
* @since 2024/06/07
*/
@Operation(summary = "获取品牌信息")
@GetMapping("/getBrandInfo/{id}")
public R<BrandInfoVo> getBrandInfo(@PathVariable @Parameter(description = "品牌id", required = true) String id) {
BrandInfoVo brandInfoVo = DataSourceKey.use("jambox", () -> {
return DbChain.table(BRAND).select(BRAND.ID, BRAND.BRAND_NAME, BRAND.BRAND_LOGO, BRAND.WX_MCH_ID, BRAND.WX_MCH_ID, BRAND.BRAND_ADDR, BRAND.LICENSE_STATS,
BRAND.LICENSE_PIC_URL, BRAND.LICENSE_CREDIT_CODE, BRAND.LICENSE_FIRM_NAME, BRAND.LICENSE_USERNAME, BRAND.LICENSE_ADDR, BRAND.LICENSE_DATE,
BRAND.AUTH_PRODUCT)
.where(BRAND.ID.eq(id))
.oneAs(BrandInfoVo.class);
});
return R.ok(brandInfoVo);
}
/**
* 修改品牌
*
* @param bo 品牌参数
* @return {@link R }<{@link Void }>
* @author DB
* @since 2023/11/10 9:21
*/
@Operation(summary = "修改品牌")
@PutMapping("/updateBrand")
public R<Void> updateSysBrand(@RequestBody @Validated BrandBo bo) {
DataSourceKey.use("jambox", () -> {
DbChain.table(BRAND).set(BRAND.WX_MCH_ID,bo.getWxMchId())
.set(BRAND.AUTH_PRODUCT,bo.getAuthProduct())
.where(BRAND.ID.eq(bo.getId()))
.update();
});
return R.ok();
}
}

View File

@ -38,9 +38,11 @@ public class BackstageLoginController {
/**
* 系统登录
*
* @param loginForm 登录表单
* @return {@link R }<{@link LoginSuccess }>
* @author DB
* @since 2023/12/2
* @return R<LoginSuccess>
*/
@Operation(summary="系统登录")
@PostMapping("/login")
@ -68,9 +70,10 @@ public class BackstageLoginController {
/**
* 系统注销
*
* @return {@link R }<{@link Void }>
* @author DB
* @since 2023/12/2
* @return SaResult
*/
@Operation(summary="系统注销")
@GetMapping("/logout")
@ -81,11 +84,12 @@ public class BackstageLoginController {
}
/**
* 获取登录用户详情
*
* @return {@link R }<{@link LoginUserInfoVo }>
* @author LOST.yuan
* @Description 获取登录用户详情
* @date 14:52 2022/9/7
* @return {@link R<LoginUserInfoVo>}
**/
* @since 14:52 2022/9/7
*/
@GetMapping("/getUserInfo")
@Operation(summary = "获取登录用户详情")
public R<LoginUserInfoVo> getUserInfo() {
@ -93,11 +97,12 @@ public class BackstageLoginController {
}
/**
* @author LOST.yuan
* 获取权限码
*
* @return {@link R }<{@link List }<{@link String }>>
* @author LOST.yuan
* @since 14:52 2022/9/7
* @return {@link List<String>}
**/
*/
@Operation(summary = "获取权限码")
@GetMapping("/getPermCode")
public R<List<String>> getPermCode(){
@ -106,10 +111,12 @@ public class BackstageLoginController {
}
/**
* @author LOST.yuan
* 获取菜单列表
*
* @return {@link R }<{@link List }<{@link MenuRouteVo }>>
* @author LOST.yuan
* @since 14:52 2022/9/7
**/
*/
@Operation(summary = "获取菜单列表")
@GetMapping("/getMenuList")
public R<List<MenuRouteVo>> getMenuList(){

View File

@ -1,17 +1,22 @@
package com.cpop.system.business.controller.backstage;
package com.cpop.oam.business.controller.backstage;
import com.cpop.core.base.entity.PageDomain;
import com.cpop.core.base.entity.R;
import com.cpop.system.business.bo.StoreBo;
import com.cpop.system.business.service.StoreRenewService;
import com.cpop.system.business.vo.StorePageVo;
import com.cpop.core.utils.SqlUtils;
import com.cpop.oam.business.bo.StoreBo;
import com.cpop.oam.business.vo.StorePageVo;
import com.mybatisflex.core.datasource.DataSourceKey;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.row.DbChain;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import com.cpop.system.business.service.StoreService;
import static com.cpop.oam.business.entity.table.BrandTableDef.BRAND;
import static com.cpop.oam.business.entity.table.StoreSignTableDef.STORE_SIGN;
import static com.cpop.oam.business.entity.table.StoreTableDef.STORE;
/**
* 系统-店铺/校区表 控制层
@ -24,12 +29,6 @@ import com.cpop.system.business.service.StoreService;
@RequestMapping("/backstage/store")
public class BackstageStoreController {
@Autowired
private StoreService storeService;
@Autowired
private StoreRenewService storeRenewService;
/**
* 查询校区分页列表
* @param name 校区名
@ -40,8 +39,19 @@ public class BackstageStoreController {
@Operation(summary = "查询校区分页列表")
@GetMapping("/getStorePage")
public R<Page<StorePageVo>> getStorePage(@RequestParam(required = false) @Parameter(description = "校区名") String name) {
Page<StorePageVo> pageVo = storeService.getStorePage(name);
return R.ok(pageVo);
PageDomain pageDomain = SqlUtils.getInstance().getPageDomain();
Page<StorePageVo> page = DataSourceKey.use("jambox", () -> {
return DbChain.table(STORE).select(STORE.ID, STORE.STORE_NAME, STORE.CREATE_TIME, STORE.STORE_ADDR, STORE.PERSON_CHARGE_NAME.as(StorePageVo::getPersonCharge),
STORE.PERSON_CHARGE_PHONE.as(StorePageVo::getPhone), STORE.WX_MCH_ID)
.select(STORE_SIGN.EXPIRE_DATE)
.select(BRAND.BRAND_NAME)
.from(STORE)
.leftJoin(STORE_SIGN).on(STORE_SIGN.STORE_ID.eq(STORE.ID))
.leftJoin(BRAND).on(BRAND.ID.eq(STORE.BRAND_ID))
.and(STORE.STORE_NAME.like(name))
.orderBy(STORE.CREATE_TIME.desc()).pageAs(Page.of(pageDomain.getPage(), pageDomain.getPageSize()), StorePageVo.class);
});
return R.ok(page);
}
/**
@ -68,7 +78,7 @@ public class BackstageStoreController {
@PutMapping("/updateStore")
@Deprecated(since = "1.1.0")
public R<Void> updateStore(@RequestBody @Validated StoreBo bo) {
storeService.updateStore(bo);
//storeService.updateStore(bo);
return R.ok();
}
}

View File

@ -1,8 +1,40 @@
package com.cpop.oam.business.controller.backstage;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.stp.StpUtil;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import com.cpop.core.base.entity.PageDomain;
import com.cpop.core.base.entity.R;
import com.cpop.core.base.exception.ServiceException;
import com.cpop.core.utils.SqlUtils;
import com.cpop.oam.business.bo.ChangePlugOpenBo;
import com.cpop.oam.business.bo.ChangePlugVisibleBo;
import com.cpop.oam.business.bo.PlugBo;
import com.cpop.oam.business.entity.Plug;
import com.cpop.oam.business.entity.StorePlug;
import com.cpop.oam.business.vo.PlugPageVo;
import com.cpop.oam.business.vo.PlugVo;
import com.cpop.oam.business.vo.StorePlugListVo;
import com.mybatisflex.core.datasource.DataSourceKey;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.row.DbChain;
import com.mybatisflex.core.row.Row;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import static com.cpop.oam.business.entity.table.PlugTableDef.PLUG;
import static com.cpop.oam.business.entity.table.StorePlugTableDef.STORE_PLUG;
/**
* 校区-插件记录表 控制层
@ -13,110 +45,240 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@Tag(name = "校区-插件记录表接口")
@RequestMapping("/backstage/storePlug")
@Deprecated(since = "1.1.0")
public class BackstageStorePlugController {
// @Autowired
// private StorePlugService storePlugService;
//
// @Autowired
// private PlugService plugService;
//
// /**
// * 查询插件分页
// * @author DB
// * @since 2024/1/5
// * @return R<Page<PlugPageVo>>
// */
// @GetMapping("/getPlugPage")
// @Operation(summary = "查询插件分页")
// public R<Page<PlugPageVo>> getPlugPage() {
// Page<PlugPageVo> page = plugService.getPlugPage();
// return R.ok(page);
// }
//
// /**
// * 查询插件详情
// * @author DB
// * @since 2024/1/5
// * @param id 主键
// * @return R<PlugVo>
// */
// @GetMapping("/getPlugById/{id}")
// @Operation(summary = "查询插件详情")
// public R<PlugVo> getPlugById(@PathVariable String id) {
// PlugVo vo = plugService.getOneAs(QueryWrapper.create().where(PLUG.ID.eq(id)), PlugVo.class);
// return R.ok(vo);
// }
//
// /**
// * 新增插件
// * @author DB
// * @since 2024/1/5
// * @param bo 请求参数
// * @return R<Void>
// */
// @Operation(summary = "新增插件")
// @PostMapping("/insertPlug")
// public R<Void> insertPlug(@RequestBody @Validated PlugBo bo) {
// plugService.insertPlug(bo);
// return R.ok();
// }
//
// /**
// * 修改插件
// * @author DB
// * @since 2024/1/5
// * @param bo 请求参数
// * @return R<Void>
// */
// @Operation(summary = "修改插件")
// @PutMapping("/updatePlug")
// public R<Void> updateStaff(@RequestBody @Validated PlugBo bo) {
// plugService.updatePlug(bo);
// return R.ok();
// }
//
// /**
// * 删除插件
// * @author DB
// * @since 2024/1/5
// * @param id 主键
// * @return R<Void>
// */
// @Operation(summary = "删除插件")
// @DeleteMapping("/removePlugById/{id}")
// public R<Void> removeStaffById(@PathVariable String id) {
// plugService.removeById(id);
// return R.ok();
// }
//
// /**
// * 查询校区插件列表
// *
// * @param brandId brandId
// * @param storeId storeId
// */
// @GetMapping("/getStorePlugList")
// @Operation(summary = "查询校区插件列表")
// public R<List<StorePlugListVo>> getStorePlugList(@Parameter(description = "品牌id") String brandId, @Parameter(description = "校区id") String storeId) {
// List<StorePlugListVo> list = storePlugService.getStorePlugList(brandId, storeId);
// return R.ok(list);
// }
//
// /**
// * 插件开启与关闭
// */
// @PutMapping("/changePlugOpen")
// @Operation(summary = "插件开启与关闭")
// public R<Void> changePlugOpen(@RequestBody @Validated ChangePlugOpenBo bo) {
// StorePlug storePlug = BeanUtils.mapToClass(bo, StorePlug.class);
// if (bo.getIsOpen()){
// storePlugService.save(storePlug);
// } else {
// storePlugService.updateChain().where(STORE_PLUG.STORE_ID.eq(bo.getStoreId())).and(STORE_PLUG.PLUG_TAG.eq(bo.getPlugTag())).remove();
// }
// return R.ok();
// }
/**
* 查询插件分页
*
* @return {@link R }<{@link Page }<{@link PlugPageVo }>>
* @author DB
* @since 2024/06/12
*/
@GetMapping("/getPlugPage")
@Operation(summary = "查询插件分页")
public R<Page<PlugPageVo>> getPlugPage() {
PageDomain pageDomain = SqlUtils.getInstance().getPageDomain();
Page<PlugPageVo> page = DataSourceKey.use("jambox", () -> {
return DbChain.table(PLUG).select(PLUG.ID, PLUG.NAME, PLUG.ORDER_NO, PLUG.STATUS, PLUG.PLUG_TAG, PLUG.REMARK)
.orderBy(PLUG.ORDER_NO.desc())
.pageAs(Page.of(pageDomain.getPage(), pageDomain.getPageSize()), PlugPageVo.class);
});
return R.ok(page);
}
/**
* 查询插件详情
*
* @param id id
* @return {@link R }<{@link PlugVo }>
* @author DB
* @since 2024/06/12
*/
@GetMapping("/getPlugById/{id}")
@Operation(summary = "查询插件详情")
public R<PlugVo> getPlugById(@PathVariable String id) {
PlugVo vo = DataSourceKey.use("jambox", () -> {
return DbChain.table(PLUG).select()
.where(PLUG.ID.eq(id))
.oneAs(PlugVo.class);
});
return R.ok(vo);
}
/**
* 新增插件
*
* @param bo 请求参数
* @return {@link R }<{@link Void }>
* @author DB
* @since 2024/1/5
*/
@Operation(summary = "新增插件")
@PostMapping("/insertPlug")
public R<Void> insertPlug(@RequestBody @Validated PlugBo bo) {
DataSourceKey.use("jambox", () -> {
//检查标签是否存在
DbChain dbChain = DbChain.table(PLUG);
long count = dbChain.where(PLUG.PLUG_TAG.eq(bo.getPlugTag())).count();
if (count > 0) {
throw new ServiceException("标签已存在,请重新输入!");
}
Plug plug = BeanUtil.toBean(bo, Plug.class);
plug.setId(IdUtil.getSnowflakeNextIdStr());
plug.setCreateTime(LocalDateTime.now());
plug.setCreateUserId(StpUtil.getLoginIdDefaultNull().toString());
plug.setUpdateTime(LocalDateTime.now());
plug.setUpdateUserId(StpUtil.getLoginIdDefaultNull().toString());
dbChain.save(plug);
});
return R.ok();
}
/**
* 修改插件
*
* @param bo 请求参数
* @return {@link R }<{@link Void }>
* @author DB
* @since 2024/1/5
*/
@Operation(summary = "修改插件")
@PutMapping("/updatePlug")
public R<Void> updateStaff(@RequestBody @Validated PlugBo bo) {
DataSourceKey.use("jambox", () -> {
Plug plug = BeanUtil.toBean(bo, Plug.class);
plug.setUpdateTime(LocalDateTime.now());
plug.setUpdateUserId(StpUtil.getLoginIdDefaultNull().toString());
DbChain.table(PLUG).update(plug);
});
return R.ok();
}
/**
* 批量下架插件
*
* @param plugTag 标签
* @return {@link R }<{@link Void }>
* @author DB
* @since 2024/1/5
*/
@SaCheckPermission("brandStore.plugInManager.batchRemoval")
@Operation(summary = "批量下架插件")
@PutMapping("/batchRemovalPlug/{plugTag}")
public R<Void> batchRemovalPlug(@PathVariable String plugTag) {
DataSourceKey.use("jambox", () -> {
DbChain.table(STORE_PLUG).set(STORE_PLUG.IS_VISIBLE, false)
.set(STORE_PLUG.UPDATE_TIME, LocalDateTime.now())
.set(STORE_PLUG.UPDATE_USER_ID, StpUtil.getLoginIdDefaultNull().toString())
.where(STORE_PLUG.PLUG_TAG.eq(plugTag)).update();
});
return R.ok();
}
/**
* 删除插件
*
* @param plugTag 主键
* @return {@link R }<{@link Void }>
* @author DB
* @since 2024/1/5
*/
@Operation(summary = "删除插件")
@DeleteMapping("/removePlugById/{plugTag}")
public R<Void> removeStaffById(@PathVariable String plugTag) {
DataSourceKey.use("jambox", () -> {
//检查是否有校区插件未下架未下架不允许删除插件
long count = DbChain.table(STORE_PLUG).where(STORE_PLUG.PLUG_TAG.eq(plugTag)).count();
if (count > 0) {
throw new ServiceException("该插件有未下架的校区插件,请先批量下架!");
}
DbChain.table(PLUG).set(PLUG.IS_DELETE, true)
.set(PLUG.UPDATE_TIME, LocalDateTime.now())
.set(PLUG.UPDATE_USER_ID, StpUtil.getLoginIdDefaultNull().toString())
.where(PLUG.PLUG_TAG.eq(plugTag)).update();
});
return R.ok();
}
/**
* 查询校区插件列表
*
* @param brandId 品牌id
* @param storeId 校区id
* @return {@link R }<{@link List }<{@link StorePlugListVo }>>
* @author DB
* @since 2024/06/12
*/
@GetMapping("/getStorePlugList")
@Operation(summary = "查询校区插件列表")
public R<List<StorePlugListVo>> getStorePlugList(@Parameter(description = "品牌id") String brandId, @Parameter(description = "校区id") String storeId) {
if (StrUtil.isBlank(brandId) || StrUtil.isBlank(storeId)) {
return R.ok(new ArrayList<StorePlugListVo>());
}
List<StorePlugListVo> list = DataSourceKey.use("jambox", () -> {
//获取所有插件
List<StorePlugListVo> plugList = DbChain.table(PLUG).listAs(StorePlugListVo.class);
if (!plugList.isEmpty()) {
List<Row> rowList = DbChain.table(STORE_PLUG).where(STORE_PLUG.STORE_ID.eq(storeId)).list();
Map<String, Row> plugTagMap = rowList.stream().collect(Collectors.toMap(key -> key.getString("plug_tag"), value -> value));
plugList.forEach(item -> {
if (plugTagMap.get(item.getPlugTag()) != null) {
Row row = plugTagMap.get(item.getPlugTag());
item.setIsOpen(true);
item.setOpenTime(row.getLocalDateTime("create_time"));
item.setIsVisible(row.getBoolean("is_visible"));
} else {
item.setIsOpen(false);
item.setIsVisible(false);
}
item.setStoreId(storeId);
});
return plugList;
} else {
return new ArrayList<StorePlugListVo>();
}
});
return R.ok(list);
}
/**
* 插件可见开启与关闭
*
* @param bo
* @return {@link R }<{@link Void }>
* @author DB
* @since 2024/06/12
*/
@PutMapping("/changePlugOpen")
@Operation(summary = "插件开启与关闭")
public R<Void> changePlugOpen(@RequestBody @Validated ChangePlugOpenBo bo) {
StorePlug storePlug = BeanUtil.toBean(bo, StorePlug.class);
DataSourceKey.use("jambox", () -> {
DbChain dbChain = DbChain.table(STORE_PLUG);
LocalDateTime now = LocalDateTime.now();
storePlug.setUpdateTime(now);
storePlug.setUpdateUserId(StpUtil.getLoginIdDefaultNull().toString());
if (StrUtil.isBlank(bo.getId())){
storePlug.setId(IdUtil.getSnowflakeNextIdStr()).setOpenTime(now);
storePlug.setCreateTime(now);
storePlug.setCreateUserId(StpUtil.getLoginIdDefaultNull().toString());
dbChain.save(storePlug);
} else {
DbChain.table(STORE_PLUG).update(storePlug);
}
});
return R.ok();
}
/**
* 插件开启与关闭
*
* @param bo
* @return {@link R }<{@link Void }>
* @author DB
* @since 2024/06/12
*/
@PutMapping("/changePlugVisible")
@Operation(summary = "插件开启与关闭")
public R<Void> changePlugVisible(@RequestBody @Validated ChangePlugVisibleBo bo) {
StorePlug storePlug = BeanUtil.toBean(bo, StorePlug.class);
DataSourceKey.use("jambox", () -> {
DbChain dbChain = DbChain.table(STORE_PLUG);
LocalDateTime now = LocalDateTime.now();
storePlug.setUpdateTime(now);
storePlug.setUpdateUserId(StpUtil.getLoginIdDefaultNull().toString());
if (StrUtil.isBlank(bo.getId())){
storePlug.setId(IdUtil.getSnowflakeNextIdStr());
storePlug.setCreateTime(now);
storePlug.setCreateUserId(StpUtil.getLoginIdDefaultNull().toString());
dbChain.save(storePlug);
} else {
DbChain.table(STORE_PLUG).update(storePlug);
}
});
return R.ok();
}
}

View File

@ -0,0 +1,118 @@
package com.cpop.oam.business.controller.backstage;
import com.cpop.core.base.entity.R;
import com.cpop.oam.business.bo.StoreRunOffBo;
import com.cpop.oam.business.bo.StoreSignRenewPageBo;
import com.cpop.oam.business.bo.StoreSignRenewXmlBo;
import com.cpop.oam.business.vo.StoreSignRenewPageVo;
import com.mybatisflex.core.paginate.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.io.IOException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
/**
* 校区-签约表 控制层
*
* @author DB
* @since 2023-12-13
*/
@RestController
@Tag(name = "校区签约续费接口")
@RequestMapping("/backstage/storeSignRenew")
public class BackstageStoreSignController {
/**
* 获取校区签约续费分页
* @author DB
* @since 2024/3/7
* @return R<Page<StorePageVo>>
*/
@GetMapping("/getStoreSignRenewPage")
@Operation(summary = "获取校区签约续费分页")
public R<Page<StoreSignRenewPageVo>> getStoreSignRenewPage(StoreSignRenewPageBo bo) {
// PageDomain pageDomain = SqlUtils.getInstance().getPageDomain();
// QueryWrapper queryWrapper = QueryWrapper.create();
// if (StrUtil.isNotBlank(bo.getAddrOrName())){
// queryWrapper.and(STORE.LICENSE_ADDR.like(bo.getAddrOrName()).or(STORE.LICENSE_FIRM_NAME.like(bo.getAddrOrName())));
// }
// if (StrUtil.isNotBlank(bo.getBrandOrStore())){
// queryWrapper.and(BRAND.BRAND_NAME.like(bo.getBrandOrStore()).or(STORE.STORE_NAME.like(bo.getBrandOrStore())));
// }
// switch (bo.getRenewStatus()){
// //待续费
// case 0:
// queryWrapper.and(subDate(STORE_SIGN.EXPIRE_DATE, number(90)).le(now())).and(STORE_SIGN.IS_LOSS.eq(false));
// break;
// //已续费
// case 1:
// if (bo.getStartDate() != null && bo.getEndDate() != null) {
// queryWrapper.and(dateFormat(STORE_RENEW.CREATE_TIME, "%Y-%m-%d").between(bo.getStartDate(), bo.getEndDate()));
// }
// return SpringUtils.getBean(StoreRenewService.class).getMapper().paginateAs(Page.of(pageDomain.getPage(), pageDomain.getPageSize()), queryWrapper
// .select(BRAND.BRAND_NAME)
// .select(STORE.CREATE_TIME.as(StoreSignRenewPageVo::getCreateTime), STORE.PERSON_CHARGE_NAME, STORE.PERSON_CHARGE_PHONE, STORE.STORE_NAME)
// .select(STORE_SIGN.EXPIRE_DATE, STORE_SIGN.ID)
// .select(STORE.LICENSE_ADDR, STORE.LICENSE_FIRM_NAME, STORE.LICENSE_USERNAME)
// .select(STORE_RENEW.CREATE_TIME, STORE_RENEW.AMOUNT)
// .from(STORE_RENEW)
// .leftJoin(STORE).on(STORE.ID.eq(STORE_RENEW.STORE_ID))
// .leftJoin(BRAND).on(BRAND.ID.eq(STORE.BRAND_ID))
// .leftJoin(STORE_SIGN).on(STORE_SIGN.STORE_ID.eq(STORE.ID)),
// StoreSignRenewPageVo.class);
// //已流失
// default:
// queryWrapper.and(STORE_SIGN.IS_LOSS.eq(true));
// }
// return this.mapper.paginateAs(Page.of(pageDomain.getPage(), pageDomain.getPageSize()), queryWrapper
// .select(BRAND.BRAND_NAME)
// .select(STORE.CREATE_TIME.as(StoreSignRenewPageVo::getCreateTime), STORE.PERSON_CHARGE_NAME, STORE.PERSON_CHARGE_PHONE, STORE.STORE_NAME)
// .select(STORE.LICENSE_ADDR, STORE.LICENSE_FIRM_NAME, STORE.LICENSE_USERNAME)
// .select(STORE_RENEW.CREATE_TIME, STORE_RENEW.AMOUNT)
// .leftJoin(STORE).on(STORE.ID.eq(STORE_SIGN.STORE_ID))
// .leftJoin(BRAND).on(BRAND.ID.eq(STORE.BRAND_ID))
// .leftJoin(STORE_RENEW).on(STORE_RENEW.STORE_ID.eq(STORE.ID)),
// StoreSignRenewPageVo.class);
// return R.ok(page);
return R.ok();
}
/**
* 机构/店铺流失
* @author DB
* @since 2023/12/14
* @param bo 请求参数
* @return R<Void>
*/
@PostMapping("/runOff")
@Operation(summary = "机构流失")
public R<Void> runOff(@RequestBody @Validated StoreRunOffBo bo) {
//storeSignService.runOff(bo);
return R.ok();
}
/**
* 获取签约续费导出数据
* @author DB
* @since 2023/12/14
* @param response 响应
* @param bo 请求参数
*/
@PostMapping("/getSignRenewXml")
@Operation(summary = "获取签约续费导出数据")
public void getRenewXml(HttpServletResponse response, @RequestBody @Validated StoreSignRenewXmlBo bo) throws IOException {
// 这里注意 有同学反应使用swagger 会导致各种问题请直接用浏览器或者用postman
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setCharacterEncoding("utf-8");
// 这里URLEncoder.encode可以防止中文乱码 当然和easyExcel没有关系
String fileName = URLEncoder.encode("已续费数据", StandardCharsets.UTF_8).replaceAll("\\+", "%20");
response.setHeader("Content-disposition", "attachment;filename*=" + fileName + ".xlsx");
//EasyExcel.write(response.getOutputStream(), StoreRenewDto.class).sheet("记录").doWrite(storeSignService.getSignRenewXml(bo));
}
}

View File

@ -1,4 +1,4 @@
package com.cpop.system.business.dto;
package com.cpop.oam.business.dto;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;

View File

@ -0,0 +1,95 @@
package com.cpop.oam.business.entity;
import com.cpop.core.base.entity.BaseEntity;
import com.cpop.core.base.entity.BaseInsertListener;
import com.cpop.core.base.entity.BaseUpdateListener;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import lombok.*;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* oam支付订单 实体类
*
* @author DB
* @since 2024-06-05
*/
@Data
@EqualsAndHashCode(callSuper=false)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Table(value = "cp_sys_order", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false)
public class Order extends BaseEntity implements Serializable {
/**
* 主键
*/
@Id
private String id;
/**
* 购买的商品信息
*/
private String orderContent;
/**
* 支付状态(0:待付款;1:待发货;2:待确认;3:已完成;4:退款/售后中:5:订单取消;6:过期)
*/
private Integer orderStatus;
/**
* 外部订单号
*/
private String outOrderNo;
/**
* 品牌id
*/
private String brandId;
/**
* 校区id
*/
private String storeId;
/**
* 产品/课卡id
*/
private String productId;
/**
* 总金额
*/
private BigDecimal totalAmount;
/**
* 总支付金额
*/
private BigDecimal totalPayAmount;
/**
* 订单类型(枚举)
*/
private String orderType;
/**
* 支付二维码
*/
private String payQrCode;
/**
* 逻辑删除0否1是
*/
@Column(isLogicDelete = true)
private Boolean isDelete;
}

View File

@ -1,4 +1,4 @@
package com.cpop.system.business.entity;
package com.cpop.oam.business.entity;
import com.cpop.core.base.entity.BaseEntity;
import com.cpop.core.base.entity.BaseInsertListener;
@ -6,15 +6,16 @@ import com.cpop.core.base.entity.BaseUpdateListener;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import lombok.*;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* 系统分账表 实体类
* 果酱插件 实体类
*
* @author DB
* @since 2023-10-27
* @since 2024-06-12
*/
@Data
@EqualsAndHashCode(callSuper=false)
@ -22,8 +23,8 @@ import lombok.experimental.Accessors;
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Table(value = "cp_sys_profit_sharing", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false)
public class ProfitSharing extends BaseEntity implements Serializable {
@Table(value = "j_sys_plug", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false)
public class Plug extends BaseEntity implements Serializable {
/**
* 主键
@ -32,34 +33,34 @@ public class ProfitSharing extends BaseEntity implements Serializable {
private String id;
/**
* 外部分账单号
* 插件名
*/
private String outProfitSharingId;
private String name;
/**
* 订单id
* 插件标签
*/
private String orderId;
private String plugTag;
/**
* 订单来源
* 插件图标地址
*/
private String orderSource;
private String picUrl;
/**
* 分账金额单位分
* 排序
*/
private Long amount;
private Integer orderNo;
/**
* 支付账号信息
* 备注
*/
private String payAccount;
private String remark;
/**
* 分账状态(0:分账中;1:分账成功;2;分账退款)
* 状态(0:禁用;1:使用)
*/
private Integer profitSharingStatus;
private Integer status;
/**
* 逻辑删除0否1是

View File

@ -0,0 +1,60 @@
package com.cpop.oam.business.entity;
import com.cpop.core.base.entity.BaseEntity;
import com.cpop.core.base.entity.BaseInsertListener;
import com.cpop.core.base.entity.BaseUpdateListener;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import lombok.*;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* 校区-插件记录表 实体类
*
* @author DB
* @since 2024-06-12
*/
@Data
@EqualsAndHashCode(callSuper=false)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Table(value = "j_sys_store_plug", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false)
public class StorePlug extends BaseEntity implements Serializable {
/**
* 主键
*/
@Id
private String id;
/**
* 校区id
*/
private String storeId;
/**
* 插件标记
*/
private String plugTag;
/**
* 是否可见
*/
private Boolean isVisible;
/**
* 启用时间
*/
private LocalDateTime openTime;
/**
* 是否启用
*/
private Boolean isOpen;
}

View File

@ -1,4 +1,4 @@
package com.cpop.system.business.entity;
package com.cpop.oam.business.entity;
import com.cpop.core.base.entity.BaseEntity;
import com.cpop.core.base.entity.BaseInsertListener;
@ -6,26 +6,27 @@ import com.cpop.core.base.entity.BaseUpdateListener;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import lombok.*;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import lombok.*;
import lombok.experimental.Accessors;
/**
* 校区续费表 实体类
* 签约续费 实体类
*
* @author DB
* @since 2023-12-14
* @since 2024-03-07
*/
@Data
@EqualsAndHashCode(callSuper = false)
@EqualsAndHashCode(callSuper=false)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Table(value = "j_sys_store_renew", dataSource = "jambox", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false)
@Table(value = "j_sys_store_renew", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false)
public class StoreRenew extends BaseEntity implements Serializable {
/**

View File

@ -0,0 +1,14 @@
package com.cpop.oam.business.mapper;
import com.mybatisflex.core.BaseMapper;
import com.cpop.oam.business.entity.Order;
/**
* oam支付订单 映射层
*
* @author DB
* @since 2024-06-05
*/
public interface OrderMapper extends BaseMapper<Order> {
}

View File

@ -0,0 +1,14 @@
package com.cpop.oam.business.service;
import com.mybatisflex.core.service.IService;
import com.cpop.oam.business.entity.Order;
/**
* oam支付订单 服务层
*
* @author DB
* @since 2024-06-05
*/
public interface OrderService extends IService<Order> {
}

View File

@ -0,0 +1,18 @@
package com.cpop.oam.business.service.impl;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import com.cpop.oam.business.entity.Order;
import com.cpop.oam.business.mapper.OrderMapper;
import com.cpop.oam.business.service.OrderService;
import org.springframework.stereotype.Service;
/**
* oam支付订单 服务层实现
*
* @author DB
* @since 2024-06-05
*/
@Service("orderService")
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements OrderService {
}

View File

@ -1,15 +1,14 @@
package com.cpop.oam.business.service.impl;
import cn.binarywang.wx.miniapp.api.WxMaQrcodeService;
import cn.binarywang.wx.miniapp.api.WxMaService;
import cn.dev33.satoken.stp.StpUtil;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.extra.qrcode.QrCodeUtil;
import cn.hutool.extra.qrcode.QrConfig;
import com.cpop.api.tencent.wxWork.handler.WebHookSendHandler;
import com.cpop.core.base.entity.PageDomain;
import com.cpop.core.base.exception.ServiceException;
import com.cpop.core.base.table.Config;
import com.cpop.core.constant.Constants;
import com.cpop.core.service.ConfigService;
import com.cpop.core.service.RedisService;
import com.cpop.core.utils.SpringUtils;
@ -17,33 +16,47 @@ import com.cpop.core.utils.SqlUtils;
import com.cpop.oam.business.bo.TaskDemandBo;
import com.cpop.oam.business.bo.TaskDemandPageBo;
import com.cpop.oam.business.bo.TaskDemandUrgentBo;
import com.cpop.oam.business.entity.Order;
import com.cpop.oam.business.entity.Task;
import com.cpop.oam.business.entity.TaskDemand;
import com.cpop.oam.business.mapper.TaskDemandMapper;
import com.cpop.oam.business.service.CommonService;
import com.cpop.oam.business.service.OrderService;
import com.cpop.oam.business.service.TaskDemandService;
import com.cpop.oam.business.service.TaskService;
import com.cpop.oam.business.vo.TaskDemandPageVo;
import com.cpop.oam.business.vo.TaskDemandUrgentVo;
import com.cpop.oam.framework.constant.WebHookKeyConstant;
import com.cpop.oam.framework.enums.OamConfigEnum;
import com.cpop.oam.framework.enums.OrderType;
import com.cpop.oam.framework.handler.tencentCos.TencentCosHandler;
import com.cpop.pay.framewok.config.wxPay.WxPayConfiguration;
import com.cpop.pay.framewok.handler.wxPay.WxPayHandler;
import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderV3Request;
import com.github.binarywang.wxpay.bean.result.WxPayUnifiedOrderResult;
import com.github.binarywang.wxpay.bean.result.enums.TradeTypeEnum;
import com.github.binarywang.wxpay.exception.WxPayException;
import com.github.binarywang.wxpay.service.WxPayService;
import com.mybatisflex.core.datasource.DataSourceKey;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.core.row.DbChain;
import com.mybatisflex.core.row.Row;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import me.chanjar.weixin.common.error.WxErrorException;
import com.qcloud.cos.model.UploadResult;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.awt.*;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Base64;
import java.util.List;
import static com.cpop.core.base.table.table.UserTableDef.USER;
import static com.cpop.oam.business.entity.table.BrandTableDef.BRAND;
import static com.cpop.oam.business.entity.table.OrderTableDef.ORDER;
import static com.cpop.oam.business.entity.table.StaffTableDef.STAFF;
import static com.cpop.oam.business.entity.table.StoreTableDef.STORE;
import static com.cpop.oam.business.entity.table.TaskDemandTableDef.TASK_DEMAND;
@ -269,24 +282,86 @@ public class TaskDemandServiceImpl extends ServiceImpl<TaskDemandMapper, TaskDem
Task task = taskService.getById(demand.getTaskId());
taskDemandUrgentVo.setTaskRating(task.getTaskRating());
if (!task.getIsUrgent()){
WxMaQrcodeService qrcodeService = SpringUtils.getBean(WxMaService.class).getQrcodeService();
try {
// 获取当前执行环境
String active = SpringUtils.getActiveProfile();
byte[] qrCodeBytes = qrcodeService.createWxaCodeUnlimitBytes(bo.getId(), "pages/index/index", false, StrUtil.equals(active, "prod") ? "release" : "trial", 430,
true, null, false);
Base64.Encoder encoder = Base64.getEncoder();
String qrCode = encoder.encodeToString(qrCodeBytes);
//存在本地
this.updateChain().set(TASK_DEMAND.PAY_QR_CODE, Constants.QRCODE_HEADER + qrCode)
.where(TASK_DEMAND.ID.eq(bo.getId())).update();
//更新任务
taskService.updateChain().set(TASK.IS_URGENT,true).where(TASK.ID.eq(demand.getTaskId())).update();
taskDemandUrgentVo.setPayQrCode(Constants.QRCODE_HEADER + qrCode);
} catch (WxErrorException e) {
throw new ServiceException("生成支付码失败");
//查询订单
OrderService orderService = SpringUtils.getBean(OrderService.class);
Order order = orderService.queryChain().where(ORDER.PRODUCT_ID.eq(demand.getId())).one();
if (order == null) {
//预创建订单
order = new Order();
order.setOrderContent(task.getTaskContent())
.setBrandId(demand.getBrandId())
.setStoreId(demand.getStoreId())
.setOrderStatus(0)
.setProductId(demand.getId())
.setTotalAmount(taskRatingToAmount(task.getTaskRating()))
.setTotalPayAmount(BigDecimal.ZERO)
.setOrderType(OrderType.System.TASK_DEMAND_PAY.getName());
orderService.save(order);
}
WxPayService normalWxPayService = SpringUtils.getBean(WxPayHandler.class).getNormalWxPayService();
WxPayConfiguration wxPayConfiguration = SpringUtils.getBean(WxPayConfiguration.class);
WxPayUnifiedOrderV3Request wxPayUnifiedOrderV3Request = new WxPayUnifiedOrderV3Request();
//金额
WxPayUnifiedOrderV3Request.Amount amount = new WxPayUnifiedOrderV3Request.Amount();
amount.setCurrency("CNY").setTotal(order.getTotalAmount().scaleByPowerOfTen(2).intValue());
wxPayUnifiedOrderV3Request.setDescription(task.getTaskContent()).setOutTradeNo(order.getId())
.setNotifyUrl(wxPayConfiguration.getProperties().getBackstagePayNotifyUrl())
.setAmount(amount);
WxPayUnifiedOrderResult result;
try {
result = normalWxPayService.createOrderV3(TradeTypeEnum.NATIVE, wxPayUnifiedOrderV3Request);
} catch (WxPayException e) {
throw new ServiceException(e.getMessage());
}
QrConfig qrConfig = QrConfig.create();
qrConfig.setBackColor(Color.WHITE);
qrConfig.setForeColor(Color.BLACK);
byte[] longUrls = QrCodeUtil.generatePng(result.getCodeURL(), qrConfig);
ByteArrayInputStream inputStream = new ByteArrayInputStream(longUrls);
TencentCosHandler tencentCosHandler = SpringUtils.getBean(TencentCosHandler.class);
UploadResult uploadResult = tencentCosHandler.uploadInputStream(inputStream, "png");
//存在本地
String qrUrl = "https://" + uploadResult.getBucketName() + tencentCosHandler.getCdnUrl() + uploadResult.getKey();
this.updateChain().set(TASK_DEMAND.PAY_QR_CODE,qrUrl )
.where(TASK_DEMAND.ID.eq(bo.getId())).update();
//更新任务
taskService.updateChain().set(TASK.IS_URGENT,true).where(TASK.ID.eq(demand.getTaskId())).update();
taskDemandUrgentVo.setPayQrCode(qrUrl);
}
return taskDemandUrgentVo;
}
/**
* 任务等级换金额
*
* @param taskRating 任务等级
* @return {@link BigDecimal }
* @author DB
* @since 2024/06/05
*/
private BigDecimal taskRatingToAmount(String taskRating) {
switch (taskRating) {
case "A" -> {
return BigDecimal.valueOf(3000);
}
case "B" -> {
return BigDecimal.valueOf(1500);
}
case "C" -> {
return BigDecimal.valueOf(700);
}
case "D" -> {
return BigDecimal.valueOf(500);
}
case "E" -> {
return BigDecimal.valueOf(300);
}
case "F" -> {
return BigDecimal.valueOf(100);
}
default -> {
return BigDecimal.valueOf(100);
}
}
}
}

View File

@ -21,11 +21,8 @@ import com.cpop.oam.framework.constant.WebHookKeyConstant;
import com.cpop.oam.framework.enums.OamConfigEnum;
import com.cpop.oam.framework.enums.QuartzEnums;
import com.cpop.oam.framework.tasks.*;
import com.mybatisflex.core.datasource.DataSourceKey;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.core.row.DbChain;
import com.mybatisflex.core.row.Row;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.quartz.*;
@ -43,7 +40,6 @@ import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAdjusters;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
import static com.cpop.core.base.table.table.UserTableDef.USER;
@ -93,9 +89,14 @@ public class TaskWorkOrderServiceImpl extends ServiceImpl<TaskWorkOrderMapper, T
TASK_WORK_ORDER.STORE_ID)
// 任务
.select(TASK.TASK_CONTENT, TASK.TASK_STATUS, TASK.RESPONSIBLE_STAFF_ID, TASK.TASK_RECEIPT_TIME, TASK.RECORD_STAFF_ID)
//品牌
.select(BRAND.BRAND_NAME)
//校区
.select(STORE.STORE_NAME)
.from(TASK_WORK_ORDER)
.leftJoin(TASK)
.on(TASK.ID.eq(TASK_WORK_ORDER.TASK_ID))
.leftJoin(TASK).on(TASK.ID.eq(TASK_WORK_ORDER.TASK_ID))
.leftJoin(BRAND).on(BRAND.ID.eq(TASK_WORK_ORDER.BRAND_ID))
.leftJoin(STORE).on(STORE.ID.eq(TASK_WORK_ORDER.STORE_ID))
// 工单
.where(TASK.TASK_TYPE.eq(2))
.and(TASK.TASK_STATUS.in(1, 2, 4, 5, 6, 7)),
@ -117,31 +118,6 @@ public class TaskWorkOrderServiceImpl extends ServiceImpl<TaskWorkOrderMapper, T
.from(STAFF)
.where(STAFF.ID.eq(StrUtil.isNotBlank(pauseStaff.getPauseStaffId()) ? pauseStaff.getPauseStaffId() : "-1")))
);
if (dtoList.isEmpty()){
return new TaskWorkOrderReceiveDealPauseVo();
}
//跨库数据查询
AtomicReference<Map<String, Row>> storeAndBrandMap = new AtomicReference<>();
try {
DataSourceKey.use("jambox", () -> {
storeAndBrandMap.set(DbChain.table(STORE)
.select(BRAND.ID.as("brandId"), BRAND.BRAND_NAME.as("storeName"), STORE.ID.as("storeId"), STORE.STORE_NAME.as("brandName"))
.from(STORE)
.leftJoin(BRAND).on(BRAND.ID.eq(STORE.BRAND_ID))
.where(STORE.ID.in(dtoList.stream().map(TaskWorkOrderReceiveDealPauseDto::getStoreId).toList()))
.list()
.stream().collect(Collectors.toMap(row -> row.getString("storeId"), row -> row)));
});
} finally {
DataSourceKey.clear();
}
dtoList.forEach(item->{
Row row = storeAndBrandMap.get().get(item.getStoreId());
if (row != null){
item.setStoreName(row.getString("storeName"));
item.setBrandName(row.getString("brandName"));
}
});
// 分组过滤
Map<Integer, List<TaskWorkOrderReceiveDealPauseDto>> taskStatusMap = dtoList.stream().collect(Collectors.groupingBy(TaskWorkOrderReceiveDealPauseDto::getTaskStatus));
TaskWorkOrderReceiveDealPauseVo taskWorkOrderReceiveDealPauseVo = new TaskWorkOrderReceiveDealPauseVo();

View File

@ -1,21 +1,19 @@
package com.cpop.system.business.vo;
package com.cpop.oam.business.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.cpop.core.anno.StringArrayConvert;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
/**
* Description:
* date: 2023/6/1 18:08
* @author DB
* @version 1.0.0
* @since 2024-06-07 13:56
*/
@Data
@Accessors(chain = true)
@Schema(description = "品牌分页返回对象")
public class BrandPageVo {
@Schema(description = "品牌详情对象")
public class BrandInfoVo {
/**
* 主键
@ -29,19 +27,19 @@ public class BrandPageVo {
@Schema(description = "品牌名")
private String brandName;
/**
* 品牌logo
*/
@StringArrayConvert
@Schema(description = "品牌logo")
private String brandLogo;
/**
* 微信商户号
*/
@Schema(description = "微信商户号")
private String wxMchId;
/**
* 创建时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
@Schema(description = "创建时间")
private LocalDateTime createTime;
/**
* 品牌总部地址
*/
@ -57,6 +55,7 @@ public class BrandPageVo {
/**
* 总部营业执照图片地址
*/
@StringArrayConvert
@Schema(description = "总部营业执照图片地址")
private String licensePicUrl;
@ -89,4 +88,11 @@ public class BrandPageVo {
*/
@Schema(description = "总部营业执照日期")
private String licenseDate;
/**
* 授权产品
*/
@StringArrayConvert
@Schema(description = "授权产品")
private String authProduct;
}

View File

@ -0,0 +1,57 @@
package com.cpop.oam.business.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
/**
* Description:
* date: 2023/6/1 18:08
* @author DB
*/
@Data
@Accessors(chain = true)
@Schema(description = "品牌分页返回对象")
public class BrandPageVo {
/**
* 主键
*/
@Schema(description = "主键")
private String id;
/**
* 云函数id
*/
@Schema(description = "品牌名")
private String brandName;
/**
* 品牌logo
*/
@Schema(description = "品牌logo")
private String brandLogo;
/**
* 微信商户号
*/
@Schema(description = "微信商户号")
private String wxMchId;
/**
* 创建时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
@Schema(description = "创建时间")
private LocalDateTime createTime;
/**
* 品牌总部地址
*/
@Schema(description = "品牌总部地址")
private String brandAddr;
}

View File

@ -0,0 +1,54 @@
package com.cpop.oam.business.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* 果酱插件
* @author DB
* @version 1.0.0
* @since 2024-01-05 10:33
*/
@Data
@Accessors(chain = true)
@Schema(description = "PlugPageVo对象")
public class PlugPageVo {
/**
* 主键
*/
@Schema(description = "主键")
private String id;
/**
* 插件名
*/
@Schema(description = "插件名")
private String name;
/**
* 备注
*/
@Schema(description = "备注")
private String remark;
/**
* 插件标签
*/
@Schema(description = "插件标签")
private String plugTag;
/**
* 排序
*/
@Schema(description = "排序")
private Integer orderNo;
/**
* 状态(0:禁用;1:使用)
*/
@Schema(description = "状态(0:禁用;1:使用)")
private Integer status;
}

View File

@ -0,0 +1,58 @@
package com.cpop.oam.business.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* @author DB
* @version 1.0.0
* @since 2024-01-05 13:48
*/
@Data
@Accessors(chain = true)
@Schema(description = "PlugPageVo对象")
public class PlugVo {
/**
* 主键
*/
@Schema(description = "主键")
private String id;
/**
* 插件名
*/
@Schema(description = "插件名")
private String name;
/**
* 插件标签
*/
@Schema(description = "插件标签")
private String plugTag;
/**
* 插件图标地址
*/
@Schema(description = "插件图标地址")
private String picUrl;
/**
* 排序
*/
@Schema(description = "排序")
private Integer orderNo;
/**
* 备注
*/
@Schema(description = "备注")
private String remark;
/**
* 状态(0:禁用;1:使用)
*/
@Schema(description = "状态(0:禁用;1:使用)")
private Integer status;
}

View File

@ -1,11 +1,12 @@
package com.cpop.system.business.vo;
package com.cpop.oam.business.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.time.LocalDate;
import java.sql.Date;
import java.time.LocalDateTime;
/**
@ -66,7 +67,7 @@ public class StorePageVo implements Serializable {
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@Schema(description = "到期日期")
private LocalDate expireDate;
private Date expireDate;
/**
* 微信商户号

View File

@ -0,0 +1,82 @@
package com.cpop.oam.business.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
/**
* @author DB
* @version 1.0.0
* @since 2023-12-29 16:36
*/
@Data
@Accessors(chain = true)
@Schema(description = "StorePlugListVo对象")
public class StorePlugListVo {
/**
* 主键
*/
@Schema(description = "主键")
private String id;
/**
* 插件名
*/
@Schema(description = "插件名")
private String name;
/**
* 备注
*/
@Schema(description = "备注")
private String remark;
/**
* 插件标签
*/
@Schema(description = "插件标签")
private String plugTag;
/**
* 排序
*/
@Schema(description = "排序")
private Integer orderNo;
/**
* 是否开启
*/
@Schema(description = "是否开启")
private Boolean isOpen;
/**
* 上架时间
*/
@Schema(description = "上架时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private LocalDateTime updateTime;
/**
* 开启时间
*/
@Schema(description = "开启时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private LocalDateTime openTime;
/**
* 校区id
*/
@Schema(description = "校区id")
private String storeId;
/**
* 是否可见
*/
@Schema(description = "是否可见")
private Boolean isVisible = false;
}

View File

@ -1,4 +1,4 @@
package com.cpop.system.business.vo;
package com.cpop.oam.business.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;

View File

@ -0,0 +1,140 @@
package com.cpop.oam.framework.enums;
import com.mybatisflex.annotation.EnumValue;
import lombok.Getter;
/**
* 订单来源
* @author DB
* @version 1.0.0
* @since 2024-04-16 9:34
*/
public interface OrderType {
/**
* 获取分账比例
* @author DB
* @since 2024/4/17
* @return Double
*/
Double getRate();
/**
* 获取类型
* @author DB
* @since 2024/4/17
* @return Double
*/
String getName();
/**
* 放心学
*/
@Getter
enum EasyLearn implements OrderType {
/**
* 多期支付次付
*/
MULTIPLE_PAY("EasyLearn.MULTIPLE_PAY", 0.06),
/**
* 月付
*/
MONTH_PAY("EasyLearn.MONTH_PAY", 0.06),
/**
* 数字人民币支付
*/
DIGITAL_PAY("EasyLearn.DIGITAL_PAY", null),
/**
* 微信支付
*/
WX_PAY("EasyLearn.WX_PAY", 0.06),
/**
* 趣学赞
*/
FUN_LEARN("EasyLearn.FUN_LEARN", null),
;
@EnumValue
private final String name;
/**
* 分账比例
*/
private final Double rate;
EasyLearn(String name, Double rate) {
this.name = name;
this.rate = rate;
}
}
/**
* 商城
*/
@Getter
enum Mall implements OrderType {
/**
* 微信支付
*/
WX_PAY("Mall.WX_PAY", 0.002),
;
@EnumValue
private final String name;
/**
* 分账比例
*/
private final Double rate;
Mall(String name, Double rate) {
this.name = name;
this.rate = rate;
}
}
/**
* 系统
*/
@Getter
enum System implements OrderType {
/**
* 会员支付
*/
MEMBER_PAY("System.MEMBER_PAY",0.06),
/**
* 校区续费支付
*/
STORE_RENEW_PAY("System.STORE_RENEW_PAY",null),
/**
* 任务需求支付
*/
TASK_DEMAND_PAY("System.TASK_DEMAND_PAY",null),
;
@EnumValue
private final String name;
/**
* 分账比例
*/
private final Double rate;
System(String name, Double rate) {
this.name = name;
this.rate = rate;
}
}
}

View File

@ -140,14 +140,13 @@ public class TencentCosHandler {
public UploadResult cdnUpload(MultipartFile file) {
createTransferManager();
try {
String fileType = FileUtil.getType(file.getResource().getFile());
ObjectMetadata objectMetadata = new ObjectMetadata();
// 上传的流如果能够获取准确的流长度则推荐一定填写 content-length
// 如果确实没办法获取到则下面这行可以省略但同时高级接口也没办法使用分块上传了
objectMetadata.setContentLength(file.getSize());
objectMetadata.setContentType(file.getContentType());
InputStream inputStream = file.getInputStream();
PutObjectRequest putObjectRequest = new PutObjectRequest(properties.getBucketName(), IdUtil.getSnowflakeNextId() + "." + fileType, inputStream, objectMetadata);
PutObjectRequest putObjectRequest = new PutObjectRequest(properties.getBucketName(), uploadHandler.getName(uploadHandler.extractFilename(file)), inputStream, objectMetadata);
// 设置存储类型如有需要不需要请忽略此行代码, 默认是标准(Standard), 低频(standard_ia)
// 更多存储类型请参见 https://cloud.tencent.com/document/product/436/33417
putObjectRequest.setStorageClass(StorageClass.Standard);
@ -238,4 +237,35 @@ public class TencentCosHandler {
throw new UtilException(e.getMessage());
}
}
/**
* 根据输入流上传文件
* @author DB
* @since 2024/5/7
* @param inputStream 数据流
* @param type 类型
* @return UploadResult
*/
public UploadResult uploadInputStream(InputStream inputStream, String type){
createTransferManager();
try {
ObjectMetadata objectMetadata = new ObjectMetadata();
// 上传的流如果能够获取准确的流长度则推荐一定填写 content-length
// 如果确实没办法获取到则下面这行可以省略但同时高级接口也没办法使用分块上传了
objectMetadata.setContentLength(inputStream.readAllBytes().length);
objectMetadata.setContentType(type);
PutObjectRequest putObjectRequest = new PutObjectRequest(properties.getBucketName(), IdUtil.getSnowflakeNextId() + "." + type, inputStream, objectMetadata);
// 设置存储类型如有需要不需要请忽略此行代码, 默认是标准(Standard), 低频(standard_ia)
// 更多存储类型请参见 https://cloud.tencent.com/document/product/436/33417
putObjectRequest.setStorageClass(StorageClass.Standard);
Upload upload = transferManager.upload(putObjectRequest);
UploadResult uploadResult = upload.waitForUploadResult();
inputStream.close();
return uploadResult;
} catch (IOException | InterruptedException e) {
throw new UtilException(e);
} finally {
shutdownTransferManager(transferManager);
}
}
}

View File

@ -2,6 +2,6 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cpop.system.business.mapper.StoreMapper">
<mapper namespace="com.cpop.oam.business.mapper.OrderMapper">
</mapper>

View File

@ -1,50 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.cpop</groupId>
<artifactId>Cpop-Union</artifactId>
<version>1.1.2</version>
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
</parent>
<artifactId>Cpop-System</artifactId>
<name>Cpop-System</name>
<description>Cpop-System</description>
<packaging>jar</packaging>
<dependencies>
<!--核心包-->
<dependency>
<groupId>com.cpop</groupId>
<artifactId>Cpop-Core</artifactId>
</dependency>
<!--API工具包-->
<dependency>
<groupId>com.cpop</groupId>
<artifactId>Cpop-Api</artifactId>
</dependency>
<!--腾讯云SDK-->
<dependency>
<groupId>com.tencentcloudapi</groupId>
<artifactId>tencentcloud-sdk-java</artifactId>
</dependency>
<!-- 腾讯云Api-->
<dependency>
<groupId>com.qcloud</groupId>
<artifactId>cos_api</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,108 +0,0 @@
package com.cpop.system.business.bo;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* @author DB
* @since 2023/10/25 16:43
*/
@Data
@Accessors(chain = true)
@Schema(description = "品牌请求参数")
public class BrandBo {
/**
* 主键
*/
@NotBlank(message = "主键不能为空")
@Schema(description = "主键",requiredMode = Schema.RequiredMode.REQUIRED)
private String id;
/**
* 品牌名
*/
@NotBlank(message = "品牌名不能为空")
@Schema(description = "品牌名",requiredMode = Schema.RequiredMode.REQUIRED)
private String brandName;
/**
* 负责人
*/
@NotBlank(message = "负责人不能为空")
@Schema(description = "负责人",requiredMode = Schema.RequiredMode.REQUIRED)
private String personChargeName;
/**
* 负责人手机号
*/
@NotBlank(message = "负责人手机号不能为空")
@Schema(description = "负责人手机号",requiredMode = Schema.RequiredMode.REQUIRED)
private String personChargePhone;
/**
* 经度
*/
@NotBlank(message = "经度不能为空")
@Schema(description = "经度",requiredMode = Schema.RequiredMode.REQUIRED)
private String longitude;
/**
* 纬度
*/
@NotBlank(message = "纬度不能为空")
@Schema(description = "纬度",requiredMode = Schema.RequiredMode.REQUIRED)
private String latitude;
/**
* 品牌地址
*/
@NotBlank(message = "品牌地址不能为空")
@Schema(description = "品牌地址",requiredMode = Schema.RequiredMode.REQUIRED)
private String brandAddr;
/**
* 总部营业执照地址
*/
@NotBlank(message = "总部营业执照地址不能为空")
@Schema(description = "总部营业执照地址",requiredMode = Schema.RequiredMode.REQUIRED)
private String licenseAddr;
/**
* 总部营业执照日期
*/
@NotBlank(message = "总部营业执照日期不能为空")
@Schema(description = "总部营业执照日期",requiredMode = Schema.RequiredMode.REQUIRED)
private String licenseDate;
/**
* 总部营业执照公司名
*/
@NotBlank(message = "总部营业执照公司名不能为空")
@Schema(description = "总部营业执照公司名",requiredMode = Schema.RequiredMode.REQUIRED)
private String licenseFirmName;
/**
* 总部营业执照法人名
*/
@NotBlank(message = "总部营业执照法人名不能为空")
@Schema(description = "总部营业执照法人名",requiredMode = Schema.RequiredMode.REQUIRED)
private String licenseUsername;
/**
* 营业执照社会信用代码
*/
@NotBlank(message = "总部营业执照社会信用代码不能为空")
@Schema(description = "总部营业执照社会信用代码",requiredMode = Schema.RequiredMode.REQUIRED)
private String licenseCreditCode;
/**
* 总部营业执照图片地址
*/
@NotBlank(message = "总部营业执照图片地址不能为空")
@Schema(description = "总部营业执照图片地址",requiredMode = Schema.RequiredMode.REQUIRED)
private String licensePicUrl;
}

View File

@ -1,112 +0,0 @@
package com.cpop.system.business.bo;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* 系统菜单表Bo
*
* @author DB.lost
* @since 2023-05-10
*/
@Data
@Accessors(chain = true)
@Schema(description = "菜单对象")
public class MenuBo {
/**
* 菜单ID
*/
@Schema(description = "菜单ID")
private String id;
/**
* 父级菜单ID
*/
@Schema(description = "父级菜单ID")
private String parentMenu;
/**
* 菜单名称
*/
@Schema(description = "菜单名称")
private String name;
/**
* 菜单图标
*/
@Schema(description = "菜单图标")
private String icon;
/**
* 菜单路由父菜单为空
*/
@Schema(description = "菜单路由,父菜单为空")
private String component;
/**
* 标记菜单的状态 0:禁用 1启用根据权限正常显示
*/
@NotNull(message = "状态不能为空")
@Schema(description = "标记菜单的状态 0:禁用 1启用根据权限正常显示", requiredMode = Schema.RequiredMode.REQUIRED)
private Boolean status;
/**
* 菜单类型0:目录1:菜单2:按钮
*/
@NotNull(message = "菜单类型不能为空")
@Schema(description = "菜单类型0:目录1:菜单2:按钮", requiredMode = Schema.RequiredMode.REQUIRED)
private Integer type;
/**
* 权限
*/
@Schema(description = "权限")
private String permission;
/**
* 重定向路径一级菜单有值
*/
@Schema(description = "重定向路径,一级菜单有值")
private String redirect;
/**
* 排序值越小越靠前一级菜单有值
*/
@NotNull(message = "排序不能为空")
@Schema(description = "排序,值越小越靠前,一级菜单有值", requiredMode = Schema.RequiredMode.REQUIRED)
private Integer orderNo;
/**
* 路由地址
*/
@Schema(description = "路由地址")
private String path;
/**
* 标题
*/
@NotBlank(message = "标题不能为空")
@Schema(description = "标题", requiredMode = Schema.RequiredMode.REQUIRED)
private String title;
/**
* 隐藏菜单
*/
@Schema(description = "隐藏菜单")
private Boolean hideMenu;
/**
* 是否忽略KeepAlive缓存
*/
@NotNull(message = "是否忽略KeepAlive缓存不能为空")
@Schema(description = "是否忽略KeepAlive缓存")
private Boolean ignoreKeepAlive;
}

View File

@ -1,30 +0,0 @@
package com.cpop.system.business.bo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* Description:
* date: 2023/4/25 18:01
* @author ST
*/
@Data
@Accessors(chain = true)
@Schema(description = "菜单传入对象")
public class MenuListBo {
/**
* 标题
*/
@Schema(description = "标题")
private String title;
/**
* 标记菜单的状态 0:禁用 1启用根据权限正常显示
*/
@Schema(description = "标记菜单的状态 0:禁用 1启用根据权限正常显示")
private Boolean status;
}

View File

@ -1,68 +0,0 @@
package com.cpop.system.business.bo;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;
import java.util.List;
/**
* 系统角色表Bo
*
* @author DB.lost
* @since 2023-05-10
*/
@Data
@Accessors(chain = true)
@Schema(description = "角色对象")
public class RoleBo {
/**
* 主键
*/
@Schema(description = "主键")
private String id;
/**
* 角色名称
*/
@NotBlank(message = "角色名称不能为空")
@Schema(description = "角色名称")
private String roleName;
/**
* 角色值
*/
@NotBlank(message = "角色值不能为空")
@Schema(description = "角色值")
private String roleValue;
/**
* 状态
*/
@NotNull(message = "状态不能为空")
@Schema(description = "状态")
private Boolean status;
/**
* 备注
*/
@Schema(description = "备注")
private String remark;
/**
* 排序
*/
@NotNull(message = "排序不能为空")
@Schema(description = "排序")
private Integer orderNo;
/**
* 菜单集合
*/
@Schema(description = "菜单集合")
private List<String> menuIds;
}

View File

@ -1,29 +0,0 @@
package com.cpop.system.business.bo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* @since 2023/5/9 13:58
* @author DB
*/
@Data
@Accessors(chain = true)
@Schema(description = "SysRole分页对象")
public class RolePageBo {
/**
* 角色名称
*/
@Schema(description = "角色名称")
private String roleName;
/**
* 状态
*/
@Schema(description = "状态")
private Boolean status;
}

View File

@ -1,35 +0,0 @@
package com.cpop.system.business.bo;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* Description:
* date: 2023/5/9 14:12
*
* @Author DB
*/
@Data
@Accessors(chain = true)
@Schema(description = "角色状态对象")
public class RoleStatusBo {
/**
* 主键
*/
@NotBlank(message = "id不能为空")
@Schema(description = "主键",requiredMode = Schema.RequiredMode.REQUIRED)
private String id;
/**
* 状态
*/
@NotNull(message = "状态不能为空")
@Schema(description = "状态",requiredMode = Schema.RequiredMode.REQUIRED)
private Boolean status;
}

View File

@ -1,109 +0,0 @@
package com.cpop.system.business.controller.backstage;
import cn.hutool.core.bean.BeanUtil;
import com.cpop.core.base.entity.R;
import com.cpop.system.business.bo.BrandBo;
import com.cpop.system.business.vo.BrandPageVo;
import com.mybatisflex.core.paginate.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.beans.factory.annotation.Autowired;
import com.cpop.system.business.entity.Brand;
import com.cpop.system.business.service.BrandService;
import org.springframework.web.bind.annotation.RestController;
/**
* 系统-品牌表 控制层
*
* @author DB
* @since 2023-10-25
*/
@RestController
@Tag(name = "品牌接口")
@RequestMapping("/backstage/brand")
public class BackstageBrandController {
@Autowired
private BrandService brandService;
/**
* 新增品牌
* @author DB
* @since 2023/10/25 16:53
* @param bo 品牌参数
* @return com.cpop.core.base.entity.R<java.lang.Void>
*/
@PostMapping("/insertSysBrand")
@Operation(summary = "新增品牌")
@Deprecated(since = "1.1.0")
public R<Void> insertSysBrand(@RequestBody @Parameter(description = "品牌") @Validated BrandBo bo) {
return R.fail("新增品牌接口已废弃");
}
/**
* 修改品牌
*
* @param bo 品牌参数
* @return com.cpop.core.base.entity.R<java.lang.Void>
* @author DB
* @since 2023/11/10 9:21
*/
@Operation(summary = "修改品牌")
@PutMapping("/updateSysBrand")
public R<Void> updateSysBrand(@RequestBody @Parameter(description = "品牌") @Validated BrandBo bo) {
Brand entity = BeanUtil.toBean(bo, Brand.class);
brandService.updateById(entity);
return R.ok();
}
/**
* 导入果酱品牌
* @author DB
* @since 2023/10/25 15:53
* @param brandId 果酱品牌信息
*/
@PostMapping("/importJamboxBrand/{brandId}")
@Operation(summary = "导入果酱品牌")
@Deprecated(since = "1.1.0")
public R<Void> importJamboxBrand(@PathVariable String brandId) {
return R.fail("导入果酱品牌接口已废弃");
}
/**
* 查询品牌分页列表
* @author DB
* @since 2023/09/13 17:55
* @param brandName 请求参数
* @return com.cpop.core.base.entity.R<com.mybatisflex.core.paginate.Page<com.cpop.system.business.vo.BrandPageVo>>
*/
@Operation(summary = "查询品牌分页列表")
@GetMapping("/getBrandPage")
public R<Page<BrandPageVo>> getBrandPageList(String brandName) {
Page<BrandPageVo> pageVo = brandService.getBrandPage(brandName);
return R.ok(pageVo);
}
/**
* 根据品牌id删除品牌
* @author DB
* @since 2023/11/09 10:31
* @param id 主键
* @return com.cpop.core.base.entity.R<java.lang.Void>
*/
@Operation(summary = "根据品牌id删除品牌")
@DeleteMapping("/removeBrandById/{id}")
@Deprecated(since = "1.1.0")
public R<Void> removeBrandById(@PathVariable String id) {
return R.fail("根据品牌id删除品牌接口已废弃");
}
}

View File

@ -1,83 +0,0 @@
package com.cpop.system.business.controller.backstage;
import com.alibaba.excel.EasyExcel;
import com.cpop.core.base.entity.R;
import com.cpop.system.business.bo.StoreRunOffBo;
import com.cpop.system.business.bo.StoreSignRenewPageBo;
import com.cpop.system.business.bo.StoreSignRenewXmlBo;
import com.cpop.system.business.dto.StoreRenewDto;
import com.cpop.system.business.service.StoreSignService;
import com.cpop.system.business.vo.StoreSignRenewPageVo;
import com.mybatisflex.core.paginate.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.io.IOException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
/**
* 校区-签约表 控制层
*
* @author DB
* @since 2023-12-13
*/
@RestController
@Tag(name = "校区签约续费接口")
@RequestMapping("/backstage/storeSignRenew")
public class BackstageStoreSignController {
@Autowired
private StoreSignService storeSignService;
/**
* 获取校区签约续费分页
* @author DB
* @since 2024/3/7
* @return R<Page<StorePageVo>>
*/
@GetMapping("/getStoreSignRenewPage")
@Operation(summary = "获取校区签约续费分页")
public R<Page<StoreSignRenewPageVo>> getStoreSignRenewPage(StoreSignRenewPageBo bo) {
Page<StoreSignRenewPageVo> page = storeSignService.getStoreSignRenewPage(bo);
return R.ok(page);
}
/**
* 机构/店铺流失
* @author DB
* @since 2023/12/14
* @param bo 请求参数
* @return R<Void>
*/
@PostMapping("/runOff")
@Operation(summary = "机构流失")
public R<Void> runOff(@RequestBody @Validated StoreRunOffBo bo) {
storeSignService.runOff(bo);
return R.ok();
}
/**
* 获取签约续费导出数据
* @author DB
* @since 2023/12/14
* @param response 响应
* @param bo 请求参数
*/
@PostMapping("/getSignRenewXml")
@Operation(summary = "获取签约续费导出数据")
public void getRenewXml(HttpServletResponse response, @RequestBody @Validated StoreSignRenewXmlBo bo) throws IOException {
// 这里注意 有同学反应使用swagger 会导致各种问题请直接用浏览器或者用postman
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setCharacterEncoding("utf-8");
// 这里URLEncoder.encode可以防止中文乱码 当然和easyExcel没有关系
String fileName = URLEncoder.encode("已续费数据", StandardCharsets.UTF_8).replaceAll("\\+", "%20");
response.setHeader("Content-disposition", "attachment;filename*=" + fileName + ".xlsx");
EasyExcel.write(response.getOutputStream(), StoreRenewDto.class).sheet("记录").doWrite(storeSignService.getSignRenewXml(bo));
}
}

View File

@ -1,191 +0,0 @@
package com.cpop.system.business.entity;
import com.cpop.core.base.entity.BaseEntity;
import com.cpop.core.base.entity.BaseInsertListener;
import com.cpop.core.base.entity.BaseUpdateListener;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import lombok.*;
import lombok.experimental.Accessors;
/**
* 系统-品牌表 实体类
*
* @author DB
* @since 2023-10-25
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Table(value = "j_sys_brand", dataSource = "jambox", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false)
public class Brand extends BaseEntity implements Serializable {
/**
* 主键
*/
@Id
private String id;
/**
* 品牌名
*/
private String brandName;
/**
* 品牌logo
*/
private String brandLogo;
/**
* 品牌名简称
*/
private String simpleBrandName;
/**
* 微信商户号
*/
private String wxMchId;
/**
* 微信商户名称
*/
private String wxMchName;
/**
* 微信商户管理员
*/
private String wxMchAdmin;
/**
* 授权产品0商城;1:先学后付次付;2:先学后付月付3一次性支付
*/
private Integer authProduct;
/**
* 小程序名
*/
private String wxMiniName;
/**
* 负责人
*/
private String personChargeName;
/**
* 负责人手机号
*/
private String personChargePhone;
/**
* 品牌横图
*/
private String brandHorizontalGraph;
/**
* 品牌长图
*/
private String brandLongChart;
/**
* 主色系
*/
private String mainColor;
/**
* 副色系
*/
private String secondaryColor;
/**
* 管理模式(0:全直营;1:直营+加盟;2:全加盟)
*/
private Integer manageType;
/**
*
*/
private String province;
/**
*
*/
private String city;
/**
*
*/
private String region;
/**
* 经度
*/
private String longitude;
/**
* 纬度
*/
private String latitude;
/**
* 品牌地址
*/
private String brandAddr;
/**
* 品牌学员端二维码
*/
private String brandWxQr;
/**
* 总部营业执照地址
*/
private String licenseAddr;
/**
* 总部营业执照社会信用代码
*/
private String licenseCreditCode;
/**
* 总部营业执照日期
*/
private String licenseDate;
/**
* 总部营业执照公司名
*/
private String licenseFirmName;
/**
* 总部公司属性(0:个体;1:企业)
*/
private Boolean licenseStats;
/**
* 总部营业执照法人名
*/
private String licenseUsername;
/**
* 总部营业执照图片地址
*/
private String licensePicUrl;
/**
* 是否首次登录
*/
private Boolean perfectInformation;
/**
* 逻辑删除0否1是
*/
@Column(isLogicDelete = true)
private Boolean isDelete;
}

View File

@ -1,256 +0,0 @@
package com.cpop.system.business.entity;
import com.cpop.core.base.entity.BaseEntity;
import com.cpop.core.base.entity.BaseInsertListener;
import com.cpop.core.base.entity.BaseUpdateListener;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import lombok.*;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* 系统-店铺/校区表 实体类
*
* @author DB
* @since 2023-10-26
*/
@Data
@EqualsAndHashCode(callSuper=false)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Table(value = "j_sys_store", dataSource = "jambox", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false)
public class Store extends BaseEntity implements Serializable {
/**
* 店铺/校区id
*/
@Id
private String id;
/**
* 品牌id
*/
private String brandId;
/**
* 店铺/校区名
*/
private String storeName;
/**
* 负责人
*/
private String personChargeName;
/**
* 手机号
*/
private String personChargePhone;
/**
* 店铺/校区地址
*/
private String storeAddr;
/**
* 校区横图
*/
private String storeHorizontalGraph;
/**
*
*/
private String province;
/**
*
*/
private String city;
/**
*
*/
private String region;
/**
* 经度
*/
private String longitude;
/**
* 纬度
*/
private String latitude;
/**
* 校区营业执照地址
*/
private String licenseAddr;
/**
* 校区营业执照日期
*/
private String licenseDate;
/**
* 总部营业执照社会信用代码
*/
private String licenseCreditCode;
/**
* 校区营业执照公司名
*/
private String licenseFirmName;
/**
* 校区公司属性(0:个体;1:企业)
*/
private Boolean licenseStats;
/**
* 校区营业执照法人名
*/
private String licenseUsername;
/**
* 校区营业执照图片地址
*/
private String licensePicUrl;
/**
* 微信商户名称
*/
private String wxMchName;
/**
* 微信商户号
*/
private String wxMchId;
/**
* 微信商户管理员
*/
private String wxMchAdmin;
/**
* 授权产品0商城;1:先学后付次付;2:先学后付月付3一次性支付
*/
private Integer authProduct;
/**
* 校区学员端二维码
*/
private String storeWxQr;
/**
* 合约内容
*/
private String contractContent;
/**
* 合约签名
*/
private String contractSign;
/**
* 开启课卡权益审批
*/
private Boolean openCardEquityAudit;
/**
* 开启账单变动审核
*/
private Boolean openBillChangeAudit;
/**
* 预创建员工权限组
*/
private Boolean preCreateStaffPermissionGroup;
/**
* 创建课卡类型
*/
private Boolean preCreateCardType;
/**
* 预创建客户类型
*/
private Boolean preCreateCustomerType;
/**
* 开启预约人数隐藏
*/
private Boolean openPreCustomerNumHide;
/**
* 开启金额隐藏
*/
private Boolean openAmountHide;
/**
* 开启预约排队功能
*/
private Boolean openPreQueue;
/**
* 开启按课次课消
*/
private Boolean openClassTimeConsume;
/**
* 开启自动复制课表
*/
private Boolean openAutoCopyClassSchedule;
/**
* 课前可预约时间
*/
private Integer beforeClassCourseReservationTime;
/**
* 课前不可预约时间
*/
private Integer beforeClassNotCourseReservationTime;
/**
* 课前取消预约时间
*/
private Integer beforeClassCancelCourseReservationTime;
/**
* 课前请假时间
*/
private Integer beforeClassLeaveTime;
/**
* 新课卡默认缓存时间
*/
private Integer newClassCardBufferTime;
/**
* 品牌预设模板id
*/
private String brandPreinstallTemplateId;
/**
* 是否首次登录
*/
private Boolean perfectInformation;
/**
* 授权微信商户(使用品牌绑定的微信商户)
*/
private Boolean authWxMch;
/**
* 逻辑删除0否1是
*/
@Column(isLogicDelete = true)
private Boolean isDelete;
}

View File

@ -1,81 +0,0 @@
package com.cpop.system.business.entity;
import com.cpop.core.base.entity.BaseEntity;
import com.cpop.core.base.entity.BaseInsertListener;
import com.cpop.core.base.entity.BaseUpdateListener;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.time.LocalDate;
import lombok.*;
import lombok.experimental.Accessors;
/**
* 校区-签约表 实体类
*
* @author DB
* @since 2023-12-13
*/
@Data
@EqualsAndHashCode(callSuper=false)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Table(value = "j_sys_store_sign", dataSource = "jambox", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false)
public class StoreSign extends BaseEntity implements Serializable {
/**
* 主键
*/
@Id
private String id;
/**
* 校区/店铺id
*/
private String storeId;
/**
* 签约状态(0:未签约;1:已签约;2:已过期)
*/
private Integer signStatus;
/**
* 到期日期
*/
private LocalDate expireDate;
/**
* 签约员工id
*/
private String signStaffId;
/**
* 是否流失
*/
private Boolean isLoss;
/**
* 流失日期
*/
private LocalDate runOffDate;
/**
* 流失原因
*/
private String runOffReason;
/**
* 签约月份
*/
private String signMonth;
/**
* 逻辑删除0否1是
*/
@Column(isLogicDelete = true)
private Boolean isDelete;
}

View File

@ -1,16 +0,0 @@
package com.cpop.system.business.mapper;
import com.mybatisflex.annotation.UseDataSource;
import com.mybatisflex.core.BaseMapper;
import com.cpop.system.business.entity.Brand;
/**
* 系统-品牌表 映射层
*
* @author DB
* @since 2023-10-25
*/
@UseDataSource("jambox")
public interface BrandMapper extends BaseMapper<Brand> {
}

View File

@ -1,14 +0,0 @@
package com.cpop.system.business.mapper;
import com.mybatisflex.core.BaseMapper;
import com.cpop.system.business.entity.ProfitSharing;
/**
* 系统分账表 映射层
*
* @author DB
* @since 2023-10-27
*/
public interface ProfitSharingMapper extends BaseMapper<ProfitSharing> {
}

View File

@ -1,14 +0,0 @@
package com.cpop.system.business.mapper;
import com.mybatisflex.core.BaseMapper;
import com.cpop.system.business.entity.Store;
/**
* 系统-店铺/校区表 映射层
*
* @author DB
* @since 2023-10-26
*/
public interface StoreMapper extends BaseMapper<Store> {
}

View File

@ -1,14 +0,0 @@
package com.cpop.system.business.mapper;
import com.mybatisflex.core.BaseMapper;
import com.cpop.system.business.entity.StoreRenew;
/**
* 校区续费表 映射层
*
* @author DB
* @since 2023-12-14
*/
public interface StoreRenewMapper extends BaseMapper<StoreRenew> {
}

View File

@ -1,14 +0,0 @@
package com.cpop.system.business.mapper;
import com.mybatisflex.core.BaseMapper;
import com.cpop.system.business.entity.StoreSign;
/**
* 校区-签约表 映射层
*
* @author DB
* @since 2023-12-13
*/
public interface StoreSignMapper extends BaseMapper<StoreSign> {
}

View File

@ -1,25 +0,0 @@
package com.cpop.system.business.service;
import com.cpop.system.business.vo.BrandPageVo;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;
import com.cpop.system.business.entity.Brand;
/**
* 系统-品牌表 服务层
*
* @author DB
* @since 2023-10-25
*/
public interface BrandService extends IService<Brand> {
/**
* 查询品牌分页列表
* @author DB
* @since 2023/10/25 17:32
* @param brandName 请求参数
* @return com.mybatisflex.core.paginate.Page<com.cpop.system.business.vo.BrandPageVo>
*/
Page<BrandPageVo> getBrandPage(String brandName);
}

View File

@ -1,14 +0,0 @@
package com.cpop.system.business.service;
import com.mybatisflex.core.service.IService;
import com.cpop.system.business.entity.ProfitSharing;
/**
* 系统分账表 服务层
*
* @author DB
* @since 2023-10-27
*/
public interface ProfitSharingService extends IService<ProfitSharing> {
}

View File

@ -1,14 +0,0 @@
package com.cpop.system.business.service;
import com.mybatisflex.core.service.IService;
import com.cpop.system.business.entity.StoreRenew;
/**
* 校区续费表 服务层
*
* @author DB
* @since 2023-12-14
*/
public interface StoreRenewService extends IService<StoreRenew> {
}

View File

@ -1,34 +0,0 @@
package com.cpop.system.business.service;
import com.cpop.system.business.bo.StoreBo;
import com.cpop.system.business.vo.StorePageVo;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;
import com.cpop.system.business.entity.Store;
/**
* 系统-店铺/校区表 服务层
*
* @author DB
* @since 2023-10-26
*/
public interface StoreService extends IService<Store> {
/**
* 查询校区分页列表
* @param name 请求参数
* @return R<PageVo<CampusPageListVo>>
* @author Administrator
* @since 2023/6/7 0007 10:18
*/
Page<StorePageVo> getStorePage(String name);
/**
* 更新校区
* @author DB
* @since 2024/1/15
* @param bo 请求参数
*/
void updateStore(StoreBo bo);
}

View File

@ -1,47 +0,0 @@
package com.cpop.system.business.service;
import com.cpop.system.business.bo.StoreRunOffBo;
import com.cpop.system.business.bo.StoreSignRenewPageBo;
import com.cpop.system.business.bo.StoreSignRenewXmlBo;
import com.cpop.system.business.dto.StoreRenewDto;
import com.cpop.system.business.vo.StoreSignRenewPageVo;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;
import com.cpop.system.business.entity.StoreSign;
import java.util.List;
/**
* 校区-签约表 服务层
*
* @author DB
* @since 2023-12-13
*/
public interface StoreSignService extends IService<StoreSign> {
/**
* 获取校区签约续费分页
* @author DB
* @since 2024/3/7
* @return Page<StorePageVo>
*/
Page<StoreSignRenewPageVo> getStoreSignRenewPage(StoreSignRenewPageBo bo);
/**
* 机构/店铺流失
* @author DB
* @since 2023/12/14
* @param bo 请求参数
*/
void runOff(StoreRunOffBo bo);
/**
* 获取已续费导出数据
* @author DB
* @since 2023/12/14
* @param bo 请求
* @return List<StoreRenewDto>
*/
List<StoreRenewDto> getSignRenewXml(StoreSignRenewXmlBo bo);
}

View File

@ -1,43 +0,0 @@
package com.cpop.system.business.service.impl;
import com.cpop.core.base.entity.PageDomain;
import com.cpop.core.utils.SqlUtils;
import com.cpop.system.business.entity.Brand;
import com.cpop.system.business.mapper.BrandMapper;
import com.cpop.system.business.service.BrandService;
import com.cpop.system.business.vo.BrandPageVo;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import static com.cpop.system.business.entity.table.BrandTableDef.BRAND;
/**
* 系统-品牌表 服务层实现
*
* @author DB
* @since 2023-10-25
*/
@Service("brandService")
public class BrandServiceImpl extends ServiceImpl<BrandMapper, Brand> implements BrandService {
/**
* 查询品牌分页列表
* @author DB
* @since 2023/10/25 17:32
* @param brandName 请求参数
* @return com.mybatisflex.core.paginate.Page<com.cpop.system.business.vo.BrandPageVo>
*/
@Override
public Page<BrandPageVo> getBrandPage(String brandName) {
PageDomain pageDomain = SqlUtils.getInstance().getPageDomain();
return this.mapper.paginateAs(pageDomain.getPage(), pageDomain.getPageSize(), QueryWrapper.create()
.select(BRAND.ID, BRAND.BRAND_NAME, BRAND.WX_MCH_ID, BRAND.CREATE_TIME, BRAND.WX_MCH_ID, BRAND.BRAND_ADDR, BRAND.LICENSE_STATS, BRAND.LICENSE_PIC_URL, BRAND.LICENSE_CREDIT_CODE,
BRAND.LICENSE_FIRM_NAME, BRAND.LICENSE_USERNAME, BRAND.LICENSE_ADDR, BRAND.LICENSE_DATE)
.and(BRAND.BRAND_NAME.likeLeft(brandName))
.orderBy(BRAND.CREATE_TIME.desc()),
BrandPageVo.class);
}
}

View File

@ -1,18 +0,0 @@
package com.cpop.system.business.service.impl;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import com.cpop.system.business.entity.ProfitSharing;
import com.cpop.system.business.mapper.ProfitSharingMapper;
import com.cpop.system.business.service.ProfitSharingService;
import org.springframework.stereotype.Service;
/**
* 系统分账表 服务层实现
*
* @author DB
* @since 2023-10-27
*/
@Service("profitSharingService")
public class ProfitSharingServiceImpl extends ServiceImpl<ProfitSharingMapper, ProfitSharing> implements ProfitSharingService {
}

View File

@ -1,18 +0,0 @@
package com.cpop.system.business.service.impl;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import com.cpop.system.business.entity.StoreRenew;
import com.cpop.system.business.mapper.StoreRenewMapper;
import com.cpop.system.business.service.StoreRenewService;
import org.springframework.stereotype.Service;
/**
* 校区续费表 服务层实现
*
* @author DB
* @since 2023-12-14
*/
@Service("storeRenewService")
public class StoreRenewServiceImpl extends ServiceImpl<StoreRenewMapper, StoreRenew> implements StoreRenewService {
}

View File

@ -1,65 +0,0 @@
package com.cpop.system.business.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.cpop.core.base.entity.PageDomain;
import com.cpop.core.utils.SqlUtils;
import com.cpop.system.business.bo.StoreBo;
import com.cpop.system.business.entity.Store;
import com.cpop.system.business.mapper.StoreMapper;
import com.cpop.system.business.service.StoreService;
import com.cpop.system.business.vo.StorePageVo;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import static com.cpop.system.business.entity.table.BrandTableDef.BRAND;
import static com.cpop.system.business.entity.table.StoreSignTableDef.STORE_SIGN;
import static com.cpop.system.business.entity.table.StoreTableDef.STORE;
/**
* 系统-店铺/校区表 服务层实现
*
* @author DB
* @since 2023-10-26
*/
@Service("storeService")
public class StoreServiceImpl extends ServiceImpl<StoreMapper, Store> implements StoreService {
/**
* 查询校区分页列表
* @param name 请求参数
* @return R<PageVo<CampusPageListVo>>
* @author Administrator
* @since 2023/6/7 0007 10:18
*/
@Override
public Page<StorePageVo> getStorePage(String name) {
PageDomain pageDomain = SqlUtils.getInstance().getPageDomain();
return this.getMapper().paginateAs(Page.of(pageDomain.getPage(), pageDomain.getPageSize()), QueryWrapper.create()
.select(STORE.ID, STORE.STORE_NAME, STORE.CREATE_TIME, STORE.STORE_ADDR, STORE.PERSON_CHARGE_NAME.as(StorePageVo::getPersonCharge),
STORE.PERSON_CHARGE_PHONE.as(StorePageVo::getPhone), STORE.WX_MCH_ID)
.select(STORE_SIGN.EXPIRE_DATE)
.select(BRAND.BRAND_NAME)
.from(STORE)
.leftJoin(STORE_SIGN).on(STORE_SIGN.STORE_ID.eq(STORE.ID))
.leftJoin(BRAND).on(BRAND.ID.eq(STORE.BRAND_ID))
.and(STORE.STORE_NAME.like(name))
.orderBy(STORE.CREATE_TIME.desc()),
StorePageVo.class);
}
/**
* 更新校区
* @author DB
* @since 2024/1/15
* @param bo 请求参数
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void updateStore(StoreBo bo) {
Store store = BeanUtil.toBean(bo, Store.class);
this.updateById(store);
}
}

View File

@ -1,126 +0,0 @@
package com.cpop.system.business.service.impl;
import cn.hutool.core.util.StrUtil;
import com.cpop.core.base.entity.PageDomain;
import com.cpop.core.utils.SpringUtils;
import com.cpop.core.utils.SqlUtils;
import com.cpop.system.business.bo.StoreRunOffBo;
import com.cpop.system.business.bo.StoreSignRenewPageBo;
import com.cpop.system.business.bo.StoreSignRenewXmlBo;
import com.cpop.system.business.dto.StoreRenewDto;
import com.cpop.system.business.entity.StoreSign;
import com.cpop.system.business.mapper.StoreSignMapper;
import com.cpop.system.business.service.StoreRenewService;
import com.cpop.system.business.service.StoreSignService;
import com.cpop.system.business.vo.StoreSignRenewPageVo;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import java.util.List;
import static com.cpop.system.business.entity.table.BrandTableDef.BRAND;
import static com.cpop.system.business.entity.table.StoreRenewTableDef.STORE_RENEW;
import static com.cpop.system.business.entity.table.StoreSignTableDef.STORE_SIGN;
import static com.cpop.system.business.entity.table.StoreTableDef.STORE;
import static com.mybatisflex.core.query.QueryMethods.*;
/**
* 校区-签约表 服务层实现
*
* @author DB
* @since 2023-12-13
*/
@Service("storeSignService")
public class StoreSignServiceImpl extends ServiceImpl<StoreSignMapper, StoreSign> implements StoreSignService {
/**
* 获取校区签约续费分页
* @author DB
* @since 2024/3/7
* @return Page<StorePageVo>
*/
@Override
public Page<StoreSignRenewPageVo> getStoreSignRenewPage(StoreSignRenewPageBo bo) {
PageDomain pageDomain = SqlUtils.getInstance().getPageDomain();
QueryWrapper queryWrapper = QueryWrapper.create();
if (StrUtil.isNotBlank(bo.getAddrOrName())){
queryWrapper.and(STORE.LICENSE_ADDR.like(bo.getAddrOrName()).or(STORE.LICENSE_FIRM_NAME.like(bo.getAddrOrName())));
}
if (StrUtil.isNotBlank(bo.getBrandOrStore())){
queryWrapper.and(BRAND.BRAND_NAME.like(bo.getBrandOrStore()).or(STORE.STORE_NAME.like(bo.getBrandOrStore())));
}
switch (bo.getRenewStatus()){
//待续费
case 0:
queryWrapper.and(subDate(STORE_SIGN.EXPIRE_DATE, number(90)).le(now())).and(STORE_SIGN.IS_LOSS.eq(false));
break;
//已续费
case 1:
if (bo.getStartDate() != null && bo.getEndDate() != null) {
queryWrapper.and(dateFormat(STORE_RENEW.CREATE_TIME, "%Y-%m-%d").between(bo.getStartDate(), bo.getEndDate()));
}
return SpringUtils.getBean(StoreRenewService.class).getMapper().paginateAs(Page.of(pageDomain.getPage(), pageDomain.getPageSize()), queryWrapper
.select(BRAND.BRAND_NAME)
.select(STORE.CREATE_TIME.as(StoreSignRenewPageVo::getCreateTime), STORE.PERSON_CHARGE_NAME, STORE.PERSON_CHARGE_PHONE, STORE.STORE_NAME)
.select(STORE_SIGN.EXPIRE_DATE, STORE_SIGN.ID)
.select(STORE.LICENSE_ADDR, STORE.LICENSE_FIRM_NAME, STORE.LICENSE_USERNAME)
.select(STORE_RENEW.CREATE_TIME, STORE_RENEW.AMOUNT)
.from(STORE_RENEW)
.leftJoin(STORE).on(STORE.ID.eq(STORE_RENEW.STORE_ID))
.leftJoin(BRAND).on(BRAND.ID.eq(STORE.BRAND_ID))
.leftJoin(STORE_SIGN).on(STORE_SIGN.STORE_ID.eq(STORE.ID)),
StoreSignRenewPageVo.class);
//已流失
default:
queryWrapper.and(STORE_SIGN.IS_LOSS.eq(true));
}
return this.mapper.paginateAs(Page.of(pageDomain.getPage(), pageDomain.getPageSize()), queryWrapper
.select(BRAND.BRAND_NAME)
.select(STORE.CREATE_TIME.as(StoreSignRenewPageVo::getCreateTime), STORE.PERSON_CHARGE_NAME, STORE.PERSON_CHARGE_PHONE, STORE.STORE_NAME)
.select(STORE.LICENSE_ADDR, STORE.LICENSE_FIRM_NAME, STORE.LICENSE_USERNAME)
.select(STORE_RENEW.CREATE_TIME, STORE_RENEW.AMOUNT)
.leftJoin(STORE).on(STORE.ID.eq(STORE_SIGN.STORE_ID))
.leftJoin(BRAND).on(BRAND.ID.eq(STORE.BRAND_ID))
.leftJoin(STORE_RENEW).on(STORE_RENEW.STORE_ID.eq(STORE.ID)),
StoreSignRenewPageVo.class);
}
/**
* 机构/店铺流失
* @author DB
* @since 2023/12/14
* @param bo 请求参数
*/
@Override
public void runOff(StoreRunOffBo bo) {
this.updateChain().set(STORE_SIGN.RUN_OFF_REASON, bo.getRunOffReason())
.set(STORE_SIGN.RUN_OFF_DATE, now())
.set(STORE_SIGN.IS_LOSS, true)
.where(STORE_SIGN.ID.eq(bo.getId())).update();
}
/**
* 获取已续费导出数据
* @author DB
* @since 2023/12/14
* @param bo 请求
* @return List<StoreRenewDto>
*/
@Override
public List<StoreRenewDto> getSignRenewXml(StoreSignRenewXmlBo bo) {
return SpringUtils.getBean(StoreRenewService.class).listAs(QueryWrapper.create()
.select(BRAND.BRAND_NAME)
.select(STORE.CREATE_TIME.as(StoreRenewDto::getCreateTime), STORE.PERSON_CHARGE_NAME, STORE.PERSON_CHARGE_PHONE, STORE.STORE_NAME)
.select(STORE_SIGN.EXPIRE_DATE, STORE_SIGN.ID)
.select(STORE.LICENSE_ADDR, STORE.LICENSE_FIRM_NAME, STORE.LICENSE_USERNAME)
.select(STORE_RENEW.CREATE_TIME, STORE_RENEW.AMOUNT)
.leftJoin(STORE).on(STORE.ID.eq(STORE_RENEW.STORE_ID))
.leftJoin(BRAND).on(BRAND.ID.eq(STORE.BRAND_ID))
.leftJoin(STORE_SIGN).on(STORE_SIGN.STORE_ID.eq(STORE.ID))
.and(dateFormat(STORE_RENEW.CREATE_TIME, "%Y-%m-%d").between(bo.getStartDate(), bo.getEndDate()))
.and(BRAND.BRAND_NAME.like(bo.getBrandOrStore()).or(STORE.STORE_NAME.like(bo.getBrandOrStore()))),
StoreRenewDto.class);
}
}

View File

@ -1,153 +0,0 @@
package com.cpop.system.business.vo;
import com.mybatisflex.annotation.Column;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.util.List;
/**
* Description:
* date: 2023/5/11 9:14
*
* @author DB
*/
@Data
@Accessors(chain = true)
@Schema(description = "Menu对象")
public class MenuRouteVo {
/**
* 菜单ID
*/
@Schema(description = "菜单ID")
private String id;
/**
* 父级菜单ID
*/
@Schema(description = "父级菜单ID")
private String parentMenu;
/**
* 菜单名
*/
@Schema(description = "菜单名")
private String name;
/**
* 菜单图标
*/
@Schema(description = "菜单图标")
private String icon;
/**
* 菜单路由父菜单为空
*/
@Schema(description = "菜单路由,父菜单为空")
private String component;
/**
* 标记菜单的状态 0:禁用 1正常根据权限正常显示
*/
@Schema(description = "标记菜单的状态 0:禁用 1正常根据权限正常显示")
private Boolean status;
/**
* 用户类型1管理员2审计管理员3安全管理员4普通用户
*/
@Schema(description = "用户类型1管理员2审计管理员3安全管理员4普通用户")
private String type;
/**
* 权限
*/
@Schema(description = "权限")
private String permission;
/**
* 重定向路径一级菜单有值
*/
@Schema(description = "重定向路径,一级菜单有值")
private String redirect;
/**
* 排序值越小越靠前一级菜单有值
*/
@Schema(description = "排序,值越小越靠前,一级菜单有值")
private Integer orderNo;
/**
* 子菜单集
*/
@Column(ignore = true)
@Schema(description = "子菜单集")
private List<MenuRouteVo> children;
/**
* 路由地址
*/
@Schema(description = "路由地址")
private String path;
/**
* 标题
*/
@Schema(description = "标题")
private String title;
/**
* 隐藏菜单
*/
@Schema(description = "隐藏菜单")
private Boolean hideMenu;
/**
* 是否忽略KeepAlive缓存
*/
@Schema(description = "是否忽略KeepAlive缓存")
private Boolean ignoreKeepAlive;
//private Boolean keepalive;
/**
* 内部定义类
*/
@Column(ignore = true)
@Schema(description = "内部定义类")
private Meta meta;
/**
* 内部类
*/
@Data
public class Meta {
/**
* 标题
*/
private String title;
/**
* 图标
*/
private String icon;
/**
* 排序
*/
private Integer orderNo;
/**
* 隐藏菜单
*/
private Boolean hideMenu;
/**
* 隐藏子类菜单
*/
private Boolean hideChildrenInMenu;
/**
* 是否忽略KeepAlive缓存
*/
private Boolean ignoreKeepAlive;
}
}

View File

@ -1,119 +0,0 @@
package com.cpop.system.business.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
import java.util.List;
/**
* 系统菜单表Vo输出
*
* @author DB.lost
* @since 2023-05-10
*/
@Data
@Accessors(chain = true)
@Schema(description = "菜单返回对象")
public class MenuVo {
/**
* 菜单ID
*/
@Schema(description = "菜单ID")
private String id;
/**
* 父级菜单ID
*/
@Schema(description = "父级菜单ID")
private String parentMenu;
/**
* 菜单名称
*/
@Schema(description = "菜单名称")
private String name;
/**
* 菜单图标
*/
@Schema(description = "菜单图标")
private String icon;
/**
* 菜单路由父菜单为空
*/
@Schema(description = "菜单路由,父菜单为空")
private String component;
/**
* 标记菜单的状态 0:禁用 1:启用根据权限正常显示
*/
@Schema(description = "标记菜单的状态 0:禁用 1:启用(根据权限正常显示)")
private Boolean status;
/**
* 权限
*/
@Schema(description = "权限")
private String permission;
/**
* 重定向路径一级菜单有值
*/
@Schema(description = "重定向路径,一级菜单有值")
private String redirect;
/**
* 排序值越小越靠前一级菜单有值
*/
@Schema(description = "排序,值越小越靠前,一级菜单有值")
private Integer orderNo;
/**
* 路由地址
*/
@Schema(description = "路由地址")
private String path;
/**
* 标题
*/
@Schema(description = "标题")
private String title;
/**
* 子菜单集
*/
@Schema(description = "子菜单集")
private List<MenuVo> children;
/**
* 更新时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
@Schema(description = "更新时间")
private LocalDateTime updateTime;
/**
* 菜单类型0:目录1:菜单2:按钮
*/
@Schema(description = "菜单类型0:目录1:菜单2:按钮")
private Integer type;
/**
* 隐藏菜单
*/
@Schema(description = "隐藏菜单")
private Boolean hideMenu;
/**
* 是否忽略KeepAlive缓存
*/
@Schema(description = "是否忽略KeepAlive缓存")
private Boolean ignoreKeepAlive;
}

View File

@ -1,72 +0,0 @@
package com.cpop.system.business.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mybatisflex.annotation.Column;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
import java.util.List;
/**
* Description:
* date: 2023/5/9 14:21
*
* @Author DB
*/
@Data
@Accessors(chain = true)
@Schema(description = "角色分页返回对象")
public class RolePageVo {
/**
* 主键
*/
@Schema(description = "主键")
private String id;
/**
* 角色名称
*/
@Schema(description = "角色名称")
private String roleName;
/**
* 角色值
*/
@Schema(description = "角色值")
private String roleValue;
/**
* 状态
*/
@Schema(description = "状态")
private Boolean status;
/**
* 备注
*/
@Schema(description = "备注")
private String remark;
/**
* 排序
*/
@Schema(description = "排序")
private Integer orderNo;
/**
* 更新时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
@Schema(description = "更新时间")
private LocalDateTime updateTime;
/**
* 角色所属菜单id集合
*/
@Schema(description = "角色所属菜单id集合")
@Column(ignore = true)
private List<String> menuIds;
}

View File

@ -1,56 +0,0 @@
package com.cpop.system.business.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* 系统角色表Vo输出
*
* @author DB.lost
* @since 2023-05-10
*/
@Data
@Accessors(chain = true)
@Schema(description = "角色信息")
public class RoleVo {
/**
* 主键
*/
@Schema(description = "主键")
private String id;
/**
* 角色名称
*/
@Schema(description = "角色名称")
private String roleName;
/**
* 角色值
*/
@Schema(description = "角色值")
private String roleValue;
/**
* 状态 0:禁用 1正常
*/
@Schema(description = "状态 0:禁用 1正常")
private Boolean status;
/**
* 备注
*/
@Schema(description = "备注")
private String remark;
/**
* 排序
*/
@Schema(description = "排序")
private Integer orderNo;
}

View File

@ -1,7 +0,0 @@
<?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.cpop.system.business.mapper.BrandMapper">
</mapper>

View File

@ -1,7 +0,0 @@
<?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.cpop.system.business.mapper.ProfitSharingMapper">
</mapper>

View File

@ -1,7 +0,0 @@
<?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.cpop.system.business.mapper.StoreRenewMapper">
</mapper>

View File

@ -1,7 +0,0 @@
<?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.cpop.system.business.mapper.StoreSignMapper">
</mapper>

View File

@ -21,7 +21,6 @@
<module>Cpop-Api</module>
<module>Cpop-Oam</module>
<module>Cpop-Oam/Cpop-Oam-Web</module>
<module>Cpop-System</module>
<module>Cpop-Pay</module>
<module>Cpop-ClockIn-Demo</module>
</modules>
@ -29,17 +28,17 @@
<properties>
<java.version>17</java.version>
<cpop.version>1.1.2</cpop.version>
<mybatis-flex.version>1.8.9</mybatis-flex.version>
<mybatis-flex.version>1.9.0</mybatis-flex.version>
<fastjson.version>2.0.46</fastjson.version>
<easyexcel.version>3.3.2</easyexcel.version>
<easyexcel.version>3.3.4</easyexcel.version>
<sa-token.version>1.38.0</sa-token.version>
<knife4j.version>4.5.0</knife4j.version>
<tencentcloud.version>3.1.970</tencentcloud.version>
<cos_api.version>5.6.155</cos_api.version>
<wxJava.version>4.6.0</wxJava.version>
<mongo-plus.version>2.0.9.2</mongo-plus.version>
<mongo-plus.version>2.0.9.3</mongo-plus.version>
<azure-ai-openai.version>1.0.0-beta.3</azure-ai-openai.version>
<hutool.version>5.8.27</hutool.version>
<hutool.version>5.8.28</hutool.version>
<guava.version>33.2.0-jre</guava.version>
</properties>