diff --git a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/backstage/EasyLearnController.java b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/backstage/BackstageEasyLearnController.java similarity index 98% rename from Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/backstage/EasyLearnController.java rename to Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/backstage/BackstageEasyLearnController.java index ee232f0..e064c00 100644 --- a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/backstage/EasyLearnController.java +++ b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/backstage/BackstageEasyLearnController.java @@ -26,8 +26,8 @@ import java.net.URLEncoder; */ @RestController @Api(tags = "果酱-放心学订单表接口") -@RequestMapping("/easyLearn") -public class EasyLearnController { +@RequestMapping("/backstage/easyLearn") +public class BackstageEasyLearnController { @Autowired private EasyLearnOrderService easyLearnOrderService; diff --git a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/backstage/website/ProductController.java b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/backstage/website/ProductController.java index e185761..f11c454 100644 --- a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/backstage/website/ProductController.java +++ b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/backstage/website/ProductController.java @@ -1,6 +1,8 @@ package com.cpop.jambox.business.controller.backstage.website; import com.cpop.core.base.R; +import com.cpop.jambox.business.entity.website.WebProduct; +import com.cpop.jambox.business.service.WebProductService; import com.mybatisflex.core.paginate.Page; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; @@ -10,8 +12,6 @@ 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.jambox.business.entity.website.Product; -import com.cpop.jambox.business.service.ProductService; import org.springframework.web.bind.annotation.RestController; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -31,7 +31,7 @@ import java.util.List; public class ProductController { @Autowired - private ProductService productService; + private WebProductService productService; /** * 添加果酱模块化官网 核心产品表。 @@ -41,7 +41,7 @@ public class ProductController { */ @PostMapping("/save") @ApiOperation("保存果酱模块化官网 核心产品表") - public R save(@RequestBody @ApiParam("果酱模块化官网 核心产品表") Product product) { + public R save(@RequestBody @ApiParam("果酱模块化官网 核心产品表") WebProduct product) { productService.save(product); return R.ok(); } @@ -67,7 +67,7 @@ public class ProductController { */ @PutMapping("/update") @ApiOperation("根据主键更新果酱模块化官网 核心产品表") - public R update(@RequestBody @ApiParam("果酱模块化官网 核心产品表主键") Product product) { + public R update(@RequestBody @ApiParam("果酱模块化官网 核心产品表主键") WebProduct product) { productService.updateById(product); return R.ok(); } @@ -79,7 +79,7 @@ public class ProductController { */ @GetMapping("/list") @ApiOperation("查询所有果酱模块化官网 核心产品表") - public R> list() { + public R> list() { return R.ok(productService.list()); } @@ -91,7 +91,7 @@ public class ProductController { */ @GetMapping("/getInfo/{id}") @ApiOperation("根据主键获取果酱模块化官网 核心产品表") - public R getInfo(@PathVariable @ApiParam("果酱模块化官网 核心产品表主键") Serializable id) { + public R getInfo(@PathVariable @ApiParam("果酱模块化官网 核心产品表主键") Serializable id) { return R.ok(productService.getById(id)); } @@ -103,7 +103,7 @@ public class ProductController { */ @GetMapping("/page") @ApiOperation("分页查询果酱模块化官网 核心产品表") - public R> page(@ApiParam("分页信息") Page page) { + public R> page(@ApiParam("分页信息") Page page) { return R.ok(productService.page(page)); } diff --git a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/callback/CallBackEasyLearnController.java b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/callback/CallBackEasyLearnController.java index 019efde..88ff134 100644 --- a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/callback/CallBackEasyLearnController.java +++ b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/callback/CallBackEasyLearnController.java @@ -48,4 +48,30 @@ public class CallBackEasyLearnController { easyLearnOrderService.userServiceOrderSuccess(notifyData); return WxPayNotifyResponse.success("成功"); } + + /** + * 微信支付订单通知 + * @author DB + * @since 2023/12/21 + * @param xmlData 数据 + * @return java.lang.String + */ + @ApiOperation("微信支付订单通知") + @PostMapping("/notify/oncePay") + public String oncePayResult(@RequestBody String xmlData){ + easyLearnOrderService.oncePayResult(xmlData); + return WxPayNotifyResponse.success("成功"); + } + + /** + * 微信支付联合支付订单通知 + * @param xmlData 数据 + * @return java.lang.String + */ + @ApiOperation("微信支付联合支付订单通知") + @PostMapping("/notify/unionPay") + public String unionPay(@RequestBody String xmlData){ + easyLearnOrderService.unionPayResult(xmlData); + return WxPayNotifyResponse.success("成功"); + } } diff --git a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/callback/EasyLearnCallBackController.java b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/callback/EasyLearnCallBackController.java index 15ec023..a3af840 100644 --- a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/callback/EasyLearnCallBackController.java +++ b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/callback/EasyLearnCallBackController.java @@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.RestController; @RestController @Api(tags = "果酱-放心学回调接口") @RequestMapping("/easyLearn/callback") +@Deprecated public class EasyLearnCallBackController { @Autowired diff --git a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/website/WebsiteController.java b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/website/WebsiteController.java index ecfa4df..4b79aa2 100644 --- a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/website/WebsiteController.java +++ b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/website/WebsiteController.java @@ -18,7 +18,7 @@ public class WebsiteController { @Autowired private BusinessDataService businessDataService; @Autowired - private ProductService productService; + private WebProductService productService; @Autowired private WebsiteService websiteService; diff --git a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/entity/website/Product.java b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/entity/website/WebProduct.java similarity index 94% rename from Cpop-Jambox/src/main/java/com/cpop/jambox/business/entity/website/Product.java rename to Cpop-Jambox/src/main/java/com/cpop/jambox/business/entity/website/WebProduct.java index 43834e1..e81b443 100644 --- a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/entity/website/Product.java +++ b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/entity/website/WebProduct.java @@ -26,7 +26,7 @@ import lombok.experimental.Accessors; @AllArgsConstructor @Accessors(chain = true) @Table(value = "cp_j_web_product", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false) -public class Product extends BaseEntity implements Serializable { +public class WebProduct extends BaseEntity implements Serializable { @Id private String id; diff --git a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/mapper/ProductMapper.java b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/mapper/WebProductMapper.java similarity index 59% rename from Cpop-Jambox/src/main/java/com/cpop/jambox/business/mapper/ProductMapper.java rename to Cpop-Jambox/src/main/java/com/cpop/jambox/business/mapper/WebProductMapper.java index 865d030..81830c2 100644 --- a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/mapper/ProductMapper.java +++ b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/mapper/WebProductMapper.java @@ -1,7 +1,7 @@ package com.cpop.jambox.business.mapper; +import com.cpop.jambox.business.entity.website.WebProduct; import com.mybatisflex.core.BaseMapper; -import com.cpop.jambox.business.entity.website.Product; /** * 果酱模块化官网 核心产品表 映射层。 @@ -9,6 +9,6 @@ import com.cpop.jambox.business.entity.website.Product; * @author Yxz * @since 2024-01-19 */ -public interface ProductMapper extends BaseMapper { +public interface WebProductMapper extends BaseMapper { } diff --git a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/service/ProductService.java b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/service/WebProductService.java similarity index 60% rename from Cpop-Jambox/src/main/java/com/cpop/jambox/business/service/ProductService.java rename to Cpop-Jambox/src/main/java/com/cpop/jambox/business/service/WebProductService.java index 66f09e4..467a808 100644 --- a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/service/ProductService.java +++ b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/service/WebProductService.java @@ -1,7 +1,7 @@ package com.cpop.jambox.business.service; +import com.cpop.jambox.business.entity.website.WebProduct; import com.mybatisflex.core.service.IService; -import com.cpop.jambox.business.entity.website.Product; /** * 果酱模块化官网 核心产品表 服务层。 @@ -9,6 +9,6 @@ import com.cpop.jambox.business.entity.website.Product; * @author Yxz * @since 2024-01-19 */ -public interface ProductService extends IService { +public interface WebProductService extends IService { } diff --git a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/service/impl/EasyLearnOrderServiceImpl.java b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/service/impl/EasyLearnOrderServiceImpl.java index a9469e3..7d53dc4 100644 --- a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/service/impl/EasyLearnOrderServiceImpl.java +++ b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/service/impl/EasyLearnOrderServiceImpl.java @@ -97,12 +97,12 @@ public class EasyLearnOrderServiceImpl extends ServiceImpl implements ProductService { - -} diff --git a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/service/impl/WebProductServiceImpl.java b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/service/impl/WebProductServiceImpl.java new file mode 100644 index 0000000..ab962c0 --- /dev/null +++ b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/service/impl/WebProductServiceImpl.java @@ -0,0 +1,18 @@ +package com.cpop.jambox.business.service.impl; + +import com.cpop.jambox.business.entity.website.WebProduct; +import com.cpop.jambox.business.mapper.WebProductMapper; +import com.cpop.jambox.business.service.WebProductService; +import com.mybatisflex.spring.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + * 果酱模块化官网 核心产品表 服务层实现。 + * + * @author Yxz + * @since 2024-01-19 + */ +@Service("webProductService") +public class WebProductServiceImpl extends ServiceImpl implements WebProductService { + +} diff --git a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/service/impl/WebsiteServiceImpl.java b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/service/impl/WebsiteServiceImpl.java index 8551887..9a7d132 100644 --- a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/service/impl/WebsiteServiceImpl.java +++ b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/service/impl/WebsiteServiceImpl.java @@ -33,7 +33,7 @@ public class WebsiteServiceImpl implements WebsiteService { @Autowired private BusinessIntroService businessIntroService; @Autowired - private ProductService productService; + private WebProductService productService; @Autowired private DevelopmentMapper developmentMapper; diff --git a/Cpop-Jambox/src/main/resources/application-jambox.yml b/Cpop-Jambox/src/main/resources/application-jambox.yml index 0415f39..3b378ac 100644 --- a/Cpop-Jambox/src/main/resources/application-jambox.yml +++ b/Cpop-Jambox/src/main/resources/application-jambox.yml @@ -1,8 +1,6 @@ wx: pay: #支付通知地址 - notify-url: https://oamapi.cpopsz.com/Cpop-Oam/easyLearn/callback/notify/oncePay - #支付通知地址 - easy-learn-once-pay-notify-url: https://oamapi.cpopsz.com/Cpop-Oam/easyLearn/callback/notify/oncePay + easy-learn-once-pay-notify-url: https://oamapi.cpopsz.com/Cpop-Oam/callback/easyLearn/notify/oncePay #放心学联合支付 - easy-learn-union-pay-notify-url: https://oamapi.cpopsz.com/Cpop-Oam/easyLearn/callback/notify/unionPay + easy-learn-union-pay-notify-url: https://oamapi.cpopsz.com/Cpop-Oam/callback/easyLearn/notify/unionPay \ No newline at end of file diff --git a/Cpop-Jambox/src/main/resources/mapper/ProductMapper.xml b/Cpop-Jambox/src/main/resources/mapper/WebProductMapper.xml similarity index 71% rename from Cpop-Jambox/src/main/resources/mapper/ProductMapper.xml rename to Cpop-Jambox/src/main/resources/mapper/WebProductMapper.xml index 6bf714b..c338268 100644 --- a/Cpop-Jambox/src/main/resources/mapper/ProductMapper.xml +++ b/Cpop-Jambox/src/main/resources/mapper/WebProductMapper.xml @@ -2,6 +2,6 @@ - + diff --git a/Cpop-Mall/Cpop-Mall-Web/src/main/resources/application-dev.yml b/Cpop-Mall/Cpop-Mall-Web/src/main/resources/application-dev.yml index 599c38f..366a051 100644 --- a/Cpop-Mall/Cpop-Mall-Web/src/main/resources/application-dev.yml +++ b/Cpop-Mall/Cpop-Mall-Web/src/main/resources/application-dev.yml @@ -4,7 +4,7 @@ cpop: profile: E:/Cpop/uploadPath jwt: #白名单 - whiteList: /login,/miniLogin,/test/**,/wxPay/callback/notify/**,/mini/brand/jamboxBrandIsInMall/*,/profile/**,/doc.html,/webjars/**,/favicon.ico,/v2/api-docs/**,/swagger-resources + whiteList: /login,/miniLogin,/wxPay/callback/notify/**,/mini/brand/jamboxBrandIsInMall/*,/doc.html,/webjars/**,/favicon.ico,/v2/api-docs/**,/swagger-resources gateway: rsa-keypair: # 公钥文件 @@ -104,10 +104,6 @@ knife4j: api-rule-resources: - com.cpop.system -logging: - level: - com.github.binarywang.wxpay: debug - #商城相关配置文件 mall: cloudBaseUrl: https://test.cpopsz.com/test/ass/ @@ -122,6 +118,6 @@ wx: # 私钥文件 privateCertPath: E:/Cpop/Cpop-Union/Cpop-Core/src/main/resources/static/keyPair/wxPay_cert.pem #支付通知地址 - notifyUrl: https://frp-oak.top:11899/Cpop-Mall/wxPay/callback/notify/order + notifyUrl: https://frp-oak.top:11899/Cpop-Mall/callback/wxPay/notify/order #退款通知地址 - notifyRefund: https://frp-oak.top:11899/Cpop-Mall/wxPay/callback/notify/refund + notifyRefund: https://frp-oak.top:11899/Cpop-Mall/callback/wxPay/notify/refund diff --git a/Cpop-Mall/Cpop-Mall-Web/src/main/resources/application-local.yml b/Cpop-Mall/Cpop-Mall-Web/src/main/resources/application-local.yml index d22df63..e283161 100644 --- a/Cpop-Mall/Cpop-Mall-Web/src/main/resources/application-local.yml +++ b/Cpop-Mall/Cpop-Mall-Web/src/main/resources/application-local.yml @@ -4,7 +4,7 @@ cpop: profile: D:\WorkSpace\Cpop\uploadPath jwt: #白名单 - whiteList: /login,/miniLogin,/wxPay/callback/notify/**,/getCaptcha,/profile/**,/doc.html,/webjars/**,/favicon.ico,/v2/api-docs/**,/swagger-resources + whiteList: /login,/miniLogin,/wxPay/callback/notify/**,/doc.html,/webjars/**,/favicon.ico,/v2/api-docs/**,/swagger-resources,/callback/wxPay/notify/** gateway: rsa-keypair: # 公钥文件 @@ -98,10 +98,6 @@ knife4j: api-rule-resources: - com.cpop.system -logging: - level: - com.github.binarywang.wxpay: debug - #微信支付 wx: pay: diff --git a/Cpop-Mall/Cpop-Mall-Web/src/main/resources/application-prod.yml b/Cpop-Mall/Cpop-Mall-Web/src/main/resources/application-prod.yml index 212238d..1693502 100644 --- a/Cpop-Mall/Cpop-Mall-Web/src/main/resources/application-prod.yml +++ b/Cpop-Mall/Cpop-Mall-Web/src/main/resources/application-prod.yml @@ -4,7 +4,7 @@ cpop: profile: /root/cpop-union/cpop-mall/upload jwt: #白名单 - whiteList: /login,/miniLogin,/mini/brand/jamboxBrandIsInMall/*,/wxPay/callback/notify/**,/profile/** + whiteList: /login,/miniLogin,/mini/brand/jamboxBrandIsInMall/*,/wxPay/callback/notify/**,/callback/wxPay/notify/** #拦截 gateway: rsa-keypair: @@ -69,10 +69,6 @@ mybatis-flex: username: root password: Customer0401 -logging: - level: - com.github.binarywang.wxpay: error - #商城相关配置文件 mall: cloudBaseUrl: https://api.jamboxsys.com/jambox/ass/ @@ -87,6 +83,6 @@ wx: # 私钥文件 privateCertPath: /root/cpop-union/cpop-mall/script/secretKey/wxPay_cert.pem #支付通知地址 - notifyUrl: https://api.jamboxsys.com/Cpop-Mall/wxPay/callback/notify/order + notifyUrl: https://api.jamboxsys.com/Cpop-Mall/callback/wxPay/notify/order #退款通知地址 - notifyRefund: https://api.jamboxsys.com/Cpop-Mall/wxPay/callback/notify/refund + notifyRefund: https://api.jamboxsys.com/Cpop-Mall/callback/wxPay/notify/refund diff --git a/Cpop-Mall/Cpop-Mall-Web/src/main/resources/application-test.yml b/Cpop-Mall/Cpop-Mall-Web/src/main/resources/application-test.yml index 8bfe9de..423207f 100644 --- a/Cpop-Mall/Cpop-Mall-Web/src/main/resources/application-test.yml +++ b/Cpop-Mall/Cpop-Mall-Web/src/main/resources/application-test.yml @@ -4,7 +4,7 @@ cpop: profile: /root/cpop-union/cpop-mall/upload jwt: #白名单 - whiteList: /login,/miniLogin,/mini/brand/jamboxBrandIsInMall/*,/wxPay/callback/notify/**,/profile/**,/doc.html,/webjars/**,/favicon.ico,/v2/api-docs/**,/swagger-resources,/wxOpen/receiveTicket,/wxOpen/*/callback,/wxOpen/bindOpenAccount/*,/wxCp/portal/* + whiteList: /login,/miniLogin,/mini/brand/jamboxBrandIsInMall/*,/wxPay/callback/notify/**,/webjars/**,/favicon.ico,/v2/api-docs/**,/swagger-resources,/callback/wxPay/notify/** #拦截 gateway: rsa-keypair: @@ -99,10 +99,6 @@ knife4j: api-rule-resources: - com.cpop.system -logging: - level: - com.github.binarywang.wxpay: debug - #商城相关配置文件 mall: cloudBaseUrl: https://test.cpopsz.com/test/ass/ @@ -117,6 +113,6 @@ wx: # 私钥文件 privateCertPath: /root/cpop-union/cpop-mall/script/secretKey/wxPay_cert.pem #支付通知地址 - notifyUrl: https://test.cpopsz.com/onlineShop/wxPay/callback/notify/order + notifyUrl: https://test.cpopsz.com/onlineShop/callback/wxPay/notify/order #退款通知地址 - notifyRefund: https://test.cpopsz.com/onlineShop/wxPay/callback/notify/refund + notifyRefund: https://test.cpopsz.com/onlineShop/callback/wxPay/notify/refund diff --git a/Cpop-Mall/Cpop-Mall-Web/src/main/resources/application.yml b/Cpop-Mall/Cpop-Mall-Web/src/main/resources/application.yml index f792c14..cf34918 100644 --- a/Cpop-Mall/Cpop-Mall-Web/src/main/resources/application.yml +++ b/Cpop-Mall/Cpop-Mall-Web/src/main/resources/application.yml @@ -31,7 +31,7 @@ spring: max-file-size: 1024MB max-request-size: 300MB profiles: - active: dev,mall,core,jambox,system,pay + active: dev,core,pay datasource: type: com.zaxxer.hikari.HikariDataSource driver-class-name: com.mysql.cj.jdbc.Driver diff --git a/Cpop-Mall/Cpop-Mall-Web/src/test/java/com/cpop/mall/web/CpopWxPayTests.java b/Cpop-Mall/Cpop-Mall-Web/src/test/java/com/cpop/mall/web/CpopWxPayTests.java index 34faa32..417f2d6 100644 --- a/Cpop-Mall/Cpop-Mall-Web/src/test/java/com/cpop/mall/web/CpopWxPayTests.java +++ b/Cpop-Mall/Cpop-Mall-Web/src/test/java/com/cpop/mall/web/CpopWxPayTests.java @@ -51,11 +51,11 @@ public class CpopWxPayTests { WxPayRefundV3Request.Amount amount = new WxPayRefundV3Request.Amount(); //退款金额(单位分) //int refund = order.getTotalAmount().scaleByPowerOfTen(2).intValue(); - int refund = 1; + int refund = 500; amount.setRefund(refund) .setTotal(refund) .setCurrency("CNY"); - request.setTransactionId("4200002122202401129346519359") + request.setTransactionId("4200002130202401237828582894") //.setOutTradeNo("1000000000202401121937112562856") //.setTransactionId(order.getOutOrderNo()) //.setOutTradeNo(order.getId()) @@ -134,8 +134,8 @@ public class CpopWxPayTests { @Test public void getOrderInfo() throws WxPayException { WxPayConfig config = wxPayService.getConfig(); - config.setSubMchId("1650816616"); - WxPayOrderQueryResult wxPayOrderQueryResult = wxPayService.queryOrder("01020033210023615210000000008091", null); + config.setSubMchId("1661323640"); + WxPayOrderQueryResult wxPayOrderQueryResult = wxPayService.queryOrder("4200002119202401230387612728", null); System.out.println(wxPayOrderQueryResult); } @@ -148,7 +148,7 @@ public class CpopWxPayTests { @Test public void getSharingInfo() throws WxPayException { ProfitSharingQueryRequest profitSharingQueryRequest = new ProfitSharingQueryRequest(); - profitSharingQueryRequest.setOutOrderNo("89825238983995392").setTransactionId("4200002028202312069539269015"); + profitSharingQueryRequest.setOutOrderNo("107321591016267776").setTransactionId("4200002119202401230387612728"); profitSharingQueryRequest.setSubMchId("1661807764"); ProfitSharingQueryResult result = wxPayService.getProfitSharingService().profitSharingQuery(profitSharingQueryRequest); System.out.println(result.getResultCode()); diff --git a/Cpop-Mall/src/main/java/com/cpop/mall/business/controller/backstage/BackstageCarouselController.java b/Cpop-Mall/src/main/java/com/cpop/mall/business/controller/backstage/BackstageCarouselController.java index c1ef383..4fdfc08 100644 --- a/Cpop-Mall/src/main/java/com/cpop/mall/business/controller/backstage/BackstageCarouselController.java +++ b/Cpop-Mall/src/main/java/com/cpop/mall/business/controller/backstage/BackstageCarouselController.java @@ -32,7 +32,7 @@ import static com.cpop.mall.business.entity.table.ProductTableDef.PRODUCT; */ @RestController @Api(tags = "商城轮播图接口") -@RequestMapping("/carousel") +@RequestMapping("/backstage/carousel") public class BackstageCarouselController { @Autowired diff --git a/Cpop-Mall/src/main/java/com/cpop/mall/business/controller/callback/CallbackWxPayController.java b/Cpop-Mall/src/main/java/com/cpop/mall/business/controller/callback/CallbackWxPayController.java new file mode 100644 index 0000000..44f8e90 --- /dev/null +++ b/Cpop-Mall/src/main/java/com/cpop/mall/business/controller/callback/CallbackWxPayController.java @@ -0,0 +1,53 @@ +package com.cpop.mall.business.controller.callback; + +import com.cpop.mall.business.service.OrderRefundService; +import com.cpop.mall.business.service.OrderService; +import com.github.binarywang.wxpay.bean.notify.WxPayNotifyResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author DB + * @createTime 2023/10/27 15:57 + * @description + */ +@RestController +@RequestMapping("/callback/wxPay") +public class CallbackWxPayController { + + @Autowired + private OrderRefundService orderRefundService; + + @Autowired + private OrderService orderService; + + /** + * @descriptions 微信支付订单通知 + * @author DB + * @date 2023/10/27 16:04 + * @param xmlData 数据 + * @return: java.lang.String + */ + @PostMapping("/notify/order") + public String parseOrderNotifyResult(@RequestBody String xmlData){ + orderService.wxPayNotifyOrder(xmlData); + return WxPayNotifyResponse.success("成功"); + } + + /** + * @descriptions 退款回调通知处理 + * @author DB + * @date 2023/10/27 18:21 + * @param xmlData 数据 + * @return: java.lang.String + */ + @PostMapping("/notify/refund") + public String parseRefundNotifyResult(@RequestBody String xmlData){ + orderRefundService.wxPayNotifyRefund(xmlData); + return WxPayNotifyResponse.success("成功"); + } + +} diff --git a/Cpop-Mall/src/main/java/com/cpop/mall/business/controller/callback/WxPayCallbackController.java b/Cpop-Mall/src/main/java/com/cpop/mall/business/controller/callback/WxPayCallbackController.java index d67a6bf..9894b3f 100644 --- a/Cpop-Mall/src/main/java/com/cpop/mall/business/controller/callback/WxPayCallbackController.java +++ b/Cpop-Mall/src/main/java/com/cpop/mall/business/controller/callback/WxPayCallbackController.java @@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RestController; */ @RestController @RequestMapping("/wxPay/callback") +@Deprecated public class WxPayCallbackController { @Autowired diff --git a/Cpop-Mall/src/main/java/com/cpop/mall/business/service/impl/OrderServiceImpl.java b/Cpop-Mall/src/main/java/com/cpop/mall/business/service/impl/OrderServiceImpl.java index 7b4a68b..50e0ef0 100644 --- a/Cpop-Mall/src/main/java/com/cpop/mall/business/service/impl/OrderServiceImpl.java +++ b/Cpop-Mall/src/main/java/com/cpop/mall/business/service/impl/OrderServiceImpl.java @@ -19,6 +19,7 @@ import com.cpop.jambox.business.entity.BrandExtend; import com.cpop.jambox.business.service.BrandExtendService; import com.cpop.mall.business.bo.*; import com.cpop.mall.business.dto.UserPointDto; +import com.cpop.pay.framewok.config.wxPay.WxPayConfiguration; import com.cpop.pay.framewok.core.dto.WxPayGoodsDetailDto; import com.cpop.mall.business.entity.*; import com.cpop.mall.business.mapper.OrderMapper; @@ -49,6 +50,7 @@ import com.mybatisflex.core.row.DbChain; import com.mybatisflex.core.row.Row; import com.mybatisflex.core.row.RowKey; import com.mybatisflex.spring.service.impl.ServiceImpl; +import lombok.extern.slf4j.Slf4j; import org.quartz.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -57,6 +59,7 @@ import org.springframework.transaction.annotation.Transactional; import java.time.LocalDateTime; import java.util.*; import java.util.concurrent.locks.Lock; +import java.util.logging.Logger; import java.util.stream.Collectors; import static com.cpop.core.base.table.table.SysUserTableDef.SYS_USER; @@ -78,6 +81,7 @@ import static com.mybatisflex.core.query.QueryMethods.sum; * @since 2023-10-24 */ @Service("orderService") +@Slf4j public class OrderServiceImpl extends ServiceImpl implements OrderService { @Autowired @@ -300,8 +304,6 @@ public class OrderServiceImpl extends ServiceImpl implements //微信支付统一下单 WxPayService wxPayService = wxPayHandler.getWxPayService(); WxPayUnifiedOrderRequest orderRequest = new WxPayUnifiedOrderRequest(); - //查询是否是服务商系品牌 - String brandId = loginUserInfo.getString("brandId"); //需要分账 if (order.getTotalAmount().scaleByPowerOfTen(2).intValue() >= Math.ceil(1 / OrderSource.MALL.getRate())) { //需要分账 @@ -311,6 +313,7 @@ public class OrderServiceImpl extends ServiceImpl implements if (description.getBytes().length > 127) { description = StringUtils.substringByte(description, 0, 126); } + WxPayConfiguration configuration = SpringUtils.getBean(WxPayConfiguration.class); orderRequest.setSpbillCreateIp(IpUtils.getHostIp()) .setOpenid(loginUserInfo.getString("openId")) //商品描述 diff --git a/Cpop-Oam/Cpop-Oam-Web/Dockerfile b/Cpop-Oam/Cpop-Oam-Web/Dockerfile deleted file mode 100644 index c60ac55..0000000 --- a/Cpop-Oam/Cpop-Oam-Web/Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -FROM openjdk:8-jdk -LABEL authors="Lost" -ADD ./target/Cpop-Oam-Web.jar Cpop-Oam-Web.jar -ENTRYPOINT ["sh", "-c", "java -jar Cpop-Oam-Web.jar --spring.profiles.active=prod,core,jambox"] \ No newline at end of file diff --git a/Cpop-Oam/Cpop-Oam-Web/Oam-DockerD-Dockerfile b/Cpop-Oam/Cpop-Oam-Web/Oam-DockerD-Dockerfile new file mode 100644 index 0000000..12c4a5c --- /dev/null +++ b/Cpop-Oam/Cpop-Oam-Web/Oam-DockerD-Dockerfile @@ -0,0 +1,5 @@ +FROM openjdk:8-jdk +LABEL authors="Lost" +RUN mkdir -p /root/Cpop-Oam/ +ADD ./target/Cpop-Oam-Web.jar /root/Cpop-Oam/Cpop-Oam-Web.jar +ENTRYPOINT ["sh", "-c", "java -jar /root/Cpop-Oam/Cpop-Oam-Web.jar --spring.profiles.active=dockerD,core,jambox,pay"] \ No newline at end of file diff --git a/Cpop-Oam/Cpop-Oam-Web/logs/Cpop-Oam-info-20240122.log.2024-01-22 b/Cpop-Oam/Cpop-Oam-Web/logs/Cpop-Oam-info-20240122.log.2024-01-22 new file mode 100644 index 0000000..99d0655 --- /dev/null +++ b/Cpop-Oam/Cpop-Oam-Web/logs/Cpop-Oam-info-20240122.log.2024-01-22 @@ -0,0 +1,61 @@ +[2024-01-22 15:21:23.553] INFO [background-preinit] Version.java:21 - HV000001: Hibernate Validator 6.2.5.Final +[2024-01-22 15:21:23.563] INFO [main] StartupInfoLogger.java:55 - Starting CpopDataSyncTests using Java 1.8.0_231 on DESKTOP-PIJFD5O with PID 22368 (started by Lost in E:\Cpop\Cpop-Union\Cpop-Oam\Cpop-Oam-Web) +[2024-01-22 15:21:23.564] INFO [main] SpringApplication.java:637 - The following 3 profiles are active: "prod", "core", "pay" +[2024-01-22 15:21:24.940] INFO [main] RepositoryConfigurationDelegate.java:262 - Multiple Spring Data modules found, entering strict repository configuration mode +[2024-01-22 15:21:24.945] INFO [main] RepositoryConfigurationDelegate.java:132 - Bootstrapping Spring Data Redis repositories in DEFAULT mode. +[2024-01-22 15:21:24.967] INFO [main] RepositoryConfigurationDelegate.java:201 - Finished Spring Data repository scanning in 6 ms. Found 0 Redis repository interfaces. +[2024-01-22 15:21:25.206] INFO [main] LogAccessor.java:292 - No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created. +[2024-01-22 15:21:25.221] INFO [main] LogAccessor.java:292 - No bean named 'integrationHeaderChannelRegistry' has been explicitly defined. Therefore, a default DefaultHeaderChannelRegistry will be created. +[2024-01-22 15:21:25.688] INFO [main] PostProcessorRegistrationDelegate.java:376 - Bean 'com.mybatisflex.spring.boot.FlexTransactionAutoConfiguration' of type [com.mybatisflex.spring.boot.FlexTransactionAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +[2024-01-22 15:21:25.997] INFO [main] PostProcessorRegistrationDelegate.java:376 - Bean 'mybatis-flex-com.mybatisflex.spring.boot.MybatisFlexProperties' of type [com.mybatisflex.spring.boot.MybatisFlexProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +[2024-01-22 15:21:26.008] INFO [main] PostProcessorRegistrationDelegate.java:376 - Bean 'com.mybatisflex.spring.boot.MultiDataSourceAutoConfiguration' of type [com.mybatisflex.spring.boot.MultiDataSourceAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +[2024-01-22 15:21:26.135] INFO [main] PostProcessorRegistrationDelegate.java:376 - Bean 'redisConfig' of type [com.cpop.core.config.RedisConfig$$EnhancerBySpringCGLIB$$979fa58a] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +[2024-01-22 15:21:27.184] INFO [main] TomcatWebServer.java:108 - Tomcat initialized with port(s): 0 (http) +[2024-01-22 15:21:27.194] INFO [main] DirectJDKLog.java:173 - Initializing ProtocolHandler ["http-nio-auto-1"] +[2024-01-22 15:21:27.197] INFO [main] DirectJDKLog.java:173 - Starting service [Tomcat] +[2024-01-22 15:21:27.197] INFO [main] DirectJDKLog.java:173 - Starting Servlet engine: [Apache Tomcat/9.0.79] +[2024-01-22 15:21:27.417] INFO [main] DirectJDKLog.java:173 - Initializing Spring embedded WebApplicationContext +[2024-01-22 15:21:27.417] INFO [main] ServletWebServerApplicationContext.java:292 - Root WebApplicationContext: initialization completed in 3825 ms +[2024-01-22 15:21:28.467] INFO [main] HikariDataSource.java:110 - HikariPool-1 - Starting... +[2024-01-22 15:21:29.147] INFO [main] HikariDataSource.java:123 - HikariPool-1 - Start completed. +[2024-01-22 15:21:32.104] INFO [main] StdSchedulerFactory.java:1220 - Using default implementation for ThreadExecutor +[2024-01-22 15:21:32.106] INFO [main] SimpleThreadPool.java:268 - Job execution threads will use class loader of thread: main +[2024-01-22 15:21:32.118] INFO [main] SchedulerSignalerImpl.java:61 - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl +[2024-01-22 15:21:32.119] INFO [main] QuartzScheduler.java:229 - Quartz Scheduler v.2.3.2 created. +[2024-01-22 15:21:32.122] INFO [main] JobStoreSupport.java:672 - Using db table-based data access locking (synchronization). +[2024-01-22 15:21:32.124] INFO [main] JobStoreCMT.java:145 - JobStoreCMT initialized. +[2024-01-22 15:21:32.125] INFO [main] QuartzScheduler.java:294 - Scheduler meta-data: Quartz Scheduler (v2.3.2) 'CpopOamScheduler' with instanceId 'NON_CLUSTERED' + Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally. + NOT STARTED. + Currently in standby mode. + Number of jobs executed: 0 + Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 1 threads. + Using job-store 'org.springframework.scheduling.quartz.LocalDataSourceJobStore' - which supports persistence. and is not clustered. + +[2024-01-22 15:21:32.125] INFO [main] StdSchedulerFactory.java:1374 - Quartz scheduler 'CpopOamScheduler' initialized from an externally provided properties instance. +[2024-01-22 15:21:32.126] INFO [main] StdSchedulerFactory.java:1378 - Quartz scheduler version: 2.3.2 +[2024-01-22 15:21:32.126] INFO [main] QuartzScheduler.java:2293 - JobFactory set to: org.springframework.scheduling.quartz.SpringBeanJobFactory@1d5048d1 +[2024-01-22 15:21:32.798] INFO [main] InitConfig.java:41 - ===========================项目启动角色初始化=========================== +[2024-01-22 15:21:34.212] INFO [main] DefaultSecurityFilterChain.java:55 - Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@4c3d72fd, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@259c6ab8, org.springframework.security.web.context.SecurityContextPersistenceFilter@39420d59, org.springframework.security.web.header.HeaderWriterFilter@3340ff7c, com.cpop.core.filter.JwtAuthenticationFilter@1488a861, org.springframework.security.web.authentication.logout.LogoutFilter@5bf1b528, com.cpop.core.filter.RepeatableFilter@22e813fc, com.cpop.core.gateway.sys.SysAuthenticationFilter@605eb072, com.cpop.core.gateway.miniProgram.MiniProgramAuthenticationFilter@1fa9692b, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@5dd227b7, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@14ba7f15, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@640a6d4b, org.springframework.security.web.session.SessionManagementFilter@5e198c40, org.springframework.security.web.access.ExceptionTranslationFilter@6cbb6c41, org.springframework.security.web.access.intercept.AuthorizationFilter@7ef7f414] +[2024-01-22 15:21:35.868] INFO [main] LogAccessor.java:174 - Adding {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel +[2024-01-22 15:21:35.868] INFO [main] LogAccessor.java:174 - Channel 'Cpop-Oam-Prod.errorChannel' has 1 subscriber(s). +[2024-01-22 15:21:35.868] INFO [main] LogAccessor.java:292 - started bean '_org.springframework.integration.errorLogger' +[2024-01-22 15:21:35.869] INFO [main] DirectJDKLog.java:173 - Starting ProtocolHandler ["http-nio-auto-1"] +[2024-01-22 15:21:35.893] INFO [main] TomcatWebServer.java:220 - Tomcat started on port(s): 59855 (http) with context path '/Cpop-Oam' +[2024-01-22 15:21:35.895] INFO [main] SchedulerFactoryBean.java:734 - Will start Quartz Scheduler [CpopOamScheduler] in 1 seconds +[2024-01-22 15:21:35.912] INFO [main] StartupInfoLogger.java:61 - Started CpopDataSyncTests in 12.809 seconds (JVM running for 14.317) +[2024-01-22 15:21:36.907] INFO [Quartz Scheduler [CpopOamScheduler]] SchedulerFactoryBean.java:750 - Starting Quartz Scheduler now, after delay of 1 seconds +[2024-01-22 15:21:37.083] INFO [Quartz Scheduler [CpopOamScheduler]] JobStoreSupport.java:866 - Freed 0 triggers from 'acquired' / 'blocked' state. +[2024-01-22 15:21:37.154] INFO [Quartz Scheduler [CpopOamScheduler]] JobStoreSupport.java:876 - Recovering 0 jobs that were in-progress at the time of the last shut-down. +[2024-01-22 15:21:37.154] INFO [Quartz Scheduler [CpopOamScheduler]] JobStoreSupport.java:889 - Recovery complete. +[2024-01-22 15:21:37.188] INFO [Quartz Scheduler [CpopOamScheduler]] JobStoreSupport.java:896 - Removed 0 'complete' triggers. +[2024-01-22 15:21:37.224] INFO [Quartz Scheduler [CpopOamScheduler]] JobStoreSupport.java:901 - Removed 0 stale fired job entries. +[2024-01-22 15:21:37.294] INFO [Quartz Scheduler [CpopOamScheduler]] QuartzScheduler.java:547 - Scheduler CpopOamScheduler_$_NON_CLUSTERED started. +[2024-01-22 15:23:22.877] INFO [SpringApplicationShutdownHook] QuartzScheduler.java:585 - Scheduler CpopOamScheduler_$_NON_CLUSTERED paused. +[2024-01-22 15:23:23.203] INFO [SpringApplicationShutdownHook] LogAccessor.java:174 - Removing {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel +[2024-01-22 15:23:23.203] INFO [SpringApplicationShutdownHook] LogAccessor.java:174 - Channel 'Cpop-Oam-Prod.errorChannel' has 0 subscriber(s). +[2024-01-22 15:23:23.203] INFO [SpringApplicationShutdownHook] LogAccessor.java:292 - stopped bean '_org.springframework.integration.errorLogger' +[2024-01-22 15:23:23.209] INFO [SpringApplicationShutdownHook] SchedulerFactoryBean.java:847 - Shutting down Quartz Scheduler +[2024-01-22 15:23:23.210] INFO [SpringApplicationShutdownHook] QuartzScheduler.java:666 - Scheduler CpopOamScheduler_$_NON_CLUSTERED shutting down. +[2024-01-22 15:23:23.210] INFO [SpringApplicationShutdownHook] QuartzScheduler.java:585 - Scheduler CpopOamScheduler_$_NON_CLUSTERED paused. +[2024-01-22 15:23:23.210] INFO [SpringApplicationShutdownHook] QuartzScheduler.java:740 - Scheduler CpopOamScheduler_$_NON_CLUSTERED shutdown complete. diff --git a/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-dev.yml b/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-dev.yml index b0fa681..13be815 100644 --- a/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-dev.yml +++ b/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-dev.yml @@ -4,7 +4,7 @@ cpop: profile: E:/Cpop/uploadPath jwt: #白名单 - whiteList: /websocket/*,/login,/getCaptcha,/profile/**,/doc.html,/webjars/**,/favicon.ico,/v2/api-docs/**,/swagger-resources,/wxCp/*,/wxCp/portal/*/registerCode,/sysCommon/miniSyncBrandAndStore,/easyLearn/callback/*/*,/easyLearn/*,/mini/cardTemplate/*,/website/** + whiteList: /websocket/*,/login,/doc.html,/webjars/**,/favicon.ico,/v2/api-docs/**,/swagger-resources,/sysCommon/miniSyncBrandAndStore,/easyLearn/callback/*/*,/easyLearn/*,/mini/cardTemplate/*,/website/**,/backstage/wxCp/*,/callback/wxCp/*/registerCode,/callback/easyLearn/** gateway: rsa-keypair: # 公钥文件 @@ -109,6 +109,6 @@ wx: # 私钥文件 privateCertPath: E:/Cpop/Cpop-Union/Cpop-Core/src/main/resources/static/keyPair/wxPay_cert.pem # 先学后付用户签约通知地址 - learn-now-pay-later-user-sign-plan-notify-url: + learn-now-pay-later-user-sign-plan-notify-url: https://frp-oak.top:11899/Cpop-Oam/callback/easyLearn/learnNowPayLaterUserSignPlanNotify # 先学后付用户核销通知地址 - learn-now-pay-later-service-order-notify-url: \ No newline at end of file + learn-now-pay-later-service-order-notify-url: https://frp-oak.top:11899/Cpop-Oam/callback/easyLearn/learnNowPayLaterUserSignPlanNotify \ No newline at end of file diff --git a/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-dockerD.yml b/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-dockerD.yml new file mode 100644 index 0000000..98e53bf --- /dev/null +++ b/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-dockerD.yml @@ -0,0 +1,114 @@ +# 项目相关配置 +cpop: + # 文件路径 示例( Windows配置W:/WorkSpace/java/uploadPath,Linux配置 /home/baseFramework/uploadPath) + profile: E:/Cpop/uploadPath + jwt: + #白名单 + whiteList: /websocket/*,/login,/doc.html,/webjars/**,/favicon.ico,/v2/api-docs/**,/swagger-resources,/sysCommon/miniSyncBrandAndStore,/easyLearn/callback/*/*,/easyLearn/*,/mini/cardTemplate/*,/website/**,/backstage/wxCp/*,/callback/wxCp/*/registerCode,/callback/easyLearn/** + gateway: + rsa-keypair: + # 公钥文件 + publicKeyFile: /root/Cpop-Oam/keyPair/publicKey + # 公钥文件 + privateKeyFile: /root/Cpop-Oam/keyPair/privateKey + +# DataSource Config +spring: + application: + name: Cpop-Oam-Dev + #redis配置 + redis: + #地址 + host: gz-crs-lv77ii2t.sql.tencentcdb.com + #端口 + port: 27714 + #数据库 + database: 1 + #密码 + password: Cpop2022@ + #连接超时 + timeout: 5000 + jedis: + pool: + # + min-idle: 0 + # + max-idle: 16 + # + max-active: 16 + # + max-wait: -1ms + client-type: jedis + data: + mongodb: + host: localhost + port: 27017 + database: cpop-dev + username: Cpop + password: Admin@123 + +server: + port: 9420 + servlet: + context-path: /Cpop-Oam + +#Mybatis-Flex +mybatis-flex: + configuration: + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + datasource: + oam: + url: jdbc:mysql://192.168.3.61:3306/cpop_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + username: root + password: Admin@123 + jambox: + url: jdbc:mysql://sh-cynosdbmysql-grp-fggo83js.sql.tencentcdb.com:20965/jambox_test?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true + username: root + password: Customer0401 + +# springdoc-openapi项目配置 +knife4j: + enable: true + openapi: + title: PuPu-OAM开发API + description: PuPu-OAM开发API + email: + concat: DB + url: https://api.jamboxsys.com + version: 1.0.0 + license: Apache 2.0 + license-url: https://stackoverflow.com/ + terms-of-service-url: https://api.jamboxsys.com + group: + #系统 + Oam: + group-name: Oam + api-rule: package + api-rule-resources: + - com.cpop.oam + #系统 + System: + group-name: System + api-rule: package + api-rule-resources: + - com.cpop.system + #果酱 + Jambox: + group-name: Jambox + api-rule: package + api-rule-resources: + - com.cpop.jambox + +#微信 +wx: + pay: + # p12证书的位置,可以指定绝对路径,也可以指定类路径(以classpath:开头) + keyPath: /root/Cpop-Oam/keyPair/wxPay_cert.p12 + # 私钥证书 + privateKeyPath: /root/Cpop-Oam/keyPair/wxPay_key.pem + # 私钥文件 + privateCertPath: /root/Cpop-Oam/keyPair/wxPay_cert.pem + # 先学后付用户签约通知地址 + learn-now-pay-later-user-sign-plan-notify-url: https://frp-oak.top:11899/Cpop-Oam/callback/easyLearn/learnNowPayLaterUserSignPlanNotify + # 先学后付用户核销通知地址 + learn-now-pay-later-service-order-notify-url: https://frp-oak.top:11899/Cpop-Oam/callback/easyLearn/learnNowPayLaterUserSignPlanNotify \ No newline at end of file diff --git a/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-prod.yml b/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-prod.yml index 8bb9d07..41f8cf9 100644 --- a/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-prod.yml +++ b/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-prod.yml @@ -4,7 +4,7 @@ cpop: profile: /root/cpop-union/cpop-oam/upload jwt: #白名单 - whiteList: /websocket/*,/login,/getCaptcha,/profile/**,/wxOpen/receiveTicket,/wxOpen/*/callback,/wxOpen/bindOpenAccount/*,/wxCp/portal/*,/wxCp/*,/wxCp/portal/*/registerCode,/sysCommon/miniSyncBrandAndStore,/easyLearn/callback/*/*,/easyLearn/*,/mini/cardTemplate/*,/website/** + whiteList: /websocket/*,/login,/backstage/wxOpen/**,/sysCommon/miniSyncBrandAndStore,/easyLearn/callback/*/*,/easyLearn/*,/mini/cardTemplate/*,/website/**,/backstage/wxCp/*,/callback/wxCp/*/registerCode,/callback/easyLearn/** #拦截 gateway: rsa-keypair: @@ -73,4 +73,8 @@ wx: # 私钥证书 privateKeyPath: /root/cpop-union/cpop-oam/script/secretKey/wxPay_key.pem # 私钥文件 - privateCertPath: /root/cpop-union/cpop-oam/script/secretKey/wxPay_cert.pem \ No newline at end of file + privateCertPath: /root/cpop-union/cpop-oam/script/secretKey/wxPay_cert.pem + # 先学后付用户签约通知地址 + learn-now-pay-later-user-sign-plan-notify-url: https://oam.jamboxsys.com/Cpop-Oam/callback/easyLearn/learnNowPayLaterUserSignPlanNotify + # 先学后付用户核销通知地址 + learn-now-pay-later-service-order-notify-url: https://oam.jamboxsys.com/Cpop-Oam/callback/easyLearn/userServiceOrderSuccess \ No newline at end of file diff --git a/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-test.yml b/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-test.yml index 0e190af..8d0feae 100644 --- a/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-test.yml +++ b/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-test.yml @@ -4,7 +4,7 @@ cpop: profile: /root/cpop-union/cpop-mall/upload jwt: #白名单 - whiteList: /websocket/*,/login,/getCaptcha,/profile/**,/doc.html,/webjars/**,/favicon.ico,/v2/api-docs/**,/swagger-resources,/wxOpen/receiveTicket,/wxOpen/*/callback,/wxOpen/bindOpenAccount/*,/wxCp/portal/*,/wxCp/portal/*/registerCode,/wxCp/*,/sysCommon/miniSyncBrandAndStore,/easyLearn/callback/*/*,/easyLearn/*,/mini/cardTemplate/*,/website/** + whiteList: /websocket/*,/login,/doc.html,/webjars/**,/favicon.ico,/v2/api-docs/**,/swagger-resources,/sysCommon/miniSyncBrandAndStore,/easyLearn/callback/*/*,/easyLearn/*,/mini/cardTemplate/*,/website/**,/backstage/wxCp/*,/callback/wxCp/*/registerCode,/callback/easyLearn/** #拦截 gateway: rsa-keypair: @@ -94,4 +94,8 @@ wx: # 私钥证书 privateKeyPath: /root/cpop-union/cpop-oam/script/secretKey/wxPay_key.pem # 私钥文件 - privateCertPath: /root/cpop-union/cpop-oam/script/secretKey/wxPay_cert.pem \ No newline at end of file + privateCertPath: /root/cpop-union/cpop-oam/script/secretKey/wxPay_cert.pem + # 先学后付用户签约通知地址 + learn-now-pay-later-user-sign-plan-notify-url: https://test.cpopsz.com/oam/Cpop-Oam/callback/easyLearn/learnNowPayLaterUserSignPlanNotify + # 先学后付用户核销通知地址 + learn-now-pay-later-service-order-notify-url: https://test.cpopsz.com/oam/Cpop-Oam/callback/easyLearn/userServiceOrderSuccess \ No newline at end of file diff --git a/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application.yml b/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application.yml index 164a41d..2163b9a 100644 --- a/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application.yml +++ b/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application.yml @@ -31,7 +31,7 @@ spring: max-file-size: 1024MB max-request-size: 300MB profiles: - active: dev,oam,core,jambox,system,pay + active: dev,core,jambox,pay datasource: type: com.zaxxer.hikari.HikariDataSource driver-class-name: com.mysql.cj.jdbc.Driver diff --git a/Cpop-Oam/Cpop-Oam-Web/src/test/java/com/cpop/oam/web/CpopDataSyncTests.java b/Cpop-Oam/Cpop-Oam-Web/src/test/java/com/cpop/oam/web/CpopDataSyncTests.java index 407a71b..6c18ce8 100644 --- a/Cpop-Oam/Cpop-Oam-Web/src/test/java/com/cpop/oam/web/CpopDataSyncTests.java +++ b/Cpop-Oam/Cpop-Oam-Web/src/test/java/com/cpop/oam/web/CpopDataSyncTests.java @@ -1,5 +1,6 @@ package com.cpop.oam.web; +import com.alibaba.fastjson.JSONArray; import com.cpop.common.utils.StringUtils; import com.cpop.core.utils.SpringUtils; import com.cpop.jambox.business.entity.BrandExtend; @@ -36,8 +37,10 @@ import java.util.Map; import java.util.stream.Collectors; import static com.cpop.core.base.table.table.SysUserTableDef.SYS_USER; +import static com.cpop.jambox.business.entity.table.StoreExtendTableDef.STORE_EXTEND; import static com.cpop.oam.business.entity.table.StaffTableDef.STAFF; 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.count; import static com.mybatisflex.core.query.QueryMethods.max; @@ -286,4 +289,21 @@ public class CpopDataSyncTests { }); SpringUtils.getBean(StoreService.class).updateBatch(stores); } + + /** + * 删除没有云校区的数据 + * @author DB + * @since 2024/1/23 + */ + @Test + public void removeNotHaveCloudStore() { + StoreService storeService = SpringUtils.getBean(StoreService.class); + List storeList = storeService.queryChain() + .select(STORE.ID) + .leftJoin(STORE_EXTEND).on(STORE_EXTEND.STORE_ID.eq(STORE.ID)) + .where(STORE_EXTEND.STORE_CLOUD_ID.isNull()) + .list(); + List collect = storeList.stream().map(Store::getId).collect(Collectors.toList()); + storeService.removeByIds(collect); + } } diff --git a/Cpop-Oam/Cpop-Oam-Web/src/test/java/com/cpop/oam/web/CpopEasyLearnTest.java b/Cpop-Oam/Cpop-Oam-Web/src/test/java/com/cpop/oam/web/CpopEasyLearnTest.java index 1acadc5..2f4cdaf 100644 --- a/Cpop-Oam/Cpop-Oam-Web/src/test/java/com/cpop/oam/web/CpopEasyLearnTest.java +++ b/Cpop-Oam/Cpop-Oam-Web/src/test/java/com/cpop/oam/web/CpopEasyLearnTest.java @@ -1,10 +1,14 @@ package com.cpop.oam.web; +import cn.binarywang.wx.miniapp.api.WxMaQrcodeService; +import cn.binarywang.wx.miniapp.api.WxMaService; import com.alibaba.fastjson.JSONObject; import com.cpop.common.utils.StringUtils; import com.cpop.core.base.enums.OrderSource; import com.cpop.core.base.exception.ServiceException; +import com.cpop.core.handler.TencentCosHandler; import com.cpop.core.utils.SpringUtils; +import com.cpop.core.utils.file.FileUtils; import com.cpop.jambox.business.entity.EasyLearnOrder; import com.cpop.jambox.business.entity.StoreExtend; import com.cpop.jambox.business.service.EasyLearnOrderService; @@ -34,11 +38,14 @@ import com.mybatisflex.core.row.Db; import com.mybatisflex.core.row.DbChain; import com.mybatisflex.core.row.Row; import com.mybatisflex.core.row.RowKey; +import com.qcloud.cos.model.UploadResult; +import me.chanjar.weixin.common.error.WxErrorException; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.ActiveProfiles; import org.springframework.web.client.RestTemplate; +import org.springframework.web.multipart.MultipartFile; import java.io.*; import java.nio.file.Files; @@ -303,4 +310,62 @@ public class CpopEasyLearnTest { .update(); } } + + /** + * 创建微信太阳码 + * @author DB + * @since 2024/1/23 + */ + @Test + public void createMiniQrCode() throws WxErrorException, IOException { + // 获取当前执行环境 + String active = SpringUtils.getActiveProfile(); + WxMaQrcodeService qrcodeService = SpringUtils.getBean(WxMaService.class).getQrcodeService(); + File qrCode = qrcodeService.createWxaCodeUnlimit("105525473294344192", "pages/pay/pay", false, StringUtils.equals(active, "prod") ? "release" : "trial", 430, + true, null, false); + MultipartFile multipartFile = FileUtils.getInstance().getMultipartFile(qrCode); + TencentCosHandler tencentCosHandler = SpringUtils.getBean(TencentCosHandler.class); + UploadResult uploadResult = tencentCosHandler.cdnUpload(multipartFile); + System.out.println("https://" + uploadResult.getBucketName() + tencentCosHandler.getCdnUrl() + uploadResult.getKey()); + } + + @Test + public void testtest(){ + String serviceIntroduction = "排课000\uD83C\uDF3F\uD83C\uDF8B\uD83C\uDF15\uD83C\uDF44\uD83D\uDC1A"; + String newServiceIntroduction = ""; + //特殊字符过滤 + if (StringUtils.isBlank(serviceIntroduction)) { + newServiceIntroduction = serviceIntroduction; + } + StringBuilder buf = null; + int len = serviceIntroduction.length(); + for (int i = 0; i < len; i++) { + char codePoint = serviceIntroduction.charAt(i); + if (isEmojiCharacter(codePoint)) { + if (buf == null) { + buf = new StringBuilder(serviceIntroduction.length()); + } + buf.append(codePoint); + } + } + if (buf == null) { + newServiceIntroduction = serviceIntroduction; + } else { + if (buf.length() == len) { + buf = null; + newServiceIntroduction = serviceIntroduction; + } else { + newServiceIntroduction = buf.toString(); + } + } + System.out.println(newServiceIntroduction); + } + + private boolean isEmojiCharacter(char codePoint) { + return (codePoint == 0x0) || (codePoint == 0x9) || (codePoint == 0xA) + || (codePoint == 0xD) + || ((codePoint >= 0x20) && (codePoint <= 0xD7FF)) + || ((codePoint >= 0xE000) && (codePoint <= 0xFFFD)) + || ((codePoint >= 0x10000) && (codePoint <= 0x10FFFF)); + } } diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BrandManagerController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageBrandManagerController.java similarity index 97% rename from Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BrandManagerController.java rename to Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageBrandManagerController.java index 716efc5..bcf3366 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BrandManagerController.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageBrandManagerController.java @@ -31,8 +31,8 @@ import java.util.List; */ @RestController @Api(tags = "品牌管理员表接口") -@RequestMapping("/brandManage") -public class BrandManagerController { +@RequestMapping("/backstage/brandManage") +public class BackstageBrandManagerController { @Autowired private BrandManagerService brandManageService; diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BusinessController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageBusinessController.java similarity index 97% rename from Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BusinessController.java rename to Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageBusinessController.java index 3a187d2..3bb5b62 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BusinessController.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageBusinessController.java @@ -36,8 +36,8 @@ import static com.cpop.oam.business.entity.table.StaffTableDef.STAFF; */ @RestController @Api(tags = "市场模块") -@RequestMapping("/business") -public class BusinessController { +@RequestMapping("/backstage/business") +public class BackstageBusinessController { @Autowired private BusinessService businessService; @@ -182,8 +182,8 @@ public class BusinessController { * @return R */ @ApiOperation("校区签约") - @PutMapping("/storeSign") - public R storeSign(@ApiParam(value = "校区id", required = true) @RequestParam(value = "id") String id) { + @PutMapping("/storeSign/{id}") + public R storeSign(@ApiParam(value = "校区id", required = true) @PathVariable String id) { businessService.storeSign(id); return R.ok(); } diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/CloudDataController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageCloudDataController.java similarity index 99% rename from Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/CloudDataController.java rename to Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageCloudDataController.java index e62bee5..3bd198c 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/CloudDataController.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageCloudDataController.java @@ -20,8 +20,8 @@ import org.springframework.web.bind.annotation.RestController; */ @RestController @Api(tags = "云数据查询接口") -@RequestMapping("/cloudData") -public class CloudDataController { +@RequestMapping("/backstage/cloudData") +public class BackstageCloudDataController { @Autowired private CloudCustomerStudentHandler cloudCustomerStudentHandler; diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/DataImportController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageDataImportController.java similarity index 98% rename from Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/DataImportController.java rename to Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageDataImportController.java index a250db9..10da440 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/DataImportController.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageDataImportController.java @@ -38,8 +38,8 @@ import static com.cpop.system.business.entity.table.StoreTableDef.STORE; */ @RestController @Api(tags = "数据导入接口") -@RequestMapping("/dataImport") -public class DataImportController { +@RequestMapping("/backstage/dataImport") +public class BackstageDataImportController { @Autowired private DataImportService dataImportService; diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/DeptController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageDeptController.java similarity index 97% rename from Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/DeptController.java rename to Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageDeptController.java index c35c540..2e5cdac 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/DeptController.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageDeptController.java @@ -24,8 +24,8 @@ import java.util.List; */ @RestController @Api(tags = "系统部门模块") -@RequestMapping("/dept") -public class DeptController { +@RequestMapping("/backstage/dept") +public class BackstageDeptController { @Autowired private DeptService deptService; diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/DutyController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageDutyController.java similarity index 98% rename from Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/DutyController.java rename to Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageDutyController.java index 7d90889..54d4ef7 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/DutyController.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageDutyController.java @@ -28,8 +28,8 @@ import static com.cpop.oam.business.entity.table.StaffTableDef.STAFF; */ @RestController @Api(tags = "值班日历模块") -@RequestMapping("/duty") -public class DutyController { +@RequestMapping("/backstage/duty") +public class BackstageDutyController { @Autowired private DutyService dutyService; diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/FinanceReimburseController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageFinanceReimburseController.java similarity index 98% rename from Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/FinanceReimburseController.java rename to Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageFinanceReimburseController.java index 71eab07..808a169 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/FinanceReimburseController.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageFinanceReimburseController.java @@ -30,8 +30,8 @@ import static com.cpop.oam.business.entity.table.FinanceReimburseTableDef.FINANC */ @RestController @Api(tags = "财务报销模块") -@RequestMapping("/financeReimburse") -public class FinanceReimburseController { +@RequestMapping("/backstage/financeReimburse") +public class BackstageFinanceReimburseController { @Autowired private FinanceReimburseService financeReimburseService; diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/OamMallController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageOamMallController.java similarity index 97% rename from Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/OamMallController.java rename to Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageOamMallController.java index cbd9a81..f90f0c8 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/OamMallController.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageOamMallController.java @@ -26,8 +26,8 @@ import java.util.List; */ @RestController @Api(tags = "商城管理模块") -@RequestMapping("/oamMall") -public class OamMallController { +@RequestMapping("/backstage/oamMall") +public class BackstageOamMallController { @Autowired private OamMallService oamMallService; diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/StaffController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageStaffController.java similarity index 98% rename from Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/StaffController.java rename to Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageStaffController.java index d639fd4..96163e2 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/StaffController.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageStaffController.java @@ -36,8 +36,8 @@ import static com.cpop.system.business.entity.table.RoleTableDef.ROLE; */ @RestController @Api(tags = "员工账号管理模块") -@RequestMapping("/staff") -public class StaffController { +@RequestMapping("/backstage/staff") +public class BackstageStaffController { @Autowired private StaffService staffService; diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/StorePlugController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageStorePlugController.java similarity index 97% rename from Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/StorePlugController.java rename to Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageStorePlugController.java index b7e11d4..3a5255d 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/StorePlugController.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageStorePlugController.java @@ -32,8 +32,8 @@ import static com.cpop.jambox.business.entity.table.StorePlugTableDef.STORE_PLUG */ @RestController @Api(tags = "校区-插件记录表接口") -@RequestMapping("/storePlug") -public class StorePlugController { +@RequestMapping("/backstage/storePlug") +public class BackstageStorePlugController { @Autowired private StorePlugService storePlugService; diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/SysConfigController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageSysConfigController.java similarity index 95% rename from Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/SysConfigController.java rename to Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageSysConfigController.java index 50660c1..2d007fb 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/SysConfigController.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageSysConfigController.java @@ -20,8 +20,8 @@ import org.springframework.web.bind.annotation.*; */ @Api(tags = "系统配置模块") @RestController -@RequestMapping("/sysConfig") -public class SysConfigController { +@RequestMapping("/backstage/sysConfig") +public class BackstageSysConfigController { @Autowired private CommonService commonService; diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/TaskDemandController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageTaskDemandController.java similarity index 98% rename from Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/TaskDemandController.java rename to Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageTaskDemandController.java index 460e28d..ff12b3e 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/TaskDemandController.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageTaskDemandController.java @@ -33,8 +33,8 @@ import static com.cpop.system.business.entity.table.StoreTableDef.STORE; */ @RestController @Api(tags = "工单模块-需求") -@RequestMapping("/taskDemand") -public class TaskDemandController { +@RequestMapping("/backstage/taskDemand") +public class BackstageTaskDemandController { @Autowired private TaskDemandService taskDemandService; diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/TaskTechnologyController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageTaskTechnologyController.java similarity index 99% rename from Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/TaskTechnologyController.java rename to Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageTaskTechnologyController.java index 35298de..8dc32e7 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/TaskTechnologyController.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageTaskTechnologyController.java @@ -28,8 +28,8 @@ import java.util.List; */ @RestController @Api(tags = "技术模块-技术") -@RequestMapping("/taskTechnology") -public class TaskTechnologyController { +@RequestMapping("/backstage/taskTechnology") +public class BackstageTaskTechnologyController { @Autowired private TaskWorkOrderService taskWorkOrderService; diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/TaskWorkOrderController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageTaskWorkOrderController.java similarity index 98% rename from Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/TaskWorkOrderController.java rename to Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageTaskWorkOrderController.java index 703f6e0..582d0e6 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/TaskWorkOrderController.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageTaskWorkOrderController.java @@ -34,8 +34,8 @@ import static com.cpop.system.business.entity.table.StoreTableDef.STORE; */ @RestController @Api(tags = "工单模块-工单") -@RequestMapping("/taskWorkOrder") -public class TaskWorkOrderController { +@RequestMapping("/backstage/taskWorkOrder") +public class BackstageTaskWorkOrderController { @Autowired private TaskWorkOrderService taskWorkOrderService; diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/TechnologyToolController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageTechnologyToolController.java similarity index 97% rename from Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/TechnologyToolController.java rename to Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageTechnologyToolController.java index 5cea5ea..3ac71c9 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/TechnologyToolController.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageTechnologyToolController.java @@ -32,8 +32,8 @@ import static com.cpop.oam.business.entity.table.TechnologyToolTableDef.TECHNOLO */ @RestController @Api(tags = "技术工具管理") -@RequestMapping("/technologyTool") -public class TechnologyToolController { +@RequestMapping("/backstage/technologyTool") +public class BackstageTechnologyToolController { @Autowired private TechnologyToolService technologyToolService; diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/WxCpController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageWxCpController.java similarity index 97% rename from Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/WxCpController.java rename to Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageWxCpController.java index 45a0228..8c836ba 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/WxCpController.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageWxCpController.java @@ -24,8 +24,8 @@ import javax.servlet.http.HttpServletRequest; @Slf4j @RestController @Api(tags = "企业微信相关模块") -@RequestMapping("/wxCp") -public class WxCpController { +@RequestMapping("/backstage/wxCp") +public class BackstageWxCpController { @Autowired private OamWxCpService oamWxCpService; diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/WxOpenController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageWxOpenController.java similarity index 99% rename from Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/WxOpenController.java rename to Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageWxOpenController.java index bee237e..12d8a9a 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/WxOpenController.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageWxOpenController.java @@ -47,8 +47,8 @@ import java.util.List; */ @RestController @Api(tags = "微信开放平台模块") -@RequestMapping("/wxOpen") -public class WxOpenController { +@RequestMapping("/backstage/wxOpen") +public class BackstageWxOpenController { private final Logger logger = LoggerFactory.getLogger(this.getClass()); diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/WxPayController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageWxPayController.java similarity index 98% rename from Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/WxPayController.java rename to Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageWxPayController.java index 541bdbe..e6949b5 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/WxPayController.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageWxPayController.java @@ -34,8 +34,8 @@ import static com.cpop.system.business.entity.table.BrandTableDef.BRAND; */ @RestController @Api(tags = "微信支付模块") -@RequestMapping("/wxPay") -public class WxPayController { +@RequestMapping("/backstage/wxPay") +public class BackstageWxPayController { @Autowired private WxPayConfiguration wxPayConfiguration; diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/callback/CloudCallbackController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/callback/CallBackCloudCallbackController.java similarity index 96% rename from Cpop-Oam/src/main/java/com/cpop/oam/business/controller/callback/CloudCallbackController.java rename to Cpop-Oam/src/main/java/com/cpop/oam/business/controller/callback/CallBackCloudCallbackController.java index aac0545..2930802 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/callback/CloudCallbackController.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/callback/CallBackCloudCallbackController.java @@ -22,7 +22,8 @@ import org.springframework.web.bind.annotation.RestController; @Api(tags = "云回调controller") @RestController @RequestMapping("/cloudCallback") -public class CloudCallbackController { +@Deprecated +public class CallBackCloudCallbackController { /** * 云联合回调 diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/callback/CallbackCloudController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/callback/CallbackCloudController.java new file mode 100644 index 0000000..6ad06eb --- /dev/null +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/callback/CallbackCloudController.java @@ -0,0 +1,40 @@ +package com.cpop.oam.business.controller.callback; + +import com.cpop.core.base.R; +import com.cpop.oam.business.bo.CloudUnionCallbackBo; +import com.cpop.oam.framework.enums.CloudCallbackEnums; +import com.cpop.oam.framework.strategy.cloud.CloudCallbackStrategy; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author DB + * @version 1.0.0 + * @since 2024-01-16 11:28 + */ +@Api(tags = "云回调controller") +@RestController +@RequestMapping("/callback/cloud") +public class CallbackCloudController { + + /** + * 云联合回调 + * @author DB + * @since 2024/1/16 + * @param callback 回调参数 + * @return R + */ + //@SimpleSignatureCheck + @ApiOperation("云联合回调") + @PostMapping("/cloudUnionCallback") + public R cloudUnionCallback(@RequestBody @Validated CloudUnionCallbackBo callback) { + CloudCallbackStrategy cloudCallbackStrategy = CloudCallbackEnums.valueOf(callback.getCallbackEnum()).getCloudCallbackStrategy(); + cloudCallbackStrategy.callback(callback); + return R.ok(); + } +} diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/callback/CallbackWxCpController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/callback/CallbackWxCpController.java new file mode 100644 index 0000000..efe3483 --- /dev/null +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/callback/CallbackWxCpController.java @@ -0,0 +1,107 @@ +package com.cpop.oam.business.controller.callback; + +import com.cpop.common.utils.JsonUtils; +import com.cpop.common.utils.StringUtils; +import com.cpop.oam.business.service.OamWxCpService; +import com.cpop.oam.framework.config.wxCp.WxCpConfiguration; +import io.swagger.annotations.Api; +import me.chanjar.weixin.cp.api.WxCpService; +import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage; +import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage; +import me.chanjar.weixin.cp.util.crypto.WxCpCryptUtil; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * @author DB + * @createTime 2023/10/12 15:17 + * @description 企业微信认证回调接口 + */ +@Api(tags = "企业微信消息接收controller") +@RestController +@RequestMapping("/callback/wxCp/{agentId}") +public class CallbackWxCpController { + + private final Logger logger = LoggerFactory.getLogger(this.getClass()); + + @Autowired + private OamWxCpService oamWxCpService; + + @GetMapping(produces = "text/plain;charset=utf-8") + public String authGet(@PathVariable + Integer agentId, @RequestParam(name = "msg_signature", required = false) + String signature, @RequestParam(name = "timestamp", required = false) + String timestamp, @RequestParam(name = "nonce", required = false) + String nonce, @RequestParam(name = "echostr", required = false) + String echostr) { + this.logger.info("\n接收到来自微信服务器的认证消息:signature = [{}], timestamp = [{}], nonce = [{}], echostr = [{}]", + signature, + timestamp, + nonce, + echostr); + if (StringUtils.isAnyBlank(signature, timestamp, nonce, echostr)) { + throw new IllegalArgumentException("请求参数非法,请核实!"); + } + final WxCpService wxCpService = WxCpConfiguration.getCpService(agentId); + if (wxCpService == null) { + throw new IllegalArgumentException(String.format("未找到对应agentId=[%d]的配置,请核实!", agentId)); + } + if (wxCpService.checkSignature(signature, timestamp, nonce, echostr)) { + return new WxCpCryptUtil(wxCpService.getWxCpConfigStorage()).decrypt(echostr); + } + return "非法请求"; + } + + @PostMapping(produces = "application/xml; charset=UTF-8") + public String post(@PathVariable + Integer agentId, @RequestBody + String requestBody, @RequestParam("msg_signature") + String signature, @RequestParam("timestamp") + String timestamp, @RequestParam("nonce") + String nonce) { + this.logger.info("\n接收微信请求:[signature=[{}], timestamp=[{}], nonce=[{}], requestBody=[\n{}\n] ", + signature, + timestamp, + nonce, + requestBody); + final WxCpService wxCpService = WxCpConfiguration.getCpService(agentId); + WxCpXmlMessage inMessage = WxCpXmlMessage + .fromEncryptedXml(requestBody, wxCpService.getWxCpConfigStorage(), timestamp, nonce, signature); + this.logger.debug("\n消息解密后内容为:\n{} ", JsonUtils.toJson(inMessage)); + WxCpXmlOutMessage outMessage = this.route(agentId, inMessage); + if (outMessage == null) { + return ""; + } + String out = outMessage.toEncryptedXml(wxCpService.getWxCpConfigStorage()); + this.logger.debug("\n组装回复信息:{}", out); + return out; + } + + private WxCpXmlOutMessage route(Integer agentId, WxCpXmlMessage message) { + try { + return WxCpConfiguration.getRouters().get(agentId).route(message); + } catch (Exception e) { + this.logger.error(e.getMessage(), e); + } + return null; + } + + /** + * 企微的o2认证可查询用户敏感信息 + * @author DB + * @since 2023/11/17 14:42 + * @param agentId 企业微信服务应用id + * @param code 授权码 + * @param state 信息 注册 + */ + @GetMapping(produces = "text/plain;charset=utf-8", value = "/registerCode") + public void registerCode(@PathVariable + Integer agentId, @RequestParam("code") + String code, @RequestParam("state") + String state) { + oamWxCpService.registerCode(agentId, code); + } + +} diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/callback/WxCpPortalController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/callback/WxCpPortalController.java index a95dd82..2dec51f 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/callback/WxCpPortalController.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/callback/WxCpPortalController.java @@ -22,6 +22,7 @@ import org.springframework.web.bind.annotation.*; @Api(tags = "企业微信消息接收controller") @RestController @RequestMapping("/wxCp/portal/{agentId}") +@Deprecated public class WxCpPortalController { private final Logger logger = LoggerFactory.getLogger(this.getClass()); diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/BusinessServiceImpl.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/BusinessServiceImpl.java index 6b440f6..1634ac5 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/BusinessServiceImpl.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/BusinessServiceImpl.java @@ -371,15 +371,12 @@ public class BusinessServiceImpl extends ServiceImpl i .select(STORE.ID, STORE.STORE_NAME, STORE.PERSON_CHARGE, STORE.PHONE, STORE.BRAND_ID) .select(BRAND.BRAND_NAME) .select(STORE_LICENSE.LICENSE_PIC_URL) - .select(BRAND_EXTEND.BRAND_CLOUD_ID) - .select(STORE_EXTEND.STORE_CLOUD_ID) .from(STORE) .leftJoin(BRAND).on(BRAND.ID.eq(STORE.BRAND_ID)) .leftJoin(STORE_LICENSE).on(STORE_LICENSE.STORE_ID.eq(STORE.ID)) - .leftJoin(BRAND_EXTEND).on(BRAND_EXTEND.BRAND_ID.eq(BRAND.ID)) - .leftJoin(STORE_EXTEND).on(STORE_EXTEND.STORE_ID.eq(STORE.ID)) .leftJoin(STORE_SIGN).on(STORE_SIGN.ID.eq(STORE.SIGN_ID)) .where(STORE.SIGN_ID.isNull()) + .and(STORE.IS_TEST.eq(false)) .and(STORE.STORE_NAME.like(params) .or(STORE.PERSON_CHARGE.like(params) .or(STORE.PHONE.eq(params)))) @@ -401,5 +398,9 @@ public class BusinessServiceImpl extends ServiceImpl i storeSign.setSignStaffId(loginUserInfo.getString("id")); StoreSignService storeSignService = SpringUtils.getBean(StoreSignService.class); storeSignService.save(storeSign); + SpringUtils.getBean(StoreService.class).updateChain() + .set(STORE.SIGN_ID,storeSign.getId()) + .where(STORE.ID.eq(id)) + .update(); } } diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/TaskServiceImpl.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/TaskServiceImpl.java index ca79032..b72c0e9 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/TaskServiceImpl.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/TaskServiceImpl.java @@ -397,7 +397,7 @@ public class TaskServiceImpl extends ServiceImpl implements Ta .leftJoin(STAFF) .on(STAFF.ID.eq(TASK.RESPONSIBLE_STAFF_ID)) .where(TASK.TASK_TYPE.in(0, 1)) - .orderBy(TASK.EXPECTED_COMPLETION_DATE.asc()), + .orderBy(TASK.TASK_ITEM.asc(), TASK.EXPECTED_COMPLETION_DATE.asc()), PersonTaskPageVo.class); } diff --git a/Cpop-Pay/src/main/resources/application-pay.yml b/Cpop-Pay/src/main/resources/application-pay.yml index df43d1e..a8e1674 100644 --- a/Cpop-Pay/src/main/resources/application-pay.yml +++ b/Cpop-Pay/src/main/resources/application-pay.yml @@ -14,4 +14,7 @@ wx: sharing-account: 1618884922 sharing-account-name: 果酱盒子 #服务商appid - service-app-id: wx1eb0e5fb7dac3c05 \ No newline at end of file + service-app-id: wx1eb0e5fb7dac3c05 +logging: + level: + com.github.binarywang.wxpay: info \ No newline at end of file diff --git a/Cpop-System/src/main/java/com/cpop/system/business/controller/ProfitSharingController.java b/Cpop-System/src/main/java/com/cpop/system/business/controller/ProfitSharingController.java deleted file mode 100644 index 56d5c0f..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/controller/ProfitSharingController.java +++ /dev/null @@ -1,106 +0,0 @@ -package com.cpop.system.business.controller; - -import com.mybatisflex.core.paginate.Page; -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.ProfitSharing; -import com.cpop.system.business.service.ProfitSharingService; -import org.springframework.web.bind.annotation.RestController; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; -import java.io.Serializable; -import java.util.List; - -/** - * 系统分账表 控制层。 - * - * @author DB - * @since 2023-10-27 - */ -@RestController -@Api(tags = "系统分账表接口") -@RequestMapping("/profitSharing") -public class ProfitSharingController { - - @Autowired - private ProfitSharingService profitSharingService; - - /** - * 添加系统分账表。 - * - * @param profitSharing 系统分账表 - * @return {@code true} 添加成功,{@code false} 添加失败 - */ - @PostMapping("/save") - @ApiOperation("保存系统分账表") - public boolean save(@RequestBody @ApiParam("系统分账表") ProfitSharing profitSharing) { - return profitSharingService.save(profitSharing); - } - - /** - * 根据主键删除系统分账表。 - * - * @param id 主键 - * @return {@code true} 删除成功,{@code false} 删除失败 - */ - @DeleteMapping("/remove/{id}") - @ApiOperation("根据主键系统分账表") - public boolean remove(@PathVariable @ApiParam("系统分账表主键") Serializable id) { - return profitSharingService.removeById(id); - } - - /** - * 根据主键更新系统分账表。 - * - * @param profitSharing 系统分账表 - * @return {@code true} 更新成功,{@code false} 更新失败 - */ - @PutMapping("/update") - @ApiOperation("根据主键更新系统分账表") - public boolean update(@RequestBody @ApiParam("系统分账表主键") ProfitSharing profitSharing) { - return profitSharingService.updateById(profitSharing); - } - - /** - * 查询所有系统分账表。 - * - * @return 所有数据 - */ - @GetMapping("/list") - @ApiOperation("查询所有系统分账表") - public List list() { - return profitSharingService.list(); - } - - /** - * 根据系统分账表主键获取详细信息。 - * - * @param id 系统分账表主键 - * @return 系统分账表详情 - */ - @GetMapping("/getInfo/{id}") - @ApiOperation("根据主键获取系统分账表") - public ProfitSharing getInfo(@PathVariable @ApiParam("系统分账表主键") Serializable id) { - return profitSharingService.getById(id); - } - - /** - * 分页查询系统分账表。 - * - * @param page 分页对象 - * @return 分页对象 - */ - @GetMapping("/page") - @ApiOperation("分页查询系统分账表") - public Page page(@ApiParam("分页信息") Page page) { - return profitSharingService.page(page); - } - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/controller/StoreLicenseController.java b/Cpop-System/src/main/java/com/cpop/system/business/controller/StoreLicenseController.java deleted file mode 100644 index a0ddfa0..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/controller/StoreLicenseController.java +++ /dev/null @@ -1,106 +0,0 @@ -package com.cpop.system.business.controller; - -import com.mybatisflex.core.paginate.Page; -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.StoreLicense; -import com.cpop.system.business.service.StoreLicenseService; -import org.springframework.web.bind.annotation.RestController; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; -import java.io.Serializable; -import java.util.List; - -/** - * 校区/店铺营业执照 控制层。 - * - * @author DB - * @since 2023-12-12 - */ -@RestController -@Api(tags = "校区/店铺营业执照接口") -@RequestMapping("/storeLicense") -public class StoreLicenseController { - - @Autowired - private StoreLicenseService storeLicenseService; - - /** - * 添加校区/店铺营业执照。 - * - * @param storeLicense 校区/店铺营业执照 - * @return {@code true} 添加成功,{@code false} 添加失败 - */ - @PostMapping("/save") - @ApiOperation("保存校区/店铺营业执照") - public boolean save(@RequestBody @ApiParam("校区/店铺营业执照") StoreLicense storeLicense) { - return storeLicenseService.save(storeLicense); - } - - /** - * 根据主键删除校区/店铺营业执照。 - * - * @param id 主键 - * @return {@code true} 删除成功,{@code false} 删除失败 - */ - @DeleteMapping("/remove/{id}") - @ApiOperation("根据主键校区/店铺营业执照") - public boolean remove(@PathVariable @ApiParam("校区/店铺营业执照主键") Serializable id) { - return storeLicenseService.removeById(id); - } - - /** - * 根据主键更新校区/店铺营业执照。 - * - * @param storeLicense 校区/店铺营业执照 - * @return {@code true} 更新成功,{@code false} 更新失败 - */ - @PutMapping("/update") - @ApiOperation("根据主键更新校区/店铺营业执照") - public boolean update(@RequestBody @ApiParam("校区/店铺营业执照主键") StoreLicense storeLicense) { - return storeLicenseService.updateById(storeLicense); - } - - /** - * 查询所有校区/店铺营业执照。 - * - * @return 所有数据 - */ - @GetMapping("/list") - @ApiOperation("查询所有校区/店铺营业执照") - public List list() { - return storeLicenseService.list(); - } - - /** - * 根据校区/店铺营业执照主键获取详细信息。 - * - * @param id 校区/店铺营业执照主键 - * @return 校区/店铺营业执照详情 - */ - @GetMapping("/getInfo/{id}") - @ApiOperation("根据主键获取校区/店铺营业执照") - public StoreLicense getInfo(@PathVariable @ApiParam("校区/店铺营业执照主键") Serializable id) { - return storeLicenseService.getById(id); - } - - /** - * 分页查询校区/店铺营业执照。 - * - * @param page 分页对象 - * @return 分页对象 - */ - @GetMapping("/page") - @ApiOperation("分页查询校区/店铺营业执照") - public Page page(@ApiParam("分页信息") Page page) { - return storeLicenseService.page(page); - } - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/controller/BrandController.java b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageBrandController.java similarity index 96% rename from Cpop-System/src/main/java/com/cpop/system/business/controller/BrandController.java rename to Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageBrandController.java index ab899c8..972731e 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/controller/BrandController.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageBrandController.java @@ -1,4 +1,4 @@ -package com.cpop.system.business.controller; +package com.cpop.system.business.controller.backstage; import com.cpop.common.utils.bean.BeanUtils; import com.cpop.core.base.R; @@ -31,8 +31,8 @@ import io.swagger.annotations.ApiParam; */ @RestController @Api(tags = "系统-品牌表接口") -@RequestMapping("/brand") -public class BrandController { +@RequestMapping("/backstage/brand") +public class BackstageBrandController { @Autowired private BrandService brandService; diff --git a/Cpop-System/src/main/java/com/cpop/system/business/controller/DictDataController.java b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageDictDataController.java similarity index 96% rename from Cpop-System/src/main/java/com/cpop/system/business/controller/DictDataController.java rename to Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageDictDataController.java index 8f58e9b..ff8481b 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/controller/DictDataController.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageDictDataController.java @@ -1,4 +1,4 @@ -package com.cpop.system.business.controller; +package com.cpop.system.business.controller.backstage; import com.cpop.common.utils.bean.BeanUtils; import com.cpop.core.base.R; @@ -38,8 +38,8 @@ import java.util.List; */ @RestController @Api(tags = "系统-字典数据表接口") -@RequestMapping("/dictData") -public class DictDataController { +@RequestMapping("/backstage/dictData") +public class BackstageDictDataController { @Autowired private DictDataService dictDataService; diff --git a/Cpop-System/src/main/java/com/cpop/system/business/controller/DictTypeController.java b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageDictTypeController.java similarity index 97% rename from Cpop-System/src/main/java/com/cpop/system/business/controller/DictTypeController.java rename to Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageDictTypeController.java index 56a4b85..c6b69fa 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/controller/DictTypeController.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageDictTypeController.java @@ -1,4 +1,4 @@ -package com.cpop.system.business.controller; +package com.cpop.system.business.controller.backstage; import com.cpop.common.utils.bean.BeanUtils; import com.cpop.core.base.R; @@ -41,8 +41,8 @@ import static com.cpop.system.business.entity.table.DictTypeTableDef.DICT_TYPE; */ @RestController @Api(tags = "系统管理模块-字典类型接口") -@RequestMapping("/dictType") -public class DictTypeController { +@RequestMapping("/backstage/dictType") +public class BackstageDictTypeController { @Autowired private DictTypeService dictTypeService; diff --git a/Cpop-System/src/main/java/com/cpop/system/business/controller/LoginController.java b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageLoginController.java similarity index 90% rename from Cpop-System/src/main/java/com/cpop/system/business/controller/LoginController.java rename to Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageLoginController.java index 2092bed..15334da 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/controller/LoginController.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageLoginController.java @@ -1,4 +1,4 @@ -package com.cpop.system.business.controller; +package com.cpop.system.business.controller.backstage; import com.cpop.core.base.R; import com.cpop.system.business.service.LoginService; @@ -8,6 +8,7 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; @@ -20,7 +21,8 @@ import java.util.Set; */ @Api(tags = "通用系统登录模块") @RestController -public class LoginController { +@RequestMapping("/backstage") +public class BackstageLoginController { @Autowired private LoginService loginService; diff --git a/Cpop-System/src/main/java/com/cpop/system/business/controller/MenuController.java b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageMenuController.java similarity index 96% rename from Cpop-System/src/main/java/com/cpop/system/business/controller/MenuController.java rename to Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageMenuController.java index 67c162e..a69df44 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/controller/MenuController.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageMenuController.java @@ -1,4 +1,4 @@ -package com.cpop.system.business.controller; +package com.cpop.system.business.controller.backstage; import com.cpop.core.annontation.OperationLog; import com.cpop.core.base.R; @@ -24,8 +24,8 @@ import java.util.List; */ @RestController @Api(tags = "通用系统菜单表接口") -@RequestMapping("/menu") -public class MenuController { +@RequestMapping("/backstage/menu") +public class BackstageMenuController { @Autowired private MenuService menuService; diff --git a/Cpop-System/src/main/java/com/cpop/system/business/controller/RoleController.java b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageRoleController.java similarity index 96% rename from Cpop-System/src/main/java/com/cpop/system/business/controller/RoleController.java rename to Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageRoleController.java index a55b3ff..1314bf4 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/controller/RoleController.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageRoleController.java @@ -1,4 +1,4 @@ -package com.cpop.system.business.controller; +package com.cpop.system.business.controller.backstage; import com.cpop.core.base.R; import com.cpop.system.business.bo.MenuListBo; @@ -27,8 +27,8 @@ import java.util.List; */ @RestController @Api(tags = "系统角色表接口") -@RequestMapping("/role") -public class RoleController { +@RequestMapping("/backstage/role") +public class BackstageRoleController { @Autowired private RoleService roleService; diff --git a/Cpop-System/src/main/java/com/cpop/system/business/controller/StoreController.java b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageStoreController.java similarity index 93% rename from Cpop-System/src/main/java/com/cpop/system/business/controller/StoreController.java rename to Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageStoreController.java index 54e04ec..7569e84 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/controller/StoreController.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageStoreController.java @@ -1,4 +1,4 @@ -package com.cpop.system.business.controller; +package com.cpop.system.business.controller.backstage; import com.cpop.core.base.R; import com.cpop.system.business.bo.StoreBo; @@ -23,8 +23,8 @@ import io.swagger.annotations.Api; */ @RestController @Api(tags = "系统-店铺/校区表接口") -@RequestMapping("/store") -public class StoreController { +@RequestMapping("/backstage/store") +public class BackstageStoreController { @Autowired private StoreService storeService; diff --git a/Cpop-System/src/main/java/com/cpop/system/business/controller/StoreSignController.java b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageStoreSignController.java similarity index 95% rename from Cpop-System/src/main/java/com/cpop/system/business/controller/StoreSignController.java rename to Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageStoreSignController.java index 3961e87..54ad667 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/controller/StoreSignController.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageStoreSignController.java @@ -1,4 +1,4 @@ -package com.cpop.system.business.controller; +package com.cpop.system.business.controller.backstage; import com.alibaba.excel.EasyExcel; import com.cpop.core.base.R; @@ -28,8 +28,8 @@ import java.net.URLEncoder; */ @RestController @Api(tags = "校区签约续费接口") -@RequestMapping("/storeSign") -public class StoreSignController { +@RequestMapping("/backstage/storeSign") +public class BackstageStoreSignController { @Autowired private StoreSignService storeSignService; diff --git a/Cpop-System/src/main/java/com/cpop/system/business/controller/SysCommonController.java b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageSysCommonController.java similarity index 96% rename from Cpop-System/src/main/java/com/cpop/system/business/controller/SysCommonController.java rename to Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageSysCommonController.java index 89c9f31..ab2a911 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/controller/SysCommonController.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageSysCommonController.java @@ -1,4 +1,4 @@ -package com.cpop.system.business.controller; +package com.cpop.system.business.controller.backstage; import com.cpop.core.base.R; import com.cpop.core.config.CpopConfig; @@ -28,8 +28,8 @@ import org.springframework.web.multipart.MultipartFile; @Slf4j @Api(tags = "通用接口") @RestController -@RequestMapping("/sysCommon") -public class SysCommonController { +@RequestMapping("/backstage/sysCommon") +public class BackstageSysCommonController { @Autowired private ServerConfig serverConfig; diff --git a/Cpop-System/src/main/java/com/cpop/system/business/controller/mini/MiniSysCommonController.java b/Cpop-System/src/main/java/com/cpop/system/business/controller/mini/MiniSysCommonController.java new file mode 100644 index 0000000..e6d49bf --- /dev/null +++ b/Cpop-System/src/main/java/com/cpop/system/business/controller/mini/MiniSysCommonController.java @@ -0,0 +1,51 @@ +package com.cpop.system.business.controller.mini; + +import com.cpop.core.base.R; +import com.cpop.core.config.CpopConfig; +import com.cpop.core.config.ServerConfig; +import com.cpop.core.handler.TencentCosHandler; +import com.cpop.core.utils.file.FileUploadUtils; +import com.cpop.core.utils.file.FileUtils; +import com.cpop.system.business.bo.SyncBrandAndStoreBo; +import com.cpop.system.business.service.StoreService; +import com.cpop.system.business.vo.SysFileVo; +import com.qcloud.cos.model.UploadResult; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +/** + * @author DB + * @createTime 2023/09/13 15:10 + * @description 通用接口 + */ +@Slf4j +@Api(tags = "通用接口") +@RestController +@RequestMapping("/mini/sysCommon") +public class MiniSysCommonController { + + @Autowired + private StoreService storeService; + + /** + * 小程序同步品牌和校区 + * @author DB + * @since 2023/12/21 + * @param bo 请求参数 + * @return R + */ + @Deprecated + @ApiOperation("小程序同步品牌和校区") + @PostMapping("/syncBrandAndStore") + public R miniSyncBrandAndStore(@RequestBody SyncBrandAndStoreBo bo) { + storeService.miniSyncBrandAndStore(bo); + return R.ok(); + } +}