Jambox模块;api模块

This commit is contained in:
DB 2023-10-09 17:55:40 +08:00
parent 78e589cada
commit 30bee64275
57 changed files with 2635 additions and 4 deletions

28
Cpop-Api/pom.xml Normal file
View File

@ -0,0 +1,28 @@
<?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.0.0</version>
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
</parent>
<artifactId>Cpop-Api</artifactId>
<name>Cpop-Api</name>
<description>Cpop-Api</description>
<dependencies>
<!--核心包-->
<dependency>
<groupId>com.cpop</groupId>
<artifactId>Cpop-Core</artifactId>
</dependency>
<!-- okhttp3 -->
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,13 @@
package com.cpop.api;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class CpopApiApplication {
public static void main(String[] args) {
SpringApplication.run(CpopApiApplication.class, args);
}
}

View File

@ -0,0 +1,19 @@
package com.cpop.api.tencent.wxWork.core.base;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
/**
* @author DB
* @createTime 2023/09/15 16:30
* @description 群机器人
*/
@Data
public class WxWorkApiWebHookSendBase {
/**
* 消息类型[文本textmarkdownmarkdown图片image图文news文件file语音voice模板卡片template_card]
*/
@JSONField(name = "msgtype")
private String msgType;
}

View File

@ -0,0 +1,21 @@
package com.cpop.api.tencent.wxWork.core.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
/**
* @author DB
* @createTime 2023/09/15 16:19
* @description 企业微信API配置类
*/
@Data
@Configuration
@ConfigurationProperties(prefix = "pupu.api.tencent.wx-work")
public class WxWorkApiConfig {
/**
* 群机器人
*/
private String webhook = "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=";
}

View File

@ -0,0 +1,65 @@
package com.cpop.api.tencent.wxWork.handler;
import com.alibaba.fastjson.JSONObject;
import com.cpop.api.tencent.wxWork.core.config.WxWorkApiConfig;
import com.cpop.api.tencent.wxWork.webHook.WebHookSendTextRequest;
import okhttp3.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.io.IOException;
import java.util.List;
/**
* @author DB
* @createTime 2023/09/15 16:24
* @description
*/
@Component
public class WebHookSendHandler {
@Autowired
private WxWorkApiConfig config;
/**
* @descriptions 机器人发送文本
* @author DB
* @date 2023/09/15 17:56
* @param key 机器人键
* @param phoneList 通知人手机号
* @param content 内容
* @return java.lang.String
*/
public String webHookSendText(String key, List<String> phoneList, String content, Boolean isAll) throws IOException {
if (isAll) {
phoneList.add("@all");
}
WebHookSendTextRequest request = new WebHookSendTextRequest();
WebHookSendTextRequest.Text text = request.new Text();
text.setContent(content);
text.setMentionedMobileList(phoneList);
request.setText(text);
Response response = sendPost(config.getWebhook() + key, JSONObject.toJSONString(request));
return response.toString();
}
/**
* @descriptions 发送post请求
* @author DB
* @date 2023/09/15 17:28
* @param url 地址
* @param jsonBody 请求体
* @return okhttp3.Response
*/
private Response sendPost(String url,String jsonBody) throws IOException {
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, jsonBody);
Request request = new Request.Builder()
.url(url)
.method("POST", body)
.addHeader("Content-Type", "application/json")
.build();
return client.newCall(request).execute();
}
}

View File

@ -0,0 +1,53 @@
package com.cpop.api.tencent.wxWork.webHook;
import com.alibaba.fastjson.annotation.JSONField;
import com.cpop.api.tencent.wxWork.core.base.WxWorkApiWebHookSendBase;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.List;
/**
* @author DB
* @createTime 2023/09/15 16:31
* @description
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class WebHookSendTextRequest extends WxWorkApiWebHookSendBase {
public WebHookSendTextRequest() {
setMsgType("text");
}
/**
* 文本格式
*/
private Text text;
/**
* 文本格式
*/
@Data
public class Text {
/**
* 文本内容最长不超过2048个字节必须是utf8编码
*/
private String content;
/**
* userid的列表提醒群中的指定成员(@某个成员)@all表示提醒所有人如果开发者获取不到userid可以使用mentioned_mobile_list
*/
@JSONField(name = "mentioned_list")
private List<String> mentionedList;
/**
* 手机号列表提醒手机号对应的群成员(@某个成员)@all表示提醒所有人
*/
@JSONField(name = "mentioned_mobile_list")
private List<String> mentionedMobileList;
}
}

View File

@ -0,0 +1 @@

23
Cpop-Jambox/pom.xml Normal file
View File

@ -0,0 +1,23 @@
<?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.0.0</version>
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
</parent>
<artifactId>Cpop-Jambox</artifactId>
<name>Cpop-Jambox</name>
<description>果酱</description>
<dependencies>
<!--核心包-->
<dependency>
<groupId>com.cpop</groupId>
<artifactId>Cpop-Core</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,93 @@
/*
Navicat Premium Data Transfer
Source Server : Localhost
Source Server Type : MySQL
Source Server Version : 80032
Source Host : localhost:3306
Source Schema : cpop-union
Target Server Type : MySQL
Target Server Version : 80032
File Encoding : 65001
Date: 15/09/2023 15:04:20
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for pp_j_brand
-- ----------------------------
DROP TABLE IF EXISTS `cp_j_brand`;
CREATE TABLE `cp_j_brand` (
`id` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键',
`brand_cloud_id` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '云函数id',
`name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '品牌名',
`background_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '背景地址',
`consultant_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '顾问名',
`open_id` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'openId',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`create_user_id` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人id',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`update_user_id` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人id',
`is_delete` tinyint(1) NULL DEFAULT 0 COMMENT '是否删除(0否1是)',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '品牌表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for pp_j_brand_staff
-- ----------------------------
DROP TABLE IF EXISTS `cp_j_brand_staff`;
CREATE TABLE `cp_j_brand_staff` (
`id` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键',
`brand_staff_cloud_id` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '云id',
`name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '姓名',
`phone_number` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手机号',
`position` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '身份(定位)',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`create_user_id` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人id',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`update_user_id` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人id',
`is_delete` tinyint(1) NULL DEFAULT 0 COMMENT '是否删除(0否1是)',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '品牌管理员表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for pp_j_brand_staff_mid_campus
-- ----------------------------
DROP TABLE IF EXISTS `cp_j_brand_staff_mid_campus`;
CREATE TABLE `cp_j_brand_staff_mid_campus` (
`brand_staff_id` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '品牌管理员id',
`brand_id` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '品牌id',
`campus_id` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '校区id',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`create_user_id` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人id',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`update_user_id` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人id'
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '管理员-品牌-校区表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for pp_j_campus
-- ----------------------------
DROP TABLE IF EXISTS `cp_j_campus`;
CREATE TABLE `cp_j_campus` (
`id` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键',
`campus_cloud_id` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '云校区id',
`brand_id` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '品牌id',
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '校区名',
`responsible_person` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '负责人',
`responsible_person_phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '负责人手机号',
`address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地址',
`open_id` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'openId',
`expire` datetime(0) NULL DEFAULT NULL COMMENT '到期时间',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`create_user_id` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人id',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`update_user_id` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人id',
`is_delete` tinyint(1) NULL DEFAULT 0 COMMENT '是否删除(0否1是)',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '校区表' ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;

View File

@ -0,0 +1,43 @@
package com.cpop.jambox.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 品牌表Bo
*
* @author DB.lost
* @since 2023-06-01
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "Brand对象", description = "品牌表")
public class BrandBo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@ApiModelProperty("主键")
private String id;
/**
* 品牌名
*/
@NotBlank(message = "品牌名不能为空")
@ApiModelProperty(value = "品牌名",required = true)
private String name;
/**
* 背景地址
*/
@ApiModelProperty("背景地址")
private String backgroundUrl;
}

View File

@ -0,0 +1,28 @@
package com.cpop.jambox.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* Description:
* date: 2023/6/1 18:07
* @Author DB
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "Brand分页对象", description = "Brand分页对象")
public class BrandPageBo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 品牌名
*/
@ApiModelProperty("品牌名")
private String name;
}

View File

@ -0,0 +1,63 @@
package com.cpop.jambox.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* 品牌管理员表Bo
*
* @author DB.lost
* @since 2023-06-02
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "BrandStaff对象", description = "品牌管理员新增信息")
public class BrandStaffBo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@ApiModelProperty("主键")
private String id;
/**
* 姓名
*/
@NotBlank(message = "不能为空")
@ApiModelProperty("姓名")
private String name;
/**
* 身份(定位)
*/
@ApiModelProperty("身份(定位)")
private String position = "管理员";
/**
* 手机号
*/
@NotBlank(message = "不能为空")
@ApiModelProperty("手机号")
private String phoneNumber;
/**
* 品牌id
*/
@ApiModelProperty("品牌id")
private List<String> brandIds;
/**
* 校区id
*/
@ApiModelProperty("校区id")
private List<String> campusIds;
}

View File

@ -0,0 +1,41 @@
package com.cpop.jambox.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* Description:
* date: 2023/6/2 11:59
*
* @Author ST
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "BrandManagementStaff分页对象", description = "品牌管理员表")
public class BrandStaffPageBo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 姓名
*/
@ApiModelProperty("姓名")
private String name;
/**
* 手机号
*/
@ApiModelProperty("手机号")
private String phoneNumber;
/**
* 品牌名
*/
@ApiModelProperty("品牌名")
private String brandName;
}

View File

@ -0,0 +1,57 @@
package com.cpop.jambox.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 校区表Bo
*
* @author DB.lost
* @since 2023-06-07
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "Campus对象", description = "校区表")
public class CampusBo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@ApiModelProperty("主键")
private String id;
/**
* 品牌id
*/
@ApiModelProperty(value = "品牌id")
private String brandId;
/**
* 校区名
*/
@NotBlank(message = "校区名不能为空")
@ApiModelProperty(value = "校区名",required = true)
private String name;
/**
* 负责人
*/
@NotBlank(message = "负责人不能为空")
@ApiModelProperty(value = "负责人",required = true)
private String responsiblePerson;
/**
* 负责人手机号
*/
@NotBlank(message = "负责人手机号不能为空")
@ApiModelProperty(value = "负责人手机号",required = true)
private String responsiblePersonPhone;
}

View File

@ -0,0 +1,29 @@
package com.cpop.jambox.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.List;
/**
* @author: DB
* @Date: 2023/07/04/18:06
* @Description:
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "CampusListByBrandBo对象")
public class CampusListByBrandBo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 品牌id集合
*/
@ApiModelProperty("品牌id集合")
private List<String> brandIds;
}

View File

@ -0,0 +1,26 @@
package com.cpop.jambox.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* @author: Administrator
* @Date: 2023/06/07/10:16
* @Description:
*/@Data
@Accessors(chain = true)
@ApiModel(value = "Campus分页list对象", description = "校区表")
public class CampusPageBo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 校区名
*/
@ApiModelProperty("校区名")
private String name;
}

View File

@ -0,0 +1,29 @@
package com.cpop.jambox.business.bo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* @author DB
* @createTime 2023/09/27 17:00
* @description
*/
@Data
@Accessors(chain = true)
public class CardTemplateListBo implements Serializable {
/**
* 云品牌id
*/
@ApiModelProperty(value = "云品牌id")
private String cloudBrandId;
/**
* 云校区id
*/
@ApiModelProperty(value = "云校区id")
private String cloudCampusId;
}

View File

@ -0,0 +1,123 @@
package com.cpop.jambox.business.bo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.cpop.core.annontation.StringArrayConvert;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Date;
/**
* @author: DB
* @Date: 2023/08/31/11:18
* @Description:
*/
@Data
@ApiModel(value = "课卡模板整合bo")
public class CardTemplateUnionBo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@ApiModelProperty("主键")
private String id;
/**
* 课卡模板名
*/
@NotBlank(message = "课卡模板名不能为空")
@ApiModelProperty(value = "课卡模板名",required = true)
private String name;
/**
* 云校区id
*/
@ApiModelProperty("云校区id")
private String cloudCampusId;
/**
* 云品牌id
*/
@ApiModelProperty("云品牌id")
private String cloudBrandId;
/**
* 使用范围
*/
@NotBlank(message = "使用范围不能为空")
@ApiModelProperty(value = "使用范围(少儿,成人...)", required = true)
private String scopeUse;
/**
* 模板类型(0:课时卡,1:时限卡,2:储值卡)
*/
@NotBlank(message = "模板类型不能为空")
@ApiModelProperty(value = "模板类型(0:课时卡,1:时限卡,2:储值卡)",required = true)
private String templateType;
/**
* 有效日期数
*/
@ApiModelProperty(value = "有效日期数")
private Integer validDay;
/**
* 结束时间
*/
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
@ApiModelProperty(value = "结束日期")
private Date endDate;
/**
* 价格
*/
@NotNull(message = "价格不能为空")
@ApiModelProperty(value = "价格",required = true)
private BigDecimal price;
/**
* 周预约次数
*/
@ApiModelProperty(value = "周预约次数")
private Integer weekAppointment;
/**
* 日预约次数
*/
@ApiModelProperty(value = "日预约次数")
private Integer dayAppointment;
/**
* 缓冲天数
*/
@ApiModelProperty(value = "缓冲天数")
private Integer bufferDay;
/**
* 支付类型(0:微信支付;1:微信先学后付;2:放心学合约支付;3:数字人民币支付)
*/
@StringArrayConvert
@NotBlank(message = "支付类型不能为空")
@ApiModelProperty(value = "支付类型(0:微信支付;1:微信先学后付;2:放心学合约支付;3:数字人民币支付;4:线下支付)",required = true)
private String payType;
/**
* 课时(课时卡必穿)
*/
@ApiModelProperty("课时(课时卡必穿)")
private Integer classNumber;
/**
* 是否是会员(0否1是)
*/
@ApiModelProperty("是否是会员(0否1是)")
private Boolean isMember;
}

View File

@ -0,0 +1,75 @@
package com.cpop.jambox.business.controller;
import com.mybatisflex.core.paginate.Page;
import com.cpop.core.base.R;
import com.cpop.jambox.business.bo.BrandBo;
import com.cpop.jambox.business.bo.BrandPageBo;
import com.cpop.jambox.business.service.BrandService;
import com.cpop.jambox.business.vo.BrandPageVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
/**
* 品牌表 控制层
*
* @author DB
* @since 2023-09-13
*/
@RestController
@Api(tags = "果酱-品牌接口")
@RequestMapping("/brand")
public class BrandController {
@Autowired
private BrandService brandService;
/**
* @descriptions 查询品牌分页列表
* @author DB
* @date 2023/09/13 17:55
* @param bo 请求参数
* @return com.cpop.core.base.R<com.mybatisflex.core.paginate.Page<com.cpop.jambox.business.vo.BrandPageVo>>
*/
@PreAuthorize("@aps.hasPermission('brandAndCampus:brand:list')")
@ApiOperation("查询品牌分页列表")
@GetMapping("/getBrandPage")
public R<Page<BrandPageVo>> getBrandPageList(BrandPageBo bo) {
Page<BrandPageVo> pageVo = brandService.getBrandPage(bo);
return R.ok(pageVo);
}
/**
* @descriptions 修改品牌表
* @author DB
* @date 2023/09/14 11:40
* @param bo 请求参数
* @return com.cpop.core.base.R<java.lang.Void>
*/
@PreAuthorize("@aps.hasPermission('brandAndCampus:brand:update')")
@ApiOperation("修改品牌")
@PutMapping("/updateBrand")
public R<Void> updateBrand(@RequestBody @Validated BrandBo bo) {
brandService.updateBrand(bo);
return R.ok();
}
/**
* @Description: 删除品牌
* @param id 主键
* @return: R<Void>
* @Author: DB
* @Date: 2023/6/5 10:03
**/
@PreAuthorize("@aps.hasPermission('brandAndCampus:brand:remove')")
@ApiOperation("删除品牌")
@DeleteMapping("/removeBrandById/{id}")
public R<Void> removeBrandById(@PathVariable String id) {
brandService.removeById(id);
return R.ok();
}
}

View File

@ -0,0 +1,119 @@
package com.cpop.jambox.business.controller;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import com.cpop.core.base.R;
import com.cpop.jambox.business.bo.BrandStaffBo;
import com.cpop.jambox.business.bo.BrandStaffPageBo;
import com.cpop.jambox.business.bo.CampusListByBrandBo;
import com.cpop.jambox.business.service.BrandService;
import com.cpop.jambox.business.service.BrandStaffService;
import com.cpop.jambox.business.service.CampusService;
import com.cpop.jambox.business.vo.BrandListVo;
import com.cpop.jambox.business.vo.BrandStaffPageVo;
import com.cpop.jambox.business.vo.CampusListByBrandVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import static com.cpop.jambox.business.entity.table.CampusTableDef.CAMPUS;
/**
* 品牌管理员表 控制层
*
* @author DB
* @since 2023-09-13
*/
@RestController
@Api(tags = "品牌管理员表接口")
@RequestMapping("/brandStaff")
public class BrandStaffController {
@Autowired
private BrandStaffService brandStaffService;
@Autowired
private BrandService brandService;
@Autowired
private CampusService campusService;
/**
* @Description: 查询品牌管理员分页列表
* @param bo 请求参数
* @return: R<PageVo<BrandManagementStaffPageListVo>>
* @Author: DB
* @Date: 2023/6/2 14:01
**/
@ApiOperation("查询品牌管理员分页列表")
@GetMapping("/getBrandStaffPage")
public R<Page<BrandStaffPageVo>> getBrandStaffPage(BrandStaffPageBo bo) {
Page<BrandStaffPageVo> pageVo = brandStaffService.getBrandStaffPage(bo);
return R.ok(pageVo);
}
/**
* @descriptions 查询品牌列表
* @author DB
* @date 2023/09/13 17:55
* @return com.cpop.core.base.R<com.mybatisflex.core.paginate.Page<com.cpop.jambox.business.vo.BrandPageVo>>
*/
@ApiOperation("查询品牌列表")
@GetMapping("/getBrandList")
public R<List<BrandListVo>> getBrandList() {
List<BrandListVo> pageVo = brandService.listAs(QueryWrapper.create(), BrandListVo.class);
return R.ok(pageVo);
}
/**
* @Description: 根据品牌查询校区列表
* @return: R<List<CampusListByBrandVo>>
* @Author: DB
* @Date: 2023/6/2 17:37
**/
@ApiOperation("根据品牌查询校区列表")
@PostMapping("/getCampusListByBrand")
public R<List<CampusListByBrandVo>> getCampusListByBrand(@RequestBody CampusListByBrandBo bo) {
List<CampusListByBrandVo> list = campusService.listAs(QueryWrapper.create()
.select(CAMPUS.ID,CAMPUS.NAME,CAMPUS.BRAND_ID)
.and(CAMPUS.BRAND_ID.in(bo.getBrandIds())),
CampusListByBrandVo.class);
return R.ok(list);
}
/**
* @descriptions 新增品牌管理员
* @author DB
* @date 2023/09/14 16:54
* @param bo 请求参数
* @return com.cpop.core.base.R<java.lang.Void>
*/
@PreAuthorize("@aps.hasPermission('brandAndCampus:brandStaff:insert')")
@ApiOperation("新增品牌管理员")
@PostMapping("/insertBrandStaff")
public R<Void> insertBrandStaff(@RequestBody BrandStaffBo bo) {
brandStaffService.insertBrandStaff(bo);
return R.ok();
}
/**
* @Description: 删除品牌管理员
* @param id 主键
* @return: R<Void>
* @Author: DB
* @Date: 2023/6/5 10:03
**/
@PreAuthorize("@aps.hasPermission('brandAndCampus:brandStaff:remove')")
@ApiOperation("删除品牌管理员")
@DeleteMapping("/removeBrandStaffById/{id}")
public R<Void> removeBrandStaffById(@PathVariable String id) {
brandStaffService.removeBrandStaffById(id);
//TODO:通知到云库
return R.ok();
}
}

View File

@ -0,0 +1,97 @@
package com.cpop.jambox.business.controller;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import com.cpop.core.base.R;
import com.cpop.jambox.business.bo.CampusBo;
import com.cpop.jambox.business.bo.CampusPageBo;
import com.cpop.jambox.business.service.BrandService;
import com.cpop.jambox.business.service.CampusService;
import com.cpop.jambox.business.vo.BrandListVo;
import com.cpop.jambox.business.vo.CampusPageVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 校区表 控制层
*
* @author DB
* @since 2023-09-13
*/
@RestController
@Api(tags = "果酱-校区接口")
@RequestMapping("/campus")
public class CampusController {
@Autowired
private CampusService campusService;
@Autowired
private BrandService brandService;
/**
* @Description: 查询校区分页列表
* @param bo 请求参数
* @return R<PageVo<CampusPageListVo>>
* @Author Administrator
* @Date: 2023/6/7 0007 10:18
*/
@PreAuthorize("@aps.hasPermission('brandAndCampus:campus:list')")
@ApiOperation("查询校区分页列表")
@GetMapping("/getCampusPage")
public R<Page<CampusPageVo>> getCampusPage(CampusPageBo bo) {
Page<CampusPageVo> pageVo = campusService.getCampusPage(bo);
return R.ok(pageVo);
}
/**
* @descriptions 查询品牌列表
* @author DB
* @date 2023/09/13 17:55
* @return com.cpop.core.base.R<com.mybatisflex.core.paginate.Page<com.cpop.jambox.business.vo.BrandPageVo>>
*/
@ApiOperation("查询品牌列表")
@GetMapping("/getBrandList")
public R<List<BrandListVo>> getBrandList() {
List<BrandListVo> pageVo = brandService.listAs(QueryWrapper.create(), BrandListVo.class);
return R.ok(pageVo);
}
/**
* @descriptions 修改校区
* @author DB
* @date 2023/09/14 11:40
* @param bo 请求参数
* @return com.cpop.core.base.R<java.lang.Void>
*/
@PreAuthorize("@aps.hasPermission('brandAndCampus:campus:update')")
@ApiOperation("修改校区")
@PutMapping("/updateCampus")
public R<Void> updateCampus(@RequestBody @Validated CampusBo bo) {
campusService.updateCampus(bo);
return R.ok();
}
/**
* @Description: 删除校区
* @param id 主键
* @return: R<Void>
* @Author: DB
* @Date: 2023/6/5 10:03
**/
@PreAuthorize("@aps.hasPermission('brandAndCampus:campus:remove')")
@ApiOperation("删除校区")
@DeleteMapping("/removeCampusById/{id}")
public R<Void> removeCampusById(@PathVariable String id) {
brandService.removeById(id);
//TODO:通知到云库
return R.ok();
}
}

View File

@ -0,0 +1,109 @@
package com.cpop.jambox.business.controller;
import com.mybatisflex.core.paginate.Page;
import com.cpop.core.base.R;
import com.cpop.jambox.business.bo.CardTemplateListBo;
import com.cpop.jambox.business.bo.CardTemplateUnionBo;
import com.cpop.jambox.business.entity.CardTemplate;
import com.cpop.jambox.business.service.CardTemplateService;
import com.cpop.jambox.business.vo.CardTemplateListVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.io.Serializable;
import java.util.List;
/**
* 果酱-课卡模板 控制层
*
* @author DB
* @since 2023-09-27
*/
@RestController
@Api(tags = "果酱-课卡模板接口")
@RequestMapping("/cardTemplate")
public class CardTemplateController {
@Autowired
private CardTemplateService cardTemplateService;
/**
* @descriptions 根据品牌或校区获取模板
* @author DB
* @date 2023/09/27 17:03
* @param bo 请求参数
* @return com.cpop.core.base.R<java.util.List<com.cpop.jambox.business.vo.CardTemplateListVo>>
*/
@GetMapping("/getListByBrandOrCampus")
@ApiOperation("根据品牌或校区获取模板")
public R<List<CardTemplateListVo>> getListByBrandOrCampus(CardTemplateListBo bo) {
List<CardTemplateListVo> list = cardTemplateService.getListByBrandOrCampus(bo);
return R.ok(list);
}
/**
* @descriptions 保存课卡模板
* @author DB
* @date 2023/09/27 17:37
* @param bo 请求参数
* @return com.cpop.core.base.R<java.lang.Void>
*/
@PostMapping("saveUnionCardTemplate")
@ApiOperation("保存课卡模板")
public R<Void> saveUnionCardTemplate(@RequestBody @ApiParam("果酱-课卡模板整合bo") CardTemplateUnionBo bo) {
cardTemplateService.saveUnionCardTemplate(bo);
return R.ok();
}
/**
* 根据主键删除果酱-课卡模板
*
* @param id 主键
* @return {@code true} 删除成功{@code false} 删除失败
*/
@DeleteMapping("remove/{id}")
@ApiOperation("根据主键果酱-课卡模板")
public boolean remove(@PathVariable @ApiParam("果酱-课卡模板主键") Serializable id) {
return cardTemplateService.removeById(id);
}
/**
* 根据主键更新果酱-课卡模板
*
* @param cardTemplate 果酱-课卡模板
* @return {@code true} 更新成功{@code false} 更新失败
*/
@PutMapping("update")
@ApiOperation("根据主键更新果酱-课卡模板")
public boolean update(@RequestBody @ApiParam("果酱-课卡模板主键") CardTemplate cardTemplate) {
return cardTemplateService.updateById(cardTemplate);
}
/**
* 根据果酱-课卡模板主键获取详细信息
*
* @param id 果酱-课卡模板主键
* @return 果酱-课卡模板详情
*/
@GetMapping("getInfo/{id}")
@ApiOperation("根据主键获取果酱-课卡模板")
public CardTemplate getInfo(@PathVariable @ApiParam("果酱-课卡模板主键") Serializable id) {
return cardTemplateService.getById(id);
}
/**
* 分页查询果酱-课卡模板
*
* @param page 分页对象
* @return 分页对象
*/
@GetMapping("page")
@ApiOperation("分页查询果酱-课卡模板")
public Page<CardTemplate> page(@ApiParam("分页信息") Page<CardTemplate> page) {
return cardTemplateService.page(page);
}
}

View File

@ -0,0 +1,66 @@
package com.cpop.jambox.business.entity;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import com.cpop.core.base.entity.BaseEntity;
import com.cpop.core.base.entity.BaseInsertListener;
import com.cpop.core.base.entity.BaseUpdateListener;
import lombok.*;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* 品牌表 实体类
*
* @author DB
* @since 2023-09-13
*/
@Data
@EqualsAndHashCode(callSuper=false)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Table(value = "cp_j_brand", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false)
public class Brand extends BaseEntity implements Serializable {
/**
* 主键
*/
@Id
private String id;
/**
* 云函数id
*/
private String brandCloudId;
/**
* 品牌名
*/
private String name;
/**
* 背景地址
*/
private String backgroundUrl;
/**
* 顾问名
*/
private String consultantName;
/**
* openId
*/
private String openId;
/**
* 是否删除(0否1是)
*/
@Column(isLogicDelete = true)
private Boolean isDelete;
}

View File

@ -0,0 +1,65 @@
package com.cpop.jambox.business.entity;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import com.cpop.core.base.entity.BaseEntity;
import com.cpop.core.base.entity.BaseInsertListener;
import com.cpop.core.base.entity.BaseUpdateListener;
import lombok.*;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* 品牌管理员表 实体类
*
* @author DB
* @since 2023-09-13
*/
@Data
@EqualsAndHashCode(callSuper=false)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Table(value = "cp_j_brand_staff", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false)
public class BrandStaff extends BaseEntity implements Serializable {
/**
* 主键
*/
@Id
private String id;
/**
* 云id
*/
private String brandStaffCloudId;
/**
* 姓名
*/
private String name;
/**
* 手机号
*/
private String phoneNumber;
/**
* 身份(定位)
*/
private String position;
/**
* 是否删除(0否1是)
*/
@Column(isLogicDelete = true)
private Boolean isDelete;
}

View File

@ -0,0 +1,46 @@
package com.cpop.jambox.business.entity;
import com.mybatisflex.annotation.Table;
import com.cpop.core.base.entity.BaseEntity;
import com.cpop.core.base.entity.BaseInsertListener;
import com.cpop.core.base.entity.BaseUpdateListener;
import lombok.*;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* 管理员-品牌-校区表 实体类
*
* @author DB
* @since 2023-09-13
*/
@Data
@EqualsAndHashCode(callSuper=false)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Table(value = "cp_j_brand_staff_mid_campus", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false)
public class BrandStaffMidCampus extends BaseEntity implements Serializable {
/**
* 品牌管理员id
*/
private String brandStaffId;
/**
* 品牌id
*/
private String brandId;
/**
* 校区id
*/
private String campusId;
}

View File

@ -0,0 +1,86 @@
package com.cpop.jambox.business.entity;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import com.cpop.core.base.entity.BaseEntity;
import com.cpop.core.base.entity.BaseInsertListener;
import com.cpop.core.base.entity.BaseUpdateListener;
import lombok.*;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* 校区表 实体类
*
* @author DB
* @since 2023-09-13
*/
@Data
@EqualsAndHashCode(callSuper=false)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Table(value = "cp_j_campus", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false)
public class Campus extends BaseEntity implements Serializable {
/**
* 主键
*/
@Id
private String id;
/**
* 云校区id
*/
private String campusCloudId;
/**
* 品牌id
*/
private String brandId;
/**
* 校区名
*/
private String name;
/**
* 负责人
*/
private String responsiblePerson;
/**
* 负责人手机号
*/
private String responsiblePersonPhone;
/**
* 地址
*/
private String address;
/**
* openId
*/
private String openId;
/**
* 到期时间
*/
private LocalDateTime expire;
/**
* 是否删除(0否1是)
*/
@Column(isLogicDelete = true)
private Boolean isDelete;
}

View File

@ -0,0 +1,128 @@
package com.cpop.jambox.business.entity;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import com.cpop.core.base.entity.BaseEntity;
import com.cpop.core.base.entity.BaseInsertListener;
import com.cpop.core.base.entity.BaseUpdateListener;
import lombok.*;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Date;
/**
* 果酱-课卡模板 实体类
*
* @author DB
* @since 2023-09-27
*/
@Data
@EqualsAndHashCode(callSuper=false)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Table(value = "cp_j_card_template", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false)
public class CardTemplate extends BaseEntity implements Serializable {
/**
* 主键
*/
@Id
private String id;
/**
* 云品牌id
*/
private String cloudBrandId;
/**
* 云校区id
*/
private String cloudCampusId;
/**
* 是否使用(0否1是)
*/
private Boolean status;
/**
* 模板名
*/
private String name;
/**
* 有效日期数
*/
private Integer validDay;
/**
* 开始日期
*/
private Date startDate;
/**
* 结束日期
*/
private Date endDate;
/**
* 价格
*/
private BigDecimal price;
/**
* 课时
*/
private Integer classNumber;
/**
* 周预约数
*/
private Integer weekAppointment;
/**
* 日预约数
*/
private Integer dayAppointment;
/**
* 缓冲天数
*/
private Integer bufferDay;
/**
* 模板类型(0:课时卡,1:时限卡,2:储值卡)
*/
private Integer templateType;
/**
* 使用范围
*/
private String scopeUse;
/**
* 支付类型(0:微信支付;1:微信先学后付;2:放心学合约支付;3:数字人民币支付;4:线下支付)
*/
private String payType;
/**
* 太阳码
*/
private String qrCode;
/**
* 是否是会员(0否1是)
*/
private Boolean isMember;
/**
* 逻辑删除(0否1是)
*/
@Column(isLogicDelete = true)
private Boolean isDelete;
}

View File

@ -0,0 +1,14 @@
package com.cpop.jambox.business.mapper;
import com.mybatisflex.core.BaseMapper;
import com.cpop.jambox.business.entity.Brand;
/**
* 品牌表 映射层
*
* @author DB
* @since 2023-09-13
*/
public interface BrandMapper extends BaseMapper<Brand> {
}

View File

@ -0,0 +1,14 @@
package com.cpop.jambox.business.mapper;
import com.mybatisflex.core.BaseMapper;
import com.cpop.jambox.business.entity.BrandStaff;
/**
* 品牌管理员表 映射层
*
* @author DB
* @since 2023-09-13
*/
public interface BrandStaffMapper extends BaseMapper<BrandStaff> {
}

View File

@ -0,0 +1,14 @@
package com.cpop.jambox.business.mapper;
import com.mybatisflex.core.BaseMapper;
import com.cpop.jambox.business.entity.BrandStaffMidCampus;
/**
* 管理员-品牌-校区表 映射层
*
* @author DB
* @since 2023-09-13
*/
public interface BrandStaffMidCampusMapper extends BaseMapper<BrandStaffMidCampus> {
}

View File

@ -0,0 +1,14 @@
package com.cpop.jambox.business.mapper;
import com.mybatisflex.core.BaseMapper;
import com.cpop.jambox.business.entity.Campus;
/**
* 校区表 映射层
*
* @author DB
* @since 2023-09-13
*/
public interface CampusMapper extends BaseMapper<Campus> {
}

View File

@ -0,0 +1,14 @@
package com.cpop.jambox.business.mapper;
import com.mybatisflex.core.BaseMapper;
import com.cpop.jambox.business.entity.CardTemplate;
/**
* 果酱-课卡模板 映射层
*
* @author DB
* @since 2023-09-27
*/
public interface CardTemplateMapper extends BaseMapper<CardTemplate> {
}

View File

@ -0,0 +1,34 @@
package com.cpop.jambox.business.service;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;
import com.cpop.jambox.business.bo.BrandBo;
import com.cpop.jambox.business.bo.BrandPageBo;
import com.cpop.jambox.business.entity.Brand;
import com.cpop.jambox.business.vo.BrandPageVo;
/**
* 品牌表 服务层
*
* @author DB
* @since 2023-09-13
*/
public interface BrandService extends IService<Brand> {
/**
* @descriptions 查询品牌分页列表
* @author DB
* @date 2023/09/13 17:55
* @param bo 请求参数
* @return com.cpop.core.base.R<com.mybatisflex.core.paginate.Page<com.cpop.jambox.business.vo.BrandPageVo>>
*/
Page<BrandPageVo> getBrandPage(BrandPageBo bo);
/**
* @descriptions 修改品牌表
* @author DB
* @date 2023/09/14 11:40
* @param bo 请求参数
*/
void updateBrand(BrandBo bo);
}

View File

@ -0,0 +1,14 @@
package com.cpop.jambox.business.service;
import com.mybatisflex.core.service.IService;
import com.cpop.jambox.business.entity.BrandStaffMidCampus;
/**
* 管理员-品牌-校区表 服务层
*
* @author DB
* @since 2023-09-13
*/
public interface BrandStaffMidCampusService extends IService<BrandStaffMidCampus> {
}

View File

@ -0,0 +1,43 @@
package com.cpop.jambox.business.service;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;
import com.cpop.jambox.business.bo.BrandStaffBo;
import com.cpop.jambox.business.bo.BrandStaffPageBo;
import com.cpop.jambox.business.entity.BrandStaff;
import com.cpop.jambox.business.vo.BrandStaffPageVo;
/**
* 品牌管理员表 服务层
*
* @author DB
* @since 2023-09-13
*/
public interface BrandStaffService extends IService<BrandStaff> {
/**
* @Description: 查询品牌管理员分页列表
* @param bo 请求参数
* @return: R<PageVo<BrandManagementStaffPageListVo>>
* @Author: DB
* @Date: 2023/6/2 14:01
**/
Page<BrandStaffPageVo> getBrandStaffPage(BrandStaffPageBo bo);
/**
* @descriptions 新增品牌管理员
* @author DB
* @date 2023/09/14 16:54
* @param bo 请求参数
*/
void insertBrandStaff(BrandStaffBo bo);
/**
* @Description: 删除品牌管理员
* @param id 主键
* @return: R<Void>
* @Author: DB
* @Date: 2023/6/5 10:03
**/
void removeBrandStaffById(String id);
}

View File

@ -0,0 +1,34 @@
package com.cpop.jambox.business.service;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;
import com.cpop.jambox.business.bo.CampusBo;
import com.cpop.jambox.business.bo.CampusPageBo;
import com.cpop.jambox.business.entity.Campus;
import com.cpop.jambox.business.vo.CampusPageVo;
/**
* 校区表 服务层
*
* @author DB
* @since 2023-09-13
*/
public interface CampusService extends IService<Campus> {
/**
* @Description: 查询校区分页列表
* @param bo 请求参数
* @return R<PageVo<CampusPageListVo>>
* @Author Administrator
* @Date: 2023/6/7 0007 10:18
*/
Page<CampusPageVo> getCampusPage(CampusPageBo bo);
/**
* @descriptions 修改校区
* @author DB
* @date 2023/09/14 11:40
* @param bo 请求参数
*/
void updateCampus(CampusBo bo);
}

View File

@ -0,0 +1,36 @@
package com.cpop.jambox.business.service;
import com.mybatisflex.core.service.IService;
import com.cpop.jambox.business.bo.CardTemplateListBo;
import com.cpop.jambox.business.bo.CardTemplateUnionBo;
import com.cpop.jambox.business.entity.CardTemplate;
import com.cpop.jambox.business.vo.CardTemplateListVo;
import java.util.List;
/**
* 果酱-课卡模板 服务层
*
* @author DB
* @since 2023-09-27
*/
public interface CardTemplateService extends IService<CardTemplate> {
/**
* @descriptions 根据品牌或校区获取模板
* @author DB
* @date 2023/09/27 17:02
* @param bo 请求参数
* @return java.util.List<com.cpop.jambox.business.vo.CardTemplateListVo>
*/
List<CardTemplateListVo> getListByBrandOrCampus(CardTemplateListBo bo);
/**
* @descriptions 保存课卡模板
* @author DB
* @date 2023/09/27 18:00
* @param bo 请求参数
* @return: void
*/
void saveUnionCardTemplate(CardTemplateUnionBo bo);
}

View File

@ -0,0 +1,67 @@
package com.cpop.jambox.business.service.impl;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import com.cpop.common.utils.bean.BeanUtils;
import com.cpop.core.base.entity.PageDomain;
import com.cpop.core.utils.sql.SqlUtils;
import com.cpop.jambox.business.bo.BrandBo;
import com.cpop.jambox.business.bo.BrandPageBo;
import com.cpop.jambox.business.entity.Brand;
import com.cpop.jambox.business.mapper.BrandMapper;
import com.cpop.jambox.business.service.BrandService;
import com.cpop.jambox.business.vo.BrandPageVo;
import org.springframework.stereotype.Service;
import static com.mybatisflex.core.query.QueryMethods.groupConcat;
import static com.cpop.jambox.business.entity.table.BrandStaffMidCampusTableDef.BRAND_STAFF_MID_CAMPUS;
import static com.cpop.jambox.business.entity.table.BrandStaffTableDef.BRAND_STAFF;
import static com.cpop.jambox.business.entity.table.BrandTableDef.BRAND;
/**
* 品牌表 服务层实现
*
* @author DB
* @since 2023-09-13
*/
@Service("brandService")
public class BrandServiceImpl extends ServiceImpl<BrandMapper, Brand> implements BrandService {
/**
* @descriptions 查询品牌分页列表
* @author DB
* @date 2023/09/13 17:55
* @param bo 请求参数
* @return com.cpop.core.base.R<com.mybatisflex.core.paginate.Page<com.cpop.jambox.business.vo.BrandPageVo>>
*/
@Override
public Page<BrandPageVo> getBrandPage(BrandPageBo bo) {
PageDomain pageDomain = SqlUtils.getInstance().getPageDomain();
return this.mapper.paginateAs(pageDomain.getPageNum(),pageDomain.getPageSize(),
QueryWrapper.create()
.select(BRAND.ID,BRAND.BRAND_CLOUD_ID,BRAND.NAME,BRAND.CREATE_TIME,BRAND.BACKGROUND_URL,BRAND.CONSULTANT_NAME)
.select(groupConcat(BRAND_STAFF_MID_CAMPUS.BRAND_STAFF_ID).as(BrandPageVo::getBrandStaffId))
.select(groupConcat(BRAND_STAFF.NAME).as(BrandPageVo::getBrandStaffName))
//管理员-品牌-校区表
.leftJoin(BRAND_STAFF_MID_CAMPUS).on(BRAND_STAFF_MID_CAMPUS.BRAND_ID.eq(BRAND.ID))
//管理员
.leftJoin(BRAND_STAFF).on(BRAND_STAFF.ID.eq(BRAND_STAFF_MID_CAMPUS.BRAND_STAFF_ID))
.and(BRAND.NAME.like(bo.getName()))
.groupBy(BRAND.ID),
BrandPageVo.class);
}
/**
* @descriptions 修改品牌表
* @author DB
* @date 2023/09/14 11:40
* @param bo 请求参数
*/
@Override
public void updateBrand(BrandBo bo) {
Brand entity = BeanUtils.mapToClass(bo, Brand.class);
this.updateById(entity);
//TODO:可能需要通知到云库
}
}

View File

@ -0,0 +1,18 @@
package com.cpop.jambox.business.service.impl;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import com.cpop.jambox.business.entity.BrandStaffMidCampus;
import com.cpop.jambox.business.mapper.BrandStaffMidCampusMapper;
import com.cpop.jambox.business.service.BrandStaffMidCampusService;
import org.springframework.stereotype.Service;
/**
* 管理员-品牌-校区表 服务层实现
*
* @author DB
* @since 2023-09-13
*/
@Service("brandStaffMidCampusService")
public class BrandStaffMidCampusServiceImpl extends ServiceImpl<BrandStaffMidCampusMapper, BrandStaffMidCampus> implements BrandStaffMidCampusService {
}

View File

@ -0,0 +1,146 @@
package com.cpop.jambox.business.service.impl;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import com.cpop.common.utils.bean.BeanUtils;
import com.cpop.core.base.entity.PageDomain;
import com.cpop.core.base.exception.ServiceException;
import com.cpop.core.utils.SpringUtils;
import com.cpop.core.utils.sql.SqlUtils;
import com.cpop.jambox.business.bo.BrandStaffBo;
import com.cpop.jambox.business.bo.BrandStaffPageBo;
import com.cpop.jambox.business.entity.BrandStaff;
import com.cpop.jambox.business.entity.BrandStaffMidCampus;
import com.cpop.jambox.business.entity.Campus;
import com.cpop.jambox.business.mapper.BrandStaffMapper;
import com.cpop.jambox.business.service.BrandStaffMidCampusService;
import com.cpop.jambox.business.service.BrandStaffService;
import com.cpop.jambox.business.service.CampusService;
import com.cpop.jambox.business.vo.BrandStaffPageVo;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import static com.mybatisflex.core.query.QueryMethods.groupConcat;
import static com.cpop.jambox.business.entity.table.BrandStaffMidCampusTableDef.BRAND_STAFF_MID_CAMPUS;
import static com.cpop.jambox.business.entity.table.BrandStaffTableDef.BRAND_STAFF;
import static com.cpop.jambox.business.entity.table.BrandTableDef.BRAND;
import static com.cpop.jambox.business.entity.table.CampusTableDef.CAMPUS;
/**
* 品牌管理员表 服务层实现
*
* @author DB
* @since 2023-09-13
*/
@Service("brandStaffService")
public class BrandStaffServiceImpl extends ServiceImpl<BrandStaffMapper, BrandStaff> implements BrandStaffService {
/**
* @Description: 查询品牌管理员分页列表
* @param bo 请求参数
* @return: R<PageVo<BrandManagementStaffPageListVo>>
* @Author: DB
* @Date: 2023/6/2 14:01
**/
@Override
public Page<BrandStaffPageVo> getBrandStaffPage(BrandStaffPageBo bo) {
PageDomain pageDomain = SqlUtils.getInstance().getPageDomain();
return this.mapper.paginateAs(pageDomain.getPageNum(),pageDomain.getPageSize(),
QueryWrapper.create()
.select(BRAND_STAFF.ID,BRAND_STAFF.NAME,BRAND_STAFF.PHONE_NUMBER,BRAND_STAFF.CREATE_TIME)
.select(groupConcat(distinct(BRAND_STAFF_MID_CAMPUS.BRAND_ID)).as(BrandStaffPageVo::getBrandId), groupConcat(distinct(BRAND_STAFF_MID_CAMPUS.CAMPUS_ID)).as(BrandStaffPageVo::getCampusId))
.select(groupConcat(distinct(BRAND.NAME)).as(BrandStaffPageVo::getBrandName))
.select(groupConcat(distinct(CAMPUS.NAME)).as(BrandStaffPageVo::getCampusName))
//管理员表
.from(BRAND_STAFF)
//中间表
.leftJoin(BRAND_STAFF_MID_CAMPUS).on(BRAND_STAFF_MID_CAMPUS.BRAND_STAFF_ID.eq(BRAND_STAFF.ID))
//品牌表
.leftJoin(BRAND).on(BRAND.ID.eq(BRAND_STAFF_MID_CAMPUS.BRAND_ID))
//校区表
.leftJoin(CAMPUS).on(CAMPUS.ID.eq(BRAND_STAFF_MID_CAMPUS.CAMPUS_ID))
.and(BRAND_STAFF.NAME.like(bo.getName()))
.and(BRAND_STAFF.PHONE_NUMBER.eq(bo.getPhoneNumber()))
.and(BRAND.NAME.like(bo.getBrandName()))
.groupBy(BRAND_STAFF.ID),
BrandStaffPageVo.class);
}
/**
* @descriptions 新增品牌管理员
* @author DB
* @date 2023/09/14 16:54
* @param bo 请求参数
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void insertBrandStaff(BrandStaffBo bo) {
BrandStaff brandStaff = BeanUtils.mapToClass(bo, BrandStaff.class);
List<BrandStaffMidCampus> list = new ArrayList<>();
//是否有校区ids
if (bo.getCampusIds().isEmpty()){
//只有品牌
if (bo.getBrandIds().isEmpty()) {
throw new ServiceException("品牌与校区都不存在,添加失败");
} else {
//TODO:向云库添加管理员数据
this.save(brandStaff);
bo.getBrandIds().forEach(item -> {
//中间表只有品牌信息
BrandStaffMidCampus brandStaffMidCampus = new BrandStaffMidCampus();
brandStaffMidCampus.setBrandStaffId(brandStaff.getId());
brandStaffMidCampus.setBrandId(item);
list.add(brandStaffMidCampus);
});
}
} else {
//先查询校区关联的品牌是否全包含在传入的品牌中
List<Campus> campusList = SpringUtils.getBean(CampusService.class).list(QueryWrapper.create().where(CAMPUS.ID.in(bo.getCampusIds())));
Set<String> campusBrandIds = campusList
.stream().map(Campus::getBrandId).collect(Collectors.toSet());
Set<String> filterBrandIds = bo.getBrandIds().stream().filter(s -> !campusBrandIds.contains(s)).collect(Collectors.toSet());
//存在只有品牌没有校区的数据
if (!filterBrandIds.isEmpty()) {
filterBrandIds.forEach(item -> {
BrandStaffMidCampus brandStaffMidCampus = new BrandStaffMidCampus();
brandStaffMidCampus.setBrandStaffId(brandStaff.getId());
brandStaffMidCampus.setBrandId(item);
list.add(brandStaffMidCampus);
});
}
campusList.forEach(item -> {
//中间表只有品牌信息
BrandStaffMidCampus brandStaffMidCampus = new BrandStaffMidCampus();
brandStaffMidCampus.setBrandStaffId(brandStaff.getId());
brandStaffMidCampus.setBrandId(item.getBrandId());
brandStaffMidCampus.setCampusId(item.getId());
list.add(brandStaffMidCampus);
});
}
//添加到中间表
SpringUtils.getBean(BrandStaffMidCampusService.class).saveBatch(list);
}
/**
* @Description: 删除品牌管理员
* @param id 主键
* @return: R<Void>
* @Author: DB
* @Date: 2023/6/5 10:03
**/
@Override
@Transactional(rollbackFor = Exception.class)
public void removeBrandStaffById(String id) {
//删除中间表
SpringUtils.getBean(BrandStaffMidCampusService.class).remove(QueryWrapper.create().where(BRAND_STAFF_MID_CAMPUS.BRAND_STAFF_ID.eq(id)));
//删除数据
this.removeById(id);
//TODO:通知到云库
}
}

View File

@ -0,0 +1,59 @@
package com.cpop.jambox.business.service.impl;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import com.cpop.common.utils.bean.BeanUtils;
import com.cpop.core.base.entity.PageDomain;
import com.cpop.core.utils.sql.SqlUtils;
import com.cpop.jambox.business.bo.CampusBo;
import com.cpop.jambox.business.bo.CampusPageBo;
import com.cpop.jambox.business.entity.Campus;
import com.cpop.jambox.business.mapper.CampusMapper;
import com.cpop.jambox.business.service.CampusService;
import com.cpop.jambox.business.vo.CampusPageVo;
import org.springframework.stereotype.Service;
import static com.cpop.jambox.business.entity.table.BrandTableDef.BRAND;
import static com.cpop.jambox.business.entity.table.CampusTableDef.CAMPUS;
/**
* 校区表 服务层实现
*
* @author DB
* @since 2023-09-13
*/
@Service("campusService")
public class CampusServiceImpl extends ServiceImpl<CampusMapper, Campus> implements CampusService {
/**
* @Description: 查询校区分页列表
* @param bo 请求参数
* @return R<PageVo<CampusPageListVo>>
* @Author Administrator
* @Date: 2023/6/7 0007 10:18
*/
@Override
public Page<CampusPageVo> getCampusPage(CampusPageBo bo) {
PageDomain pageDomain = SqlUtils.getInstance().getPageDomain();
return this.mapper.paginateAs(pageDomain.getPageNum(),pageDomain.getPageSize(),
QueryWrapper.create()
.select(CAMPUS.ALL_COLUMNS)
.select(BRAND.NAME.as(CampusPageVo::getBrandName))
.leftJoin(BRAND).on(BRAND.ID.eq(CAMPUS.BRAND_ID))
.and(CAMPUS.NAME.like(bo.getName())),
CampusPageVo.class);
}
/**
* @descriptions 修改校区
* @author DB
* @date 2023/09/14 11:40
* @param bo 请求参数
*/
@Override
public void updateCampus(CampusBo bo) {
this.updateById(BeanUtils.mapToClass(bo, Campus.class));
//TODO:通知到云库
}
}

View File

@ -0,0 +1,98 @@
package com.cpop.jambox.business.service.impl;
import cn.binarywang.wx.miniapp.api.WxMaService;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import com.cpop.common.utils.bean.BeanUtils;
import com.cpop.core.base.exception.ServiceException;
import com.cpop.core.utils.SpringUtils;
import com.cpop.jambox.business.bo.CardTemplateListBo;
import com.cpop.jambox.business.bo.CardTemplateUnionBo;
import com.cpop.jambox.business.entity.CardTemplate;
import com.cpop.jambox.business.mapper.CardTemplateMapper;
import com.cpop.jambox.business.service.CardTemplateService;
import com.cpop.jambox.business.vo.CardTemplateListVo;
import com.cpop.sdk.framework.handler.QCloudCosHandler;
import me.chanjar.weixin.common.error.WxErrorException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.io.File;
import java.util.List;
import static com.cpop.jambox.business.entity.table.CardTemplateTableDef.CARD_TEMPLATE;
/**
* 果酱-课卡模板 服务层实现
*
* @author DB
* @since 2023-09-27
*/
@Service("cardTemplateService")
public class CardTemplateServiceImpl extends ServiceImpl<CardTemplateMapper, CardTemplate> implements CardTemplateService {
@Autowired
private WxMaService wxMaService;
@Autowired
private QCloudCosHandler qCloudCosHandler;
/**
* 小程序模板调整路径
*/
private final String TEMPLATE_URL = "pages/pay/pay";
/**
* @descriptions 根据品牌或校区获取模板
* @author DB
* @date 2023/09/27 17:02
* @param bo 请求参数
* @return java.util.List<com.cpop.jambox.business.vo.CardTemplateListVo>
*/
@Override
public List<CardTemplateListVo> getListByBrandOrCampus(CardTemplateListBo bo) {
return this.listAs(QueryWrapper.create()
.and(CARD_TEMPLATE.CLOUD_BRAND_ID.eq(bo.getCloudBrandId()))
.and(CARD_TEMPLATE.CLOUD_CAMPUS_ID.eq(bo.getCloudCampusId()))
.orderBy(CARD_TEMPLATE.CREATE_TIME.asc()),
CardTemplateListVo.class);
}
/**
* @descriptions 保存课卡模板
* @author DB
* @date 2023/09/27 18:00
* @param bo 请求参数
* @return: void
*/
@Override
public void saveUnionCardTemplate(CardTemplateUnionBo bo) {
CardTemplate cardTemplate = BeanUtils.mapToClass(bo, CardTemplate.class);
this.save(cardTemplate);
//生成太阳码
try {
File file = wxMaService.getQrcodeService().createWxaCodeUnlimit(cardTemplate.getId(),
TEMPLATE_URL, true, SpringUtils.getActiveProfile(), 300, true, null, true);
String cdnUrl = qCloudCosHandler.upload(file);
this.updateChain().set(CARD_TEMPLATE.QR_CODE, cdnUrl).where(CARD_TEMPLATE.ID.eq(cardTemplate.getId())).update();
} catch (WxErrorException e) {
throw new ServiceException(e.getMessage());
}
}
/**
* 获取小程序环境
* @param env 当前环境
* @return 小程序码环境
*/
private String getQrCodeEnv(String env) {
switch (env) {
case "prod":
return "release";
case "dev":
case "test":
default:
return "trial";
}
}
}

View File

@ -0,0 +1,40 @@
package com.cpop.jambox.business.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* Description:
* date: 2023/6/2 17:39
*
* @Author ST
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "Brand对象", description = "品牌表")
public class BrandListVo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@ApiModelProperty("主键")
private String id;
/**
* 云函数id
*/
@ApiModelProperty("云函数id")
private String brandCloudId;
/**
* 品牌名
*/
@ApiModelProperty("品牌名")
private String name;
}

View File

@ -0,0 +1,75 @@
package com.cpop.jambox.business.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.cpop.core.annontation.StringArrayConvert;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* Description:
* date: 2023/6/1 18:08
*
* @Author ST
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "Brand分页返回对象", description = "Brand分页返回对象")
public class BrandPageVo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@ApiModelProperty("主键")
private String id;
/**
* 云函数id
*/
@ApiModelProperty("云函数id")
private String brandCloudId;
/**
* 品牌名
*/
@ApiModelProperty("品牌名")
private String name;
/**
* 背景地址
*/
@StringArrayConvert
@ApiModelProperty("背景地址")
private String backgroundUrl;
/**
* 顾问名
*/
@ApiModelProperty("顾问名")
private String consultantName;
/**
* 品牌管理员工id
*/
@ApiModelProperty("品牌管理员工id")
private String brandStaffId;
/**
* 品牌管理员工
*/
@ApiModelProperty("品牌管理员工")
private String brandStaffName;
/**
* 创建时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
@ApiModelProperty("创建时间")
private LocalDateTime createTime;
}

View File

@ -0,0 +1,73 @@
package com.cpop.jambox.business.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* Description:
* date: 2023/6/2 13:38
*
* @Author ST
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "BrandManagementStaff对象", description = "品牌管理员表")
public class BrandStaffPageVo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@ApiModelProperty("主键")
private String id;
/**
* 姓名
*/
@ApiModelProperty("姓名")
private String name;
/**
* 手机号
*/
@ApiModelProperty("手机号")
private String phoneNumber;
/**
* 创建时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
@ApiModelProperty("创建时间")
private LocalDateTime createTime;
/**
* 品牌名
*/
@ApiModelProperty("品牌名")
private String brandName;
/**
* 品牌id
*/
@ApiModelProperty("品牌id")
private String brandId;
/**
* 校区名
*/
@ApiModelProperty("校区名")
private String campusName;
/**
* 校区id
*/
@ApiModelProperty("校区id")
private String campusId;
}

View File

@ -0,0 +1,39 @@
package com.cpop.jambox.business.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* @author: DB
* @Date: 2023/07/04/18:10
* @Description:
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "Campus分页对象", description = "校区表")
public class CampusListByBrandVo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@ApiModelProperty("主键")
private String id;
/**
* 品牌id
*/
@ApiModelProperty("品牌id")
private String brandId;
/**
* 校区名
*/
@ApiModelProperty("校区名")
private String name;
}

View File

@ -0,0 +1,96 @@
package com.cpop.jambox.business.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @author: Administrator
* @Date: 2023/06/07/10:17
* @Description:
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "Campus分页对象", description = "校区表")
public class CampusPageVo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@ApiModelProperty("主键")
private String id;
/**
* 云校区id
*/
@ApiModelProperty("云校区id")
private String campusCloudId;
/**
* 品牌id
*/
@ApiModelProperty("品牌id")
private String brandId;
/**
* 品牌
*/
@ApiModelProperty("品牌")
private String brandName;
/**
* 校区名
*/
@ApiModelProperty("校区名")
private String name;
/**
* 负责人
*/
@ApiModelProperty("负责人")
private String responsiblePerson;
/**
* 负责人手机号
*/
@ApiModelProperty("负责人手机号")
private String responsiblePersonPhone;
/**
* 地址
*/
@ApiModelProperty("地址")
private String address;
/**
* openId
*/
@ApiModelProperty("openId")
private String openId;
/**
* 到期时间
*/
@ApiModelProperty("到期时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private LocalDateTime expire;
/**
* 是否签合同(0否1是)
*/
@ApiModelProperty("是否签合同(0否1是)")
private Boolean isSignContract;
/**
* 顾问名
*/
@ApiModelProperty("顾问名")
private String consultantName;
}

View File

@ -0,0 +1,93 @@
package com.cpop.jambox.business.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Date;
/**
* @author DB
* @createTime 2023/09/27 16:57
* @description
*/
@Data
@Accessors(chain = true)
public class CardTemplateListVo implements Serializable {
/**
* 主键
*/
@ApiModelProperty(value = "主键")
private String id;
/**
* 云品牌id
*/
@ApiModelProperty(value = "云品牌id")
private String cloudBrandId;
/**
* 云校区id
*/
@ApiModelProperty(value = "云校区id")
private String cloudCampusId;
/**
* 模板名
*/
@ApiModelProperty(value = "模板名")
private String name;
/**
* 价格
*/
@ApiModelProperty(value = "价格")
private BigDecimal price;
/**
* 有效日期
*/
@ApiModelProperty(value = "有效日期")
private Integer validDay;
/**
* 课时
*/
@ApiModelProperty(value = "课时")
private Integer classNumber;
/**
* 模板类型(0:课时卡,1:时限卡,2:储值卡)
*/
@ApiModelProperty(value = "模板类型(0:课时卡,1:时限卡,2:储值卡)")
private Integer templateType;
/**
* 使用范围
*/
@ApiModelProperty(value = "使用范围")
private String scopeUse;
/**
* 是否是会员(0否1是)
*/
@ApiModelProperty(value = "是否是会员(0否1是)")
private Boolean isMember;
/**
* 结束日期
*/
@ApiModelProperty(value = "结束日期")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date endDate;
/**
* 太阳码
*/
@ApiModelProperty(value = "太阳码")
private String qrCode;
}

View File

@ -0,0 +1 @@

View File

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

View File

@ -0,0 +1,7 @@
<?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.jambox.business.mapper.BrandStaffMapper">
</mapper>

View File

@ -0,0 +1,7 @@
<?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.jambox.business.mapper.BrandStaffMidCampusMapper">
</mapper>

View File

@ -0,0 +1,7 @@
<?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.jambox.business.mapper.CampusMapper">
</mapper>

View File

@ -0,0 +1,7 @@
<?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.jambox.business.mapper.CardTemplateMapper">
</mapper>

View File

@ -19,6 +19,10 @@
<groupId>com.cpop</groupId>
<artifactId>Cpop-Core</artifactId>
</dependency>
<dependency>
<groupId>com.cpop</groupId>
<artifactId>Cpop-Api</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -1,8 +1,5 @@
package com.cpop.oam.business.service.impl;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import com.cpop.api.tencent.wxWork.handler.WebHookSendHandler;
import com.cpop.common.utils.StringUtils;
import com.cpop.common.utils.bean.BeanUtils;
@ -27,6 +24,9 @@ import com.cpop.oam.business.service.TaskService;
import com.cpop.oam.business.vo.TaskDemandPageVo;
import com.cpop.oam.framework.constant.WebHookKeyConstant;
import com.cpop.oam.framework.enums.OamConfigEnum;
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.io.IOException;

12
pom.xml
View File

@ -21,6 +21,7 @@
<module>Cpop-Generator</module>
<module>Cpop-Oam</module>
<module>Cpop-Oam/Cpop-Oam-Web</module>
<module>Cpop-Jambox</module>
</modules>
<properties>
@ -83,12 +84,21 @@
<artifactId>Cpop-Core</artifactId>
<version>${cpop.version}</version>
</dependency>
<!--Cpop公共包-->
<dependency>
<groupId>com.cpop</groupId>
<artifactId>Cpop-Api</artifactId>
<version>${cpop.version}</version>
</dependency>
<dependency>
<groupId>com.cpop</groupId>
<artifactId>Cpop-Oam</artifactId>
<version>${cpop.version}</version>
</dependency>
<dependency>
<groupId>com.cpop</groupId>
<artifactId>Cpop-Jambox</artifactId>
<version>${cpop.version}</version>
</dependency>
<!--HikariCP-->
<dependency>
<groupId>com.zaxxer</groupId>