Browse Source

版本更新

master
主管理员 3 months ago
parent
commit
4f56122860
64 changed files with 2678 additions and 146 deletions
  1. +7
    -96
      han-hai-module-pay/src/main/java/org/jeecg/modules/pay/MpWxPayService.java
  2. +8
    -0
      han-hai-module-pay/src/main/java/org/jeecg/modules/pay/config/WxPay.java
  3. +8
    -14
      han-hai-module-pay/src/main/resources/pay_weixin.properties
  4. +171
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityClick/controller/CityClickController.java
  5. +66
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityClick/entity/CityClick.java
  6. +17
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityClick/mapper/CityClickMapper.java
  7. +5
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityClick/mapper/xml/CityClickMapper.xml
  8. +14
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityClick/service/ICityClickService.java
  9. +19
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityClick/service/impl/CityClickServiceImpl.java
  10. +189
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityClick/vue/CityClickList.vue
  11. +119
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityClick/vue/modules/CityClickForm.vue
  12. +84
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityClick/vue/modules/CityClickModal.Style#Drawer.vue
  13. +60
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityClick/vue/modules/CityClickModal.vue
  14. +61
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityClick/vue3/CityClick.api.ts
  15. +53
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityClick/vue3/CityClick.data.ts
  16. +162
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityClick/vue3/CityClickList.vue
  17. +58
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityClick/vue3/components/CityClickModal.vue
  18. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityConf/controller/CityConfController.java
  19. +5
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityConf/entity/CityConf.java
  20. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityConf/mapper/CityConfMapper.java
  21. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityConf/service/ICityConfService.java
  22. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityConf/service/impl/CityConfServiceImpl.java
  23. +6
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityConf/vue/CityConfList.vue
  24. +5
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityConf/vue/modules/CityConfForm.vue
  25. +10
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityConf/vue3/CityConf.data.ts
  26. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/controller/CityShopController.java
  27. +17
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/entity/CityShop.java
  28. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/mapper/CityShopMapper.java
  29. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/service/ICityShopService.java
  30. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/service/impl/CityShopServiceImpl.java
  31. +25
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/vue/CityShopList.vue
  32. +20
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/vue/modules/CityShopForm.vue
  33. +43
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/vue3/CityShop.data.ts
  34. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShopping/controller/CityShoppingController.java
  35. +5
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShopping/entity/CityShopping.java
  36. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShopping/mapper/CityShoppingMapper.java
  37. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShopping/service/ICityShoppingService.java
  38. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShopping/service/impl/CityShoppingServiceImpl.java
  39. +8
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShopping/vue/CityShoppingList.vue
  40. +5
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShopping/vue/modules/CityShoppingForm.vue
  41. +15
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShopping/vue3/CityShopping.data.ts
  42. +171
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityVipLog/controller/CityVipLogController.java
  43. +78
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityVipLog/entity/CityVipLog.java
  44. +17
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityVipLog/mapper/CityVipLogMapper.java
  45. +5
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityVipLog/mapper/xml/CityVipLogMapper.xml
  46. +14
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityVipLog/service/ICityVipLogService.java
  47. +19
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityVipLog/service/impl/CityVipLogServiceImpl.java
  48. +207
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityVipLog/vue/CityVipLogList.vue
  49. +134
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityVipLog/vue/modules/CityVipLogForm.vue
  50. +84
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityVipLog/vue/modules/CityVipLogModal.Style#Drawer.vue
  51. +60
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityVipLog/vue/modules/CityVipLogModal.vue
  52. +61
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityVipLog/vue3/CityVipLog.api.ts
  53. +83
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityVipLog/vue3/CityVipLog.data.ts
  54. +162
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityVipLog/vue3/CityVipLogList.vue
  55. +58
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityVipLog/vue3/components/CityVipLogModal.vue
  56. +1
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/bean/PageBean.java
  57. +3
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/bean/YaoDuOrderBean.java
  58. +5
    -1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/YaoDuApiService.java
  59. +7
    -1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/YaoDuOrderService.java
  60. +68
    -6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/impl/YaoDuApiServiceImpl.java
  61. +130
    -6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/impl/YaoDuOrderServiceImpl.java
  62. +12
    -2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/yaoduapi/YaoDuApiTokenController.java
  63. +18
    -3
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/yaoduapi/YaoDuOrderController.java
  64. +4
    -2
      jeecg-boot-module-system/src/main/resources/pay_weixin.properties

+ 7
- 96
han-hai-module-pay/src/main/java/org/jeecg/modules/pay/MpWxPayService.java View File

@ -58,13 +58,11 @@ public class MpWxPayService {
request.setDetail(productName); //商品详情
request.setTotalFee(price); //总金额|分计
request.setSpbillCreateIp(clientIp); //终端IP
request.setNotifyUrl("http://h5.xzaiyp.top/massage-api/post/notify");//设置回调路径
request.setNotifyUrl(wxPay.notifyUrl);
request.setProductId(productId); //商品id
if (dev) {
request.setTotalFee(price);
// request.setNotifyUrl(wxPay.notifyUrlDev);
request.setNotifyUrl("http://h5.xzaiyp.top/massage-api/post/notify");
request.setNotifyUrl(wxPay.notifyUrlDev);
}
try {
Object order = wxPayService.unifiedOrder(request);
@ -98,14 +96,12 @@ public class MpWxPayService {
request.setDetail(productName); //商品详情
request.setTotalFee(price); //总金额|分计
request.setSpbillCreateIp(clientIp); //终端IP
// request.setNotifyUrl(wxPay.notifyUrl);//设置回调路径
request.setNotifyUrl("https://tai-testapi.sanhemovie.com/massage-api/post/notify");//设置回调路径
request.setNotifyUrl(wxPay.notifyUrl);//设置回调路径
request.setProductId(productId); //商品id
request.setOpenid(openId); //JSAPI OPENID
if (dev){
request.setTotalFee(price);
// request.setNotifyUrl(wxPay.notifyUrlDev);
request.setNotifyUrl("https://tai-testapi.sanhemovie.com/massage-api/post/notify");//设置回调路径
request.setNotifyUrl(wxPay.notifyUrlDev);
}
try {
Object order = wxPayService.createOrder(request);
@ -130,7 +126,7 @@ public class MpWxPayService {
* @param body
* @return
*/
public Object createOrderGo(String productName, String clientIp,
public Object createOrderVip(String productName, String clientIp,
String productId, Integer price, String orderNo,
String openId, String body){
WxPayUnifiedOrderRequest request = new WxPayUnifiedOrderRequest();
@ -141,12 +137,12 @@ public class MpWxPayService {
request.setDetail(productName); //商品详情
request.setTotalFee(price); //总金额|分计
request.setSpbillCreateIp(clientIp); //终端IP
request.setNotifyUrl(wxPay.notifyUrl);//设置回调路径
request.setNotifyUrl("https://admin.hhlm1688.com/api/order/vipOpenPayNotify");//设置回调路径
request.setProductId(productId); //商品id
request.setOpenid(openId); //JSAPI OPENID
if (dev){
request.setTotalFee(price);
request.setNotifyUrl(wxPay.notifyUrlDev);
request.setNotifyUrl("https://admin.hhlm1688.com/api/order/vipOpenPayNotify");
}
try {
Object order = wxPayService.createOrder(request);
@ -159,47 +155,6 @@ public class MpWxPayService {
/**
* 微信吊起支付 -- 付费小程序
* @param productName
* @param clientIp
* @param productId
* @param price
* @param orderNo
* @param openId
* @param body
* @return
*/
public Object createOrderPay(String productName, String clientIp,
String productId, Integer price, String orderNo,
String openId, String body){
WxPayUnifiedOrderRequest request = new WxPayUnifiedOrderRequest();
request.setDeviceInfo("WEB"); //设备号
request.setTradeType("JSAPI"); //交易类型
request.setBody(productName); //商品描述
request.setOutTradeNo(orderNo); //商户订单号
request.setDetail(productName); //商品详情
request.setTotalFee(price); //总金额|分计
request.setSpbillCreateIp(clientIp); //终端IP
// request.setNotifyUrl(wxPay.notifyUrl);//设置回调路径
request.setNotifyUrl("http://h5.xzaiyp.top/a-notice-api/pay-api/info/notify");//设置回调路径
request.setProductId(productId); //商品id
request.setOpenid(openId); //JSAPI OPENID
if (dev){
request.setTotalFee(price);
// request.setNotifyUrl(wxPay.notifyUrlDev);
request.setNotifyUrl("http://h5.xzaiyp.top/a-notice-api/pay-api/info/notify");//设置回调路径
}
try {
Object order = wxPayService.createOrder(request);
return order;
} catch (WxPayException e) {
e.printStackTrace();
return e.getLocalizedMessage();
}
}
@ -209,50 +164,6 @@ public class MpWxPayService {
/**
* 微信吊起支付
* @param productName
* @param clientIp
* @param productId
* @param price
* @param orderNo
* @param openId
* @param body
* @return
*/
public Object createUserOrder(String productName, String clientIp,
String productId, Integer price, String orderNo,
String openId, String body){
WxPayUnifiedOrderRequest request = new WxPayUnifiedOrderRequest();
request.setDeviceInfo("WEB"); //设备号
request.setTradeType("JSAPI"); //交易类型
request.setBody(productName); //商品描述
request.setOutTradeNo(orderNo); //商户订单号
request.setDetail(productName); //商品详情
request.setTotalFee(price); //总金额|分计
request.setSpbillCreateIp(clientIp); //终端IP
// request.setNotifyUrl(wxPay.notifyUrl);//设置回调路径
request.setNotifyUrl("https://admin.csnaicheng.com/h5-api/api/notify");//设置回调路径
request.setProductId(productId); //商品id
request.setOpenid(openId); //JSAPI OPENID
if (dev){
request.setTotalFee(price);
// request.setNotifyUrl(wxPay.notifyUrlDev);
request.setNotifyUrl("https://admin.csnaicheng.com/h5-api/api/notify");//设置回调路径
}
try {
Object order = wxPayService.createOrder(request);
return order;
} catch (WxPayException e) {
e.printStackTrace();
return e.getLocalizedMessage();
}
}


+ 8
- 0
han-hai-module-pay/src/main/java/org/jeecg/modules/pay/config/WxPay.java View File

@ -56,7 +56,15 @@ public class WxPay {
*/
public String notifyOrderUrlDev;
/**
* 回调地址
*/
public String notifyVipUrl;
/**
* 回调地址dev
*/
public String notifyVipUrlDev;


+ 8
- 14
han-hai-module-pay/src/main/resources/pay_weixin.properties View File

@ -1,14 +1,8 @@
#pay.mchId=1636874683
#pay.appId=wx6fb4a17b28186d58
#pay.mchKey=GVIP1008611ABCDEFGGGGJKHLOSJFLGK
#pay.keyPath=classpath:apiclient_cert.p12
#pay.notifyUrl=https://jobadmin.java996.icu/job-dev/job/pay/notify
#pay.notifyUrlDev=https://jobadmin.java996.icu/job-dev/job/pay/notify
#pay.mchId=1673516176
#pay.appId=wxa4d29e67e8a58d38
#pay.mchKey=GVIP1008611ABCDEFGGGGJKHLOSJFLGK
#pay.keyPath=
#pay.notifyUrl=https://admin.hhlm1688.com/api/order/payNotify
#pay.notifyUrlDev=
pay.mchId=1673516176
pay.appId=wxa4d29e67e8a58d38
pay.mchKey=GVIP1008611ABCDEFGGGGJKHLOSJFLGK
pay.keyPath=
pay.notifyUrl=http://h5.xzaiyp.top/api/order/payNotify
pay.notifyUrlDev=http://h5.xzaiyp.top/api/order/payNotify
pay.notifyVipUrl=http://h5.xzaiyp.top/api/order/vipPayNotify
pay.notifyUrlVipDev=http://h5.xzaiyp.top/api/order/vipPayNotify

+ 171
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityClick/controller/CityClickController.java View File

@ -0,0 +1,171 @@
package org.jeecg.modules.cityClick.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.cityClick.entity.CityClick;
import org.jeecg.modules.cityClick.service.ICityClickService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 点击联系电话记录
* @Author: jeecg-boot
* @Date: 2024-11-26
* @Version: V1.0
*/
@Api(tags="点击联系电话记录")
@RestController
@RequestMapping("/cityClick/cityClick")
@Slf4j
public class CityClickController extends JeecgController<CityClick, ICityClickService> {
@Autowired
private ICityClickService cityClickService;
/**
* 分页列表查询
*
* @param cityClick
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "点击联系电话记录-分页列表查询")
@ApiOperation(value="点击联系电话记录-分页列表查询", notes="点击联系电话记录-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<CityClick>> queryPageList(CityClick cityClick,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<CityClick> queryWrapper = QueryGenerator.initQueryWrapper(cityClick, req.getParameterMap());
Page<CityClick> page = new Page<CityClick>(pageNo, pageSize);
IPage<CityClick> pageList = cityClickService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param cityClick
* @return
*/
@AutoLog(value = "点击联系电话记录-添加")
@ApiOperation(value="点击联系电话记录-添加", notes="点击联系电话记录-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody CityClick cityClick) {
cityClickService.save(cityClick);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param cityClick
* @return
*/
@AutoLog(value = "点击联系电话记录-编辑")
@ApiOperation(value="点击联系电话记录-编辑", notes="点击联系电话记录-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody CityClick cityClick) {
cityClickService.updateById(cityClick);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "点击联系电话记录-通过id删除")
@ApiOperation(value="点击联系电话记录-通过id删除", notes="点击联系电话记录-通过id删除")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
cityClickService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "点击联系电话记录-批量删除")
@ApiOperation(value="点击联系电话记录-批量删除", notes="点击联系电话记录-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.cityClickService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "点击联系电话记录-通过id查询")
@ApiOperation(value="点击联系电话记录-通过id查询", notes="点击联系电话记录-通过id查询")
@GetMapping(value = "/queryById")
public Result<CityClick> queryById(@RequestParam(name="id",required=true) String id) {
CityClick cityClick = cityClickService.getById(id);
if(cityClick==null) {
return Result.error("未找到对应数据");
}
return Result.OK(cityClick);
}
/**
* 导出excel
*
* @param request
* @param cityClick
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, CityClick cityClick) {
return super.exportXls(request, cityClick, CityClick.class, "点击联系电话记录");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, CityClick.class);
}
}

+ 66
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityClick/entity/CityClick.java View File

@ -0,0 +1,66 @@
package org.jeecg.modules.cityClick.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 点击联系电话记录
* @Author: jeecg-boot
* @Date: 2024-11-26
* @Version: V1.0
*/
@Data
@TableName("city_click")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="city_click对象", description="点击联系电话记录")
public class CityClick implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建日期*/
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**用户*/
@Excel(name = "用户", width = 15)
@ApiModelProperty(value = "用户")
private java.lang.String userId;
/**类型*/
@Excel(name = "类型", width = 15)
@ApiModelProperty(value = "类型")
private java.lang.String type;
/**溯源*/
@Excel(name = "溯源", width = 15)
@ApiModelProperty(value = "溯源")
private java.lang.String orderId;
/**备注*/
@Excel(name = "备注", width = 15)
@ApiModelProperty(value = "备注")
private java.lang.String title;
}

+ 17
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityClick/mapper/CityClickMapper.java View File

@ -0,0 +1,17 @@
package org.jeecg.modules.cityClick.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.cityClick.entity.CityClick;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 点击联系电话记录
* @Author: jeecg-boot
* @Date: 2024-11-26
* @Version: V1.0
*/
public interface CityClickMapper extends BaseMapper<CityClick> {
}

+ 5
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityClick/mapper/xml/CityClickMapper.xml View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.cityClick.mapper.CityClickMapper">
</mapper>

+ 14
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityClick/service/ICityClickService.java View File

@ -0,0 +1,14 @@
package org.jeecg.modules.cityClick.service;
import org.jeecg.modules.cityClick.entity.CityClick;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 点击联系电话记录
* @Author: jeecg-boot
* @Date: 2024-11-26
* @Version: V1.0
*/
public interface ICityClickService extends IService<CityClick> {
}

+ 19
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityClick/service/impl/CityClickServiceImpl.java View File

@ -0,0 +1,19 @@
package org.jeecg.modules.cityClick.service.impl;
import org.jeecg.modules.cityClick.entity.CityClick;
import org.jeecg.modules.cityClick.mapper.CityClickMapper;
import org.jeecg.modules.cityClick.service.ICityClickService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 点击联系电话记录
* @Author: jeecg-boot
* @Date: 2024-11-26
* @Version: V1.0
*/
@Service
public class CityClickServiceImpl extends ServiceImpl<CityClickMapper, CityClick> implements ICityClickService {
}

+ 189
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityClick/vue/CityClickList.vue View File

@ -0,0 +1,189 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('点击联系电话记录')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<city-click-modal ref="modalForm" @ok="modalFormOk"></city-click-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import CityClickModal from './modules/CityClickModal'
export default {
name: 'CityClickList',
mixins:[JeecgListMixin, mixinDevice],
components: {
CityClickModal
},
data () {
return {
description: '点击联系电话记录管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'用户',
align:"center",
dataIndex: 'userId'
},
{
title:'类型',
align:"center",
dataIndex: 'type'
},
{
title:'溯源',
align:"center",
dataIndex: 'orderId'
},
{
title:'备注',
align:"center",
dataIndex: 'title'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/cityClick/cityClick/list",
delete: "/cityClick/cityClick/delete",
deleteBatch: "/cityClick/cityClick/deleteBatch",
exportXlsUrl: "/cityClick/cityClick/exportXls",
importExcelUrl: "cityClick/cityClick/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'userId',text:'用户',dictCode:''})
fieldList.push({type:'string',value:'type',text:'类型',dictCode:''})
fieldList.push({type:'string',value:'orderId',text:'溯源',dictCode:''})
fieldList.push({type:'string',value:'title',text:'备注',dictCode:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 119
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityClick/vue/modules/CityClickForm.vue View File

@ -0,0 +1,119 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">
<a-input v-model="model.userId" placeholder="请输入用户" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">
<a-input v-model="model.type" placeholder="请输入类型" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="溯源" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderId">
<a-input v-model="model.orderId" placeholder="请输入溯源" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="title">
<a-input v-model="model.title" placeholder="请输入备注" ></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'CityClickForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/cityClick/cityClick/add",
edit: "/cityClick/cityClick/edit",
queryById: "/cityClick/cityClick/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

+ 84
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityClick/vue/modules/CityClickModal.Style#Drawer.vue View File

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<city-click-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></city-click-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import CityClickForm from './CityClickForm'
export default {
name: 'CityClickModal',
components: {
CityClickForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

+ 60
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityClick/vue/modules/CityClickModal.vue View File

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<city-click-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></city-click-form>
</j-modal>
</template>
<script>
import CityClickForm from './CityClickForm'
export default {
name: 'CityClickModal',
components: {
CityClickForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

+ 61
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityClick/vue3/CityClick.api.ts View File

@ -0,0 +1,61 @@
import {defHttp} from '/@/utils/http/axios';
import {Modal} from 'ant-design-vue';
enum Api {
list = '/cityClick/cityClick/list',
save='/cityClick/cityClick/add',
edit='/cityClick/cityClick/edit',
deleteOne = '/cityClick/cityClick/delete',
deleteBatch = '/cityClick/cityClick/deleteBatch',
importExcel = '/cityClick/cityClick/importExcel',
exportXls = '/cityClick/cityClick/exportXls',
}
/**
* api
* @param params
*/
export const getExportUrl = Api.exportXls;
/**
* api
*/
export const getImportUrl = Api.importExcel;
/**
*
* @param params
*/
export const list = (params) =>
defHttp.get({url: Api.list, params});
/**
*
*/
export const deleteOne = (params,handleSuccess) => {
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
/**
*
* @param params
*/
export const batchDelete = (params, handleSuccess) => {
Modal.confirm({
title: '确认删除',
content: '是否删除选中数据',
okText: '确认',
cancelText: '取消',
onOk: () => {
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
});
}
/**
*
* @param params
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({url: url, params});
}

+ 53
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityClick/vue3/CityClick.data.ts View File

@ -0,0 +1,53 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '用户',
align:"center",
dataIndex: 'userId'
},
{
title: '类型',
align:"center",
dataIndex: 'type'
},
{
title: '溯源',
align:"center",
dataIndex: 'orderId'
},
{
title: '备注',
align:"center",
dataIndex: 'title'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '用户',
field: 'userId',
component: 'Input',
},
{
label: '类型',
field: 'type',
component: 'Input',
},
{
label: '溯源',
field: 'orderId',
component: 'Input',
},
{
label: '备注',
field: 'title',
component: 'Input',
},
];

+ 162
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityClick/vue3/CityClickList.vue View File

@ -0,0 +1,162 @@
<template>
<div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<template #tableTitle>
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
<a-dropdown v-if="checkedKeys.length > 0">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="batchHandleDelete">
<Icon icon="ant-design:delete-outlined"></Icon>
删除
</a-menu-item>
</a-menu>
</template>
<a-button>批量操作
<Icon icon="mdi:chevron-down"></Icon>
</a-button>
</a-dropdown>
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
</template>
<!--字段回显插槽-->
<template #htmlSlot="{text}">
<div v-html="text"></div>
</template>
<template #fileSlot="{text}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
</template>
</BasicTable>
<!-- 表单区域 -->
<CityClickModal @register="registerModal" @success="handleSuccess"></CityClickModal>
</div>
</template>
<script lang="ts" name="cityClick-cityClick" setup>
import {ref, computed, unref} from 'vue';
import {BasicTable, useTable, TableAction} from '/@/components/Table';
import {useModal} from '/@/components/Modal';
import { useListPage } from '/@/hooks/system/useListPage'
import CityClickModal from './components/CityClickModal.vue'
import {columns, searchFormSchema} from './cityClick.data';
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './cityClick.api';
const checkedKeys = ref<Array<string | number>>([]);
//model
const [registerModal, {openModal}] = useModal();
//table
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
tableProps:{
title: '点击联系电话记录',
api: list,
columns,
canResize:false,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
autoSubmitOnEnter:true,
showAdvancedButton:true,
fieldMapToTime: [
],
},
actionColumn: {
width: 120,
},
},
exportConfig: {
name:"点击联系电话记录",
url: getExportUrl,
},
importConfig: {
url: getImportUrl
},
})
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
/**
* 新增事件
*/
function handleAdd() {
openModal(true, {
isUpdate: false,
showFooter: true,
});
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: true,
});
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: false,
});
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({id: record.id}, reload);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ids: checkedKeys.value}, reload);
}
/**
* 成功回调
*/
function handleSuccess() {
reload();
}
/**
* 操作栏
*/
function getTableAction(record){
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
}
]
}
/**
* 下拉操作栏
*/
function getDropDownAction(record){
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
}
]
}
</script>
<style scoped>
</style>

+ 58
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityClick/vue3/components/CityClickModal.vue View File

@ -0,0 +1,58 @@
<template>
<BasicModal v-bind="$attrs" @register="registerModal" :title="title" @ok="handleSubmit">
<BasicForm @register="registerForm"/>
</BasicModal>
</template>
<script lang="ts" setup>
import {ref, computed, unref} from 'vue';
import {BasicModal, useModalInner} from '/@/components/Modal';
import {BasicForm, useForm} from '/@/components/Form/index';
import {formSchema} from '../cityClick.data';
import {saveOrUpdate} from '../cityClick.api';
// Emits
const emit = defineEmits(['register','success']);
const isUpdate = ref(true);
//
const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({
labelWidth: 150,
schemas: formSchema,
showActionButtonGroup: false,
});
//
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
//
await resetFields();
setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter});
isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) {
//
await setFieldsValue({
...data.record,
});
}
//
setProps({ disabled: !data?.showFooter })
});
//
const title = computed(() => (!unref(isUpdate) ? '新增' : '编辑'));
//
async function handleSubmit(v) {
try {
let values = await validate();
setModalProps({confirmLoading: true});
//
await saveOrUpdate(values, isUpdate.value);
//
closeModal();
//
emit('success');
} finally {
setModalProps({confirmLoading: false});
}
}
</script>
<style lang="less" scoped>
</style>

+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityConf/controller/CityConfController.java View File

@ -39,7 +39,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 配置列表
* @Author: jeecg-boot
* @Date: 2024-10-26
* @Date: 2024-11-26
* @Version: V1.0
*/
@Api(tags="配置列表")


+ 5
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityConf/entity/CityConf.java View File

@ -20,7 +20,7 @@ import lombok.experimental.Accessors;
/**
* @Description: 配置列表
* @Author: jeecg-boot
* @Date: 2024-10-26
* @Date: 2024-11-26
* @Version: V1.0
*/
@Data
@ -67,4 +67,8 @@ public class CityConf implements Serializable {
@Excel(name = "详情", width = 15)
@ApiModelProperty(value = "详情")
private java.lang.String keyDetails;
/**佣金*/
@Excel(name = "佣金", width = 15)
@ApiModelProperty(value = "佣金")
private java.math.BigDecimal keyMoney;
}

+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityConf/mapper/CityConfMapper.java View File

@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 配置列表
* @Author: jeecg-boot
* @Date: 2024-10-26
* @Date: 2024-11-26
* @Version: V1.0
*/
public interface CityConfMapper extends BaseMapper<CityConf> {


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityConf/service/ICityConfService.java View File

@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 配置列表
* @Author: jeecg-boot
* @Date: 2024-10-26
* @Date: 2024-11-26
* @Version: V1.0
*/
public interface ICityConfService extends IService<CityConf> {


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityConf/service/impl/CityConfServiceImpl.java View File

@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 配置列表
* @Author: jeecg-boot
* @Date: 2024-10-26
* @Date: 2024-11-26
* @Version: V1.0
*/
@Service


+ 6
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityConf/vue/CityConfList.vue View File

@ -142,6 +142,11 @@
dataIndex: 'keyImage',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'佣金',
align:"center",
dataIndex: 'keyMoney'
},
{
title: '操作',
dataIndex: 'action',
@ -181,6 +186,7 @@
fieldList.push({type:'string',value:'keyValue',text:'内容',dictCode:''})
fieldList.push({type:'Text',value:'keyImage',text:'图片',dictCode:''})
fieldList.push({type:'Text',value:'keyDetails',text:'详情',dictCode:''})
fieldList.push({type:'BigDecimal',value:'keyMoney',text:'佣金',dictCode:''})
this.superFieldList = fieldList
}
}


+ 5
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityConf/vue/modules/CityConfForm.vue View File

@ -28,6 +28,11 @@
<j-editor v-model="model.keyDetails" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="佣金" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="keyMoney">
<a-input-number v-model="model.keyMoney" placeholder="请输入佣金" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>


+ 10
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityConf/vue3/CityConf.data.ts View File

@ -25,6 +25,11 @@ export const columns: BasicColumn[] = [
dataIndex: 'keyImage',
customRender:render.renderAvatar,
},
{
title: '佣金',
align:"center",
dataIndex: 'keyMoney'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
@ -58,4 +63,9 @@ export const formSchema: FormSchema[] = [
field: 'keyDetails',
component: 'JCodeEditor', //TODO String后缀暂未添加
},
{
label: '佣金',
field: 'keyMoney',
component: 'InputNumber',
},
];

+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/controller/CityShopController.java View File

@ -39,7 +39,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 商铺信息表
* @Author: jeecg-boot
* @Date: 2024-11-25
* @Date: 2024-11-26
* @Version: V1.0
*/
@Api(tags="商铺信息表")


+ 17
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/entity/CityShop.java View File

@ -20,7 +20,7 @@ import lombok.experimental.Accessors;
/**
* @Description: 商铺信息表
* @Author: jeecg-boot
* @Date: 2024-11-25
* @Date: 2024-11-26
* @Version: V1.0
*/
@Data
@ -107,4 +107,20 @@ public class CityShop implements Serializable {
@Excel(name = "是否营业", width = 15)
@ApiModelProperty(value = "是否营业")
private java.lang.String isOpen;
/**关联店主*/
@Excel(name = "关联店主", width = 15)
@ApiModelProperty(value = "关联店主")
private java.lang.String shopUser;
/**店主姓名*/
@Excel(name = "店主姓名", width = 15)
@ApiModelProperty(value = "店主姓名")
private java.lang.String shopName;
/**店主电话*/
@Excel(name = "店主电话", width = 15)
@ApiModelProperty(value = "店主电话")
private java.lang.String shopPhone;
/**店主图片*/
@Excel(name = "店主图片", width = 15)
@ApiModelProperty(value = "店主图片")
private java.lang.String shopImage;
}

+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/mapper/CityShopMapper.java View File

@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 商铺信息表
* @Author: jeecg-boot
* @Date: 2024-11-25
* @Date: 2024-11-26
* @Version: V1.0
*/
public interface CityShopMapper extends BaseMapper<CityShop> {


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/service/ICityShopService.java View File

@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 商铺信息表
* @Author: jeecg-boot
* @Date: 2024-11-25
* @Date: 2024-11-26
* @Version: V1.0
*/
public interface ICityShopService extends IService<CityShop> {


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/service/impl/CityShopServiceImpl.java View File

@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 商铺信息表
* @Author: jeecg-boot
* @Date: 2024-11-25
* @Date: 2024-11-26
* @Version: V1.0
*/
@Service


+ 25
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/vue/CityShopList.vue View File

@ -225,6 +225,27 @@
align:"center",
dataIndex: 'isOpen'
},
{
title:'关联店主',
align:"center",
dataIndex: 'shopUser'
},
{
title:'店主姓名',
align:"center",
dataIndex: 'shopName'
},
{
title:'店主电话',
align:"center",
dataIndex: 'shopPhone'
},
{
title:'店主图片',
align:"center",
dataIndex: 'shopImage',
scopedSlots: {customRender: 'imgSlot'}
},
{
title: '操作',
dataIndex: 'action',
@ -275,6 +296,10 @@
fieldList.push({type:'string',value:'longitude',text:'经度',dictCode:''})
fieldList.push({type:'string',value:'latitude',text:'纬度',dictCode:''})
fieldList.push({type:'string',value:'isOpen',text:'是否营业',dictCode:''})
fieldList.push({type:'string',value:'shopUser',text:'关联店主',dictCode:''})
fieldList.push({type:'string',value:'shopName',text:'店主姓名',dictCode:''})
fieldList.push({type:'string',value:'shopPhone',text:'店主电话',dictCode:''})
fieldList.push({type:'Text',value:'shopImage',text:'店主图片',dictCode:''})
this.superFieldList = fieldList
}
}


+ 20
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/vue/modules/CityShopForm.vue View File

@ -78,6 +78,26 @@
<a-input v-model="model.isOpen" placeholder="请输入是否营业" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="关联店主" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shopUser">
<a-input v-model="model.shopUser" placeholder="请输入关联店主" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="店主姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shopName">
<a-input v-model="model.shopName" placeholder="请输入店主姓名" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="店主电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shopPhone">
<a-input v-model="model.shopPhone" placeholder="请输入店主电话" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="店主图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shopImage">
<j-image-upload isMultiple v-model="model.shopImage" ></j-image-upload>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>


+ 43
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/vue3/CityShop.data.ts View File

@ -88,6 +88,27 @@ export const columns: BasicColumn[] = [
align:"center",
dataIndex: 'isOpen'
},
{
title: '关联店主',
align:"center",
dataIndex: 'shopUser'
},
{
title: '店主姓名',
align:"center",
dataIndex: 'shopName'
},
{
title: '店主电话',
align:"center",
dataIndex: 'shopPhone'
},
{
title: '店主图片',
align:"center",
dataIndex: 'shopImage',
customRender:render.renderAvatar,
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
@ -187,4 +208,26 @@ export const formSchema: FormSchema[] = [
field: 'isOpen',
component: 'Input',
},
{
label: '关联店主',
field: 'shopUser',
component: 'Input',
},
{
label: '店主姓名',
field: 'shopName',
component: 'Input',
},
{
label: '店主电话',
field: 'shopPhone',
component: 'Input',
},
{
label: '店主图片',
field: 'shopImage',
component: 'JImageUpload',
componentProps:{
},
},
];

+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShopping/controller/CityShoppingController.java View File

@ -39,7 +39,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 商城表
* @Author: jeecg-boot
* @Date: 2024-11-25
* @Date: 2024-11-27
* @Version: V1.0
*/
@Api(tags="商城表")


+ 5
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShopping/entity/CityShopping.java View File

@ -20,7 +20,7 @@ import lombok.experimental.Accessors;
/**
* @Description: 商城表
* @Author: jeecg-boot
* @Date: 2024-11-25
* @Date: 2024-11-27
* @Version: V1.0
*/
@Data
@ -104,4 +104,8 @@ public class CityShopping implements Serializable {
@Dict(dicCode = "class_name_no")
@ApiModelProperty(value = "商品类型")
private java.lang.Integer className;
/**是否展示在主页*/
@Excel(name = "是否展示在主页", width = 15)
@ApiModelProperty(value = "是否展示在主页")
private java.lang.String isIndex;
}

+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShopping/mapper/CityShoppingMapper.java View File

@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 商城表
* @Author: jeecg-boot
* @Date: 2024-11-25
* @Date: 2024-11-27
* @Version: V1.0
*/
public interface CityShoppingMapper extends BaseMapper<CityShopping> {


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShopping/service/ICityShoppingService.java View File

@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 商城表
* @Author: jeecg-boot
* @Date: 2024-11-25
* @Date: 2024-11-27
* @Version: V1.0
*/
public interface ICityShoppingService extends IService<CityShopping> {


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShopping/service/impl/CityShoppingServiceImpl.java View File

@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 商城表
* @Author: jeecg-boot
* @Date: 2024-11-25
* @Date: 2024-11-27
* @Version: V1.0
*/
@Service


+ 8
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShopping/vue/CityShoppingList.vue View File

@ -217,6 +217,12 @@
align:"center",
dataIndex: 'className_dictText'
},
{
title:'是否展示在主页',
align:"center",
dataIndex: 'isIndex',
customRender: (text) => (text ? filterMultiDictText(this.dictOptions['isIndex'], text) : ''),
},
{
title: '操作',
dataIndex: 'action',
@ -240,6 +246,7 @@
},
created() {
this.$set(this.dictOptions, 'isOpen', [{text:'是',value:'Y'},{text:'否',value:'N'}])
this.$set(this.dictOptions, 'isIndex', [{text:'是',value:'Y'},{text:'否',value:'N'}])
this.getSuperFieldList();
},
computed: {
@ -267,6 +274,7 @@
fieldList.push({type:'switch',value:'isOpen',text:'是否上架'})
fieldList.push({type:'sel_search',value:'shopId',text:'关联店铺',dictTable:"city_shop", dictText:'title', dictCode:'id'})
fieldList.push({type:'int',value:'className',text:'商品类型',dictCode:'class_name_no'})
fieldList.push({type:'switch',value:'isIndex',text:'是否展示在主页'})
this.superFieldList = fieldList
}
}


+ 5
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShopping/vue/modules/CityShoppingForm.vue View File

@ -68,6 +68,11 @@
<j-dict-select-tag type="list" v-model="model.className" dictCode="class_name_no" placeholder="请选择商品类型" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="是否展示在主页" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isIndex">
<j-switch v-model="model.isIndex" ></j-switch>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>


+ 15
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShopping/vue3/CityShopping.data.ts View File

@ -86,6 +86,14 @@ export const columns: BasicColumn[] = [
align:"center",
dataIndex: 'className_dictText'
},
{
title: '是否展示在主页',
align:"center",
dataIndex: 'isIndex',
customRender:({text}) => {
return render.renderSwitch(text, [{text:'是',value:'Y'},{text:'否',value:'N'}])
},
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
@ -178,4 +186,11 @@ export const formSchema: FormSchema[] = [
dictCode:"class_name_no"
},
},
{
label: '是否展示在主页',
field: 'isIndex',
component: 'JSwitch',
componentProps:{
},
},
];

+ 171
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityVipLog/controller/CityVipLogController.java View File

@ -0,0 +1,171 @@
package org.jeecg.modules.cityVipLog.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.cityVipLog.entity.CityVipLog;
import org.jeecg.modules.cityVipLog.service.ICityVipLogService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 开通记录
* @Author: jeecg-boot
* @Date: 2024-11-26
* @Version: V1.0
*/
@Api(tags="开通记录")
@RestController
@RequestMapping("/cityVipLog/cityVipLog")
@Slf4j
public class CityVipLogController extends JeecgController<CityVipLog, ICityVipLogService> {
@Autowired
private ICityVipLogService cityVipLogService;
/**
* 分页列表查询
*
* @param cityVipLog
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "开通记录-分页列表查询")
@ApiOperation(value="开通记录-分页列表查询", notes="开通记录-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<CityVipLog>> queryPageList(CityVipLog cityVipLog,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<CityVipLog> queryWrapper = QueryGenerator.initQueryWrapper(cityVipLog, req.getParameterMap());
Page<CityVipLog> page = new Page<CityVipLog>(pageNo, pageSize);
IPage<CityVipLog> pageList = cityVipLogService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param cityVipLog
* @return
*/
@AutoLog(value = "开通记录-添加")
@ApiOperation(value="开通记录-添加", notes="开通记录-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody CityVipLog cityVipLog) {
cityVipLogService.save(cityVipLog);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param cityVipLog
* @return
*/
@AutoLog(value = "开通记录-编辑")
@ApiOperation(value="开通记录-编辑", notes="开通记录-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody CityVipLog cityVipLog) {
cityVipLogService.updateById(cityVipLog);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "开通记录-通过id删除")
@ApiOperation(value="开通记录-通过id删除", notes="开通记录-通过id删除")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
cityVipLogService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "开通记录-批量删除")
@ApiOperation(value="开通记录-批量删除", notes="开通记录-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.cityVipLogService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "开通记录-通过id查询")
@ApiOperation(value="开通记录-通过id查询", notes="开通记录-通过id查询")
@GetMapping(value = "/queryById")
public Result<CityVipLog> queryById(@RequestParam(name="id",required=true) String id) {
CityVipLog cityVipLog = cityVipLogService.getById(id);
if(cityVipLog==null) {
return Result.error("未找到对应数据");
}
return Result.OK(cityVipLog);
}
/**
* 导出excel
*
* @param request
* @param cityVipLog
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, CityVipLog cityVipLog) {
return super.exportXls(request, cityVipLog, CityVipLog.class, "开通记录");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, CityVipLog.class);
}
}

+ 78
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityVipLog/entity/CityVipLog.java View File

@ -0,0 +1,78 @@
package org.jeecg.modules.cityVipLog.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 开通记录
* @Author: jeecg-boot
* @Date: 2024-11-26
* @Version: V1.0
*/
@Data
@TableName("city_vip_log")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="city_vip_log对象", description="开通记录")
public class CityVipLog implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建日期*/
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**用户*/
@Excel(name = "用户", width = 15)
@ApiModelProperty(value = "用户")
private java.lang.String userId;
/**开通时间*/
@Excel(name = "开通时间", width = 15)
@ApiModelProperty(value = "开通时间")
private java.util.Date startTime;
/**结束时间*/
@Excel(name = "结束时间", width = 15)
@ApiModelProperty(value = "结束时间")
private java.util.Date endTime;
/**类型*/
@Excel(name = "类型", width = 15)
@ApiModelProperty(value = "类型")
private java.lang.Integer type;
/**是否支付*/
@Excel(name = "是否支付", width = 15)
@ApiModelProperty(value = "是否支付")
private java.lang.String isPay;
/**产生佣金*/
@Excel(name = "产生佣金", width = 15)
@ApiModelProperty(value = "产生佣金")
private java.math.BigDecimal giveMoney;
/**佣金获得*/
@Excel(name = "佣金获得", width = 15)
@ApiModelProperty(value = "佣金获得")
private java.lang.String giveUser;
}

+ 17
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityVipLog/mapper/CityVipLogMapper.java View File

@ -0,0 +1,17 @@
package org.jeecg.modules.cityVipLog.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.cityVipLog.entity.CityVipLog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 开通记录
* @Author: jeecg-boot
* @Date: 2024-11-26
* @Version: V1.0
*/
public interface CityVipLogMapper extends BaseMapper<CityVipLog> {
}

+ 5
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityVipLog/mapper/xml/CityVipLogMapper.xml View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.cityVipLog.mapper.CityVipLogMapper">
</mapper>

+ 14
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityVipLog/service/ICityVipLogService.java View File

@ -0,0 +1,14 @@
package org.jeecg.modules.cityVipLog.service;
import org.jeecg.modules.cityVipLog.entity.CityVipLog;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 开通记录
* @Author: jeecg-boot
* @Date: 2024-11-26
* @Version: V1.0
*/
public interface ICityVipLogService extends IService<CityVipLog> {
}

+ 19
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityVipLog/service/impl/CityVipLogServiceImpl.java View File

@ -0,0 +1,19 @@
package org.jeecg.modules.cityVipLog.service.impl;
import org.jeecg.modules.cityVipLog.entity.CityVipLog;
import org.jeecg.modules.cityVipLog.mapper.CityVipLogMapper;
import org.jeecg.modules.cityVipLog.service.ICityVipLogService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 开通记录
* @Author: jeecg-boot
* @Date: 2024-11-26
* @Version: V1.0
*/
@Service
public class CityVipLogServiceImpl extends ServiceImpl<CityVipLogMapper, CityVipLog> implements ICityVipLogService {
}

+ 207
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityVipLog/vue/CityVipLogList.vue View File

@ -0,0 +1,207 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('开通记录')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<city-vip-log-modal ref="modalForm" @ok="modalFormOk"></city-vip-log-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import CityVipLogModal from './modules/CityVipLogModal'
export default {
name: 'CityVipLogList',
mixins:[JeecgListMixin, mixinDevice],
components: {
CityVipLogModal
},
data () {
return {
description: '开通记录管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'用户',
align:"center",
dataIndex: 'userId'
},
{
title:'开通时间',
align:"center",
dataIndex: 'startTime'
},
{
title:'结束时间',
align:"center",
dataIndex: 'endTime'
},
{
title:'类型',
align:"center",
dataIndex: 'type'
},
{
title:'是否支付',
align:"center",
dataIndex: 'isPay'
},
{
title:'产生佣金',
align:"center",
dataIndex: 'giveMoney'
},
{
title:'佣金获得',
align:"center",
dataIndex: 'giveUser'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/cityVipLog/cityVipLog/list",
delete: "/cityVipLog/cityVipLog/delete",
deleteBatch: "/cityVipLog/cityVipLog/deleteBatch",
exportXlsUrl: "/cityVipLog/cityVipLog/exportXls",
importExcelUrl: "cityVipLog/cityVipLog/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'userId',text:'用户',dictCode:''})
fieldList.push({type:'datetime',value:'startTime',text:'开通时间'})
fieldList.push({type:'datetime',value:'endTime',text:'结束时间'})
fieldList.push({type:'int',value:'type',text:'类型',dictCode:''})
fieldList.push({type:'string',value:'isPay',text:'是否支付',dictCode:''})
fieldList.push({type:'BigDecimal',value:'giveMoney',text:'产生佣金',dictCode:''})
fieldList.push({type:'string',value:'giveUser',text:'佣金获得',dictCode:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 134
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityVipLog/vue/modules/CityVipLogForm.vue View File

@ -0,0 +1,134 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">
<a-input v-model="model.userId" placeholder="请输入用户" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="开通时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startTime">
<j-date placeholder="请选择开通时间" v-model="model.startTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="结束时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="endTime">
<j-date placeholder="请选择结束时间" v-model="model.endTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">
<a-input-number v-model="model.type" placeholder="请输入类型" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="是否支付" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isPay">
<a-input v-model="model.isPay" placeholder="请输入是否支付" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="产生佣金" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="giveMoney">
<a-input-number v-model="model.giveMoney" placeholder="请输入产生佣金" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="佣金获得" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="giveUser">
<a-input v-model="model.giveUser" placeholder="请输入佣金获得" ></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'CityVipLogForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/cityVipLog/cityVipLog/add",
edit: "/cityVipLog/cityVipLog/edit",
queryById: "/cityVipLog/cityVipLog/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

+ 84
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityVipLog/vue/modules/CityVipLogModal.Style#Drawer.vue View File

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<city-vip-log-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></city-vip-log-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import CityVipLogForm from './CityVipLogForm'
export default {
name: 'CityVipLogModal',
components: {
CityVipLogForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

+ 60
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityVipLog/vue/modules/CityVipLogModal.vue View File

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<city-vip-log-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></city-vip-log-form>
</j-modal>
</template>
<script>
import CityVipLogForm from './CityVipLogForm'
export default {
name: 'CityVipLogModal',
components: {
CityVipLogForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

+ 61
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityVipLog/vue3/CityVipLog.api.ts View File

@ -0,0 +1,61 @@
import {defHttp} from '/@/utils/http/axios';
import {Modal} from 'ant-design-vue';
enum Api {
list = '/cityVipLog/cityVipLog/list',
save='/cityVipLog/cityVipLog/add',
edit='/cityVipLog/cityVipLog/edit',
deleteOne = '/cityVipLog/cityVipLog/delete',
deleteBatch = '/cityVipLog/cityVipLog/deleteBatch',
importExcel = '/cityVipLog/cityVipLog/importExcel',
exportXls = '/cityVipLog/cityVipLog/exportXls',
}
/**
* api
* @param params
*/
export const getExportUrl = Api.exportXls;
/**
* api
*/
export const getImportUrl = Api.importExcel;
/**
*
* @param params
*/
export const list = (params) =>
defHttp.get({url: Api.list, params});
/**
*
*/
export const deleteOne = (params,handleSuccess) => {
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
/**
*
* @param params
*/
export const batchDelete = (params, handleSuccess) => {
Modal.confirm({
title: '确认删除',
content: '是否删除选中数据',
okText: '确认',
cancelText: '取消',
onOk: () => {
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
});
}
/**
*
* @param params
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({url: url, params});
}

+ 83
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityVipLog/vue3/CityVipLog.data.ts View File

@ -0,0 +1,83 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '用户',
align:"center",
dataIndex: 'userId'
},
{
title: '开通时间',
align:"center",
dataIndex: 'startTime'
},
{
title: '结束时间',
align:"center",
dataIndex: 'endTime'
},
{
title: '类型',
align:"center",
dataIndex: 'type'
},
{
title: '是否支付',
align:"center",
dataIndex: 'isPay'
},
{
title: '产生佣金',
align:"center",
dataIndex: 'giveMoney'
},
{
title: '佣金获得',
align:"center",
dataIndex: 'giveUser'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '用户',
field: 'userId',
component: 'Input',
},
{
label: '开通时间',
field: 'startTime',
component: 'Input',
},
{
label: '结束时间',
field: 'endTime',
component: 'Input',
},
{
label: '类型',
field: 'type',
component: 'InputNumber',
},
{
label: '是否支付',
field: 'isPay',
component: 'Input',
},
{
label: '产生佣金',
field: 'giveMoney',
component: 'InputNumber',
},
{
label: '佣金获得',
field: 'giveUser',
component: 'Input',
},
];

+ 162
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityVipLog/vue3/CityVipLogList.vue View File

@ -0,0 +1,162 @@
<template>
<div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<template #tableTitle>
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
<a-dropdown v-if="checkedKeys.length > 0">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="batchHandleDelete">
<Icon icon="ant-design:delete-outlined"></Icon>
删除
</a-menu-item>
</a-menu>
</template>
<a-button>批量操作
<Icon icon="mdi:chevron-down"></Icon>
</a-button>
</a-dropdown>
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
</template>
<!--字段回显插槽-->
<template #htmlSlot="{text}">
<div v-html="text"></div>
</template>
<template #fileSlot="{text}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
</template>
</BasicTable>
<!-- 表单区域 -->
<CityVipLogModal @register="registerModal" @success="handleSuccess"></CityVipLogModal>
</div>
</template>
<script lang="ts" name="cityVipLog-cityVipLog" setup>
import {ref, computed, unref} from 'vue';
import {BasicTable, useTable, TableAction} from '/@/components/Table';
import {useModal} from '/@/components/Modal';
import { useListPage } from '/@/hooks/system/useListPage'
import CityVipLogModal from './components/CityVipLogModal.vue'
import {columns, searchFormSchema} from './cityVipLog.data';
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './cityVipLog.api';
const checkedKeys = ref<Array<string | number>>([]);
//model
const [registerModal, {openModal}] = useModal();
//table
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
tableProps:{
title: '开通记录',
api: list,
columns,
canResize:false,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
autoSubmitOnEnter:true,
showAdvancedButton:true,
fieldMapToTime: [
],
},
actionColumn: {
width: 120,
},
},
exportConfig: {
name:"开通记录",
url: getExportUrl,
},
importConfig: {
url: getImportUrl
},
})
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
/**
* 新增事件
*/
function handleAdd() {
openModal(true, {
isUpdate: false,
showFooter: true,
});
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: true,
});
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: false,
});
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({id: record.id}, reload);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ids: checkedKeys.value}, reload);
}
/**
* 成功回调
*/
function handleSuccess() {
reload();
}
/**
* 操作栏
*/
function getTableAction(record){
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
}
]
}
/**
* 下拉操作栏
*/
function getDropDownAction(record){
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
}
]
}
</script>
<style scoped>
</style>

+ 58
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityVipLog/vue3/components/CityVipLogModal.vue View File

@ -0,0 +1,58 @@
<template>
<BasicModal v-bind="$attrs" @register="registerModal" :title="title" @ok="handleSubmit">
<BasicForm @register="registerForm"/>
</BasicModal>
</template>
<script lang="ts" setup>
import {ref, computed, unref} from 'vue';
import {BasicModal, useModalInner} from '/@/components/Modal';
import {BasicForm, useForm} from '/@/components/Form/index';
import {formSchema} from '../cityVipLog.data';
import {saveOrUpdate} from '../cityVipLog.api';
// Emits
const emit = defineEmits(['register','success']);
const isUpdate = ref(true);
//
const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({
labelWidth: 150,
schemas: formSchema,
showActionButtonGroup: false,
});
//
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
//
await resetFields();
setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter});
isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) {
//
await setFieldsValue({
...data.record,
});
}
//
setProps({ disabled: !data?.showFooter })
});
//
const title = computed(() => (!unref(isUpdate) ? '新增' : '编辑'));
//
async function handleSubmit(v) {
try {
let values = await validate();
setModalProps({confirmLoading: true});
//
await saveOrUpdate(values, isUpdate.value);
//
closeModal();
//
emit('success');
} finally {
setModalProps({confirmLoading: false});
}
}
</script>
<style lang="less" scoped>
</style>

+ 1
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/bean/PageBean.java View File

@ -6,6 +6,7 @@ import lombok.Data;
@Data
public class PageBean {
private Integer className;
/**显示条数*/
@ApiModelProperty(value = "显示条数" )
private Integer pageSize;


+ 3
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/bean/YaoDuOrderBean.java View File

@ -6,6 +6,9 @@ import lombok.Data;
@Data
public class YaoDuOrderBean {
@ApiModelProperty(value = "订单状态" )
private Integer state;
/**显示条数*/
@ApiModelProperty(value = "显示条数" )
private Integer pageSize;


+ 5
- 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/YaoDuApiService.java View File

@ -96,7 +96,7 @@ public interface YaoDuApiService {
//点击查看联系方式 类型 0帖子 1租房 2工作 3门店
Result<?> checkGivePhone(String token,String type, String id);
Result<?> checkGivePhone(String token,String type, String id,String title);
//点击查看地图 类型 0帖子 1租房 2工作 3门店
Result<?> checkMap(String token,String type, String id);
@ -209,5 +209,9 @@ public interface YaoDuApiService {
Result<?> getWalletFlow(String token,PageBean pageBean);
//根据商品查询店铺商品
Result<?> getGoodsList(String token,String shopId,PageBean pageBean);
}

+ 7
- 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/YaoDuOrderService.java View File

@ -19,9 +19,15 @@ public interface YaoDuOrderService {
Result<?> getOrderDetail(String token,String orderId);
//商城-支付回调
Result<?> payNotify(String requestBody);
Object payNotify(String requestBody);
//开通会员支付回调
Object vipPayNotify(String requestBody);
//开通万能墙会员
Result<?> openMember(String token,Integer type);
//查询当前开通会员以及过期时间
Result<?> getMemberInfo(String token);
}

+ 68
- 6
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/impl/YaoDuApiServiceImpl.java View File

@ -48,6 +48,8 @@ import org.jeecg.modules.cityBanner.service.ICityBannerService;
import org.jeecg.modules.cityCat.entity.CityCat;
import org.jeecg.modules.cityCat.service.ICityCatService;
import org.jeecg.modules.cityCat.service.impl.CityCatServiceImpl;
import org.jeecg.modules.cityClick.entity.CityClick;
import org.jeecg.modules.cityClick.service.ICityClickService;
import org.jeecg.modules.cityComment.entity.CityComment;
import org.jeecg.modules.cityComment.service.ICityCommentService;
import org.jeecg.modules.cityConf.entity.CityConf;
@ -105,6 +107,8 @@ public class YaoDuApiServiceImpl implements YaoDuApiService {
//获取开通区域相关地址
@Resource
private ICityAddrService cityService;
@Resource
private ICityClickService cityClickService;
//获取banner相关接口信息
@Resource
private ICityBannerService cityBannerService;
@ -297,7 +301,7 @@ public class YaoDuApiServiceImpl implements YaoDuApiService {
CityConf notice = cityConfService.lambdaQuery().eq(CityConf::getKeyIcon, "notice").one();
map.put("notice",notice.getKeyDetails());
map.put("notice",notice);
return Result.OK(map);
}
@ -369,7 +373,7 @@ public class YaoDuApiServiceImpl implements YaoDuApiService {
newRecords.add(cityTrends);
}
//随机排序帖子列表数据每次刷新展示的数据不同
Collections.shuffle(newRecords);
// Collections.shuffle(newRecords);
page1.setRecords(newRecords);
return Result.OK(page1);
@ -588,7 +592,47 @@ public class YaoDuApiServiceImpl implements YaoDuApiService {
//点击查看联系方式 类型 0帖子 1租房 2工作 3门店
@Override
public Result<?> checkGivePhone(String token,String type, String id){
public Result<?> checkGivePhone(String token,String type, String id,String title){
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
//查看是否是会员
if(hanHaiMember.getIsPay() < 1){
//查询当前点击查看了几次联系方式
List<CityClick> list = cityClickService.lambdaQuery()
.eq(CityClick::getUserId, hanHaiMember.getId())
.list();
if(list.size() < 2){
//增加点击记录
CityClick cityClick = new CityClick();
cityClick.setUserId(hanHaiMember.getId());
cityClick.setType(type);
cityClick.setOrderId(id);
cityClick.setTitle("点击:"+title+"的联系方式");
cityClickService.save(cityClick);
}else if(list.size() >= 2){
//查看积分是否充足
if(hanHaiMember.getIntegerPrice().compareTo(new BigDecimal(2))>=0){
return Result.error("积分不足");
}
//增加积分流水
CityIntgerWater cityMoneyLog = new CityIntgerWater();
cityMoneyLog.setCreateTime(new Date());
cityMoneyLog.setType(0);
cityMoneyLog.setIntger(new BigDecimal(2));
cityMoneyLog.setUserId(hanHaiMember.getId());
cityMoneyLog.setTitle("查看联系方式");
cityIntgerWaterService.save(cityMoneyLog);
//减少用户积分
hanHaiMember.setIntegerPrice(hanHaiMember.getIntegerPrice().subtract(new BigDecimal(2)));
hanHaiMemberService.updateById(hanHaiMember);
}
}
return Result.OK();
}
@ -1326,6 +1370,9 @@ public class YaoDuApiServiceImpl implements YaoDuApiService {
Page<CityShopping> page = new Page<CityShopping>(pageBean.getPageNo(), pageBean.getPageSize());
Page<CityShopping> page1 = cityShoppingService.lambdaQuery()
.orderByDesc(CityShopping::getCreateTime)
.eq(CityShopping::getClassName,pageBean.getClassName())
.eq(CityShopping::getIsOpen,"Y")
.eq(CityShopping::getIsIndex,"Y")
.page(page);
//获取列表数据循环替换数据
List<CityShopping> records = page1.getRecords();
@ -1355,6 +1402,8 @@ public class YaoDuApiServiceImpl implements YaoDuApiService {
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
Page<CityAddress> page = new Page<CityAddress>(pageBean.getPageNo(), pageBean.getPageSize());
Page<CityAddress> page1 = cityAddressService.lambdaQuery()
.eq(CityAddress::getUserId,hanHaiMember.getId())
.orderByDesc(CityAddress::getCreateTime)
.page(page);
return Result.OK(page1);
@ -1474,10 +1523,23 @@ public class YaoDuApiServiceImpl implements YaoDuApiService {
public Result<?> getWalletFlow(String token,PageBean pageBean){
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
Page<CityIntgerWater> page = new Page<CityIntgerWater>(pageBean.getPageNo(), pageBean.getPageSize());
Page<CityIntgerWater> page1 = cityIntgerWaterService.lambdaQuery()
.eq(CityIntgerWater::getUserId, hanHaiMember.getId())
.orderByDesc(CityIntgerWater::getCreateTime)
Page<CityIntgerWater> page1 = new Page<>();
return Result.OK(page1);
}
//根据商品查询店铺商品
@Override
public Result<?> getGoodsList(String token,String shopId,PageBean pageBean){
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
Page<CityShopping> page = new Page<CityShopping>(pageBean.getPageNo(), pageBean.getPageSize());
Page<CityShopping> page1 = cityShoppingService.lambdaQuery()
.eq(CityShopping::getShopId, shopId)
.eq(CityShopping::getIsOpen, "Y")
.orderByDesc(CityShopping::getCreateTime)
.page(page);
return Result.OK(page1);
}
}

+ 130
- 6
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/impl/YaoDuOrderServiceImpl.java View File

@ -1,21 +1,28 @@
package org.jeecg.modules.api.service.impl;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult;
import lombok.extern.log4j.Log4j;
import lombok.extern.log4j.Log4j2;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.time.DateUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.config.shiro.ShiroRealm;
import org.jeecg.modules.api.bean.YaoDuOrderBean;
import org.jeecg.modules.api.service.YaoDuOrderService;
import org.jeecg.modules.cityAddress.entity.CityAddress;
import org.jeecg.modules.cityAddress.service.ICityAddressService;
import org.jeecg.modules.cityConf.entity.CityConf;
import org.jeecg.modules.cityConf.service.ICityConfService;
import org.jeecg.modules.cityOrder.entity.CityOrder;
import org.jeecg.modules.cityOrder.service.ICityOrderService;
import org.jeecg.modules.cityShopping.entity.CityShopping;
import org.jeecg.modules.cityShopping.service.ICityShoppingService;
import org.jeecg.modules.cityVipLog.entity.CityVipLog;
import org.jeecg.modules.cityVipLog.service.ICityVipLogService;
import org.jeecg.modules.hanHaiMember.entity.HanHaiMember;
import org.jeecg.modules.hanHaiMember.service.IHanHaiMemberService;
import org.jeecg.modules.pay.MpWxPayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -23,6 +30,9 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Log4j2
@ -44,6 +54,16 @@ public class YaoDuOrderServiceImpl implements YaoDuOrderService {
//地址
@Resource
private ICityAddressService cityAddressService;
//vip支付记录
@Resource
private ICityVipLogService cityVipLogService;
//获取配置信息
@Resource
private ICityConfService cityConfService;
//获取配置信息
@Resource
private IHanHaiMemberService hanHaiMemberService;
@ -156,7 +176,7 @@ public class YaoDuOrderServiceImpl implements YaoDuOrderService {
//吊起微信支付
String s = price.multiply(new BigDecimal(100)).toString();
int i1 = Double.valueOf(s).intValue();
Object appOrder = mpWxPayService.createOrderGo(
Object appOrder = mpWxPayService.createOrder(
"购买"+ cityShopping.getName() ,
"127.0.0.1",
cityOrder.getId(),
@ -177,6 +197,14 @@ public class YaoDuOrderServiceImpl implements YaoDuOrderService {
.eq(CityOrder::getUserId,hanHaiMember.getId())
.orderByDesc(CityOrder::getCreateTime)
.page(page);
//如果订单状态不为空
if(null!=bean.getState()){
page1 = cityOrderService.lambdaQuery()
.eq(CityOrder::getUserId,hanHaiMember.getId())
.eq(CityOrder::getState,bean.getState())
.orderByDesc(CityOrder::getCreateTime)
.page(page);
}
return Result.OK(page1);
}
@ -200,23 +228,119 @@ public class YaoDuOrderServiceImpl implements YaoDuOrderService {
}
//开通会员支付回调
@Override
public Object vipPayNotify(String requestBody){
try {
WxPayOrderNotifyResult notify = mpWxPayService.notify(requestBody);
//获取订单号
String outTradeNo = notify.getOutTradeNo();
log.info("支付回调订单号码:"+outTradeNo);
CityVipLog byId = cityVipLogService.lambdaQuery().eq(CityVipLog::getId,outTradeNo).one();
//订单不为空
if(null!=byId){
//订单状态为未支付状态
if("N".equals(byId.getIsPay())){
//更新订单状态
byId.setIsPay("Y");
cityVipLogService.updateById(byId);
//根据用户标识查询用户信息
HanHaiMember hanHaiMember = hanHaiMemberService.getById(byId.getUserId());
hanHaiMember.setIsPay(byId.getType());
hanHaiMemberService.updateById(hanHaiMember);
//查询邀请者
HanHaiMember byId1 = hanHaiMemberService.getById(hanHaiMember.getShareId());
if(null!=byId1){
//增加佣金
BigDecimal price = byId1.getPrice().add(byId.getGiveMoney());
byId1.setPrice(price);
hanHaiMemberService.updateById(byId1);
}
}
}
}catch (Exception e){
e.printStackTrace();
}
return null;
}
//开通万能墙会员
@Override
public Result<?> openMember(String token,Integer type){
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
CityConf vip = cityConfService.lambdaQuery().eq(CityConf::getKeyIcon, "vip").one();
CityConf vipBig = cityConfService.lambdaQuery().eq(CityConf::getKeyIcon, "vipBig").one();
//创建vip支付订单
CityVipLog cityVipLog = new CityVipLog();
String id = System.currentTimeMillis()+"";
cityVipLog.setId(id);
cityVipLog.setUserId(hanHaiMember.getId());
cityVipLog.setType(type);
cityVipLog.setCreateTime(new Date());
cityVipLog.setStartTime(new Date());
//过期时间为当前时间延后一个月
cityVipLog.setEndTime(DateUtils.addMonths(new Date(), 1));
cityVipLog.setIsPay("N");
String s = new BigDecimal(vip.getKeyValue()).multiply(new BigDecimal(100)).toString();
//用户邀请标识不能为空
if(StringUtils.isNotBlank(hanHaiMember.getShareId())){
if(type == 1){
cityVipLog.setGiveUser(hanHaiMember.getShareId());
cityVipLog.setGiveMoney(vip.getKeyMoney());
s = new BigDecimal(vip.getKeyValue()).multiply(new BigDecimal(100)).toString();
}
if (type == 2){
cityVipLog.setGiveUser(hanHaiMember.getShareId());
cityVipLog.setGiveMoney(vipBig.getKeyMoney());
s = new BigDecimal(vipBig.getKeyValue()).multiply(new BigDecimal(100)).toString();
}
}
cityVipLogService.save(cityVipLog);
//吊起微信支付
String s = new BigDecimal(0.01).multiply(new BigDecimal(100)).toString();
int i1 = Double.valueOf(s).intValue();
Object appOrder = mpWxPayService.createOrderGo(
Object appOrder = mpWxPayService.createOrderVip(
"购买会员" ,
"127.0.0.1",
System.currentTimeMillis()+"",
id,
i1,
System.currentTimeMillis()+"",
id,
hanHaiMember.getAppletOpenid(),
"{}");
cityVipLog.toString());
return Result.OK("支付成功",appOrder);
}
//查询当前开通会员以及过期时间
@Override
public Result<?> getMemberInfo(String token){
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
List<CityVipLog> y = cityVipLogService.lambdaQuery()
.orderByDesc(CityVipLog::getEndTime)
.eq(CityVipLog::getUserId, hanHaiMember.getId())
.eq(CityVipLog::getIsPay, "Y")
.list();
return Result.OK(y);
}
}

+ 12
- 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/yaoduapi/YaoDuApiTokenController.java View File

@ -50,8 +50,8 @@ public class YaoDuApiTokenController {
//点击查看联系方式 类型 0帖子 1租房 2工作 3门店
@PostMapping(value = "/checkGivePhone")
@ApiOperation(value="点击查看联系方式 类型 0帖子 1租房 2工作 3门店")
public Result<?> checkGivePhone(@RequestHeader("X-Access-Token") String token,String type, String id) {
return yaoDuApiService.checkGivePhone(token,type,id);
public Result<?> checkGivePhone(@RequestHeader("X-Access-Token") String token,String type, String id,String title) {
return yaoDuApiService.checkGivePhone(token,type,id,title);
}
@ -261,4 +261,14 @@ public class YaoDuApiTokenController {
}
//查询商品信息列表根据关联店铺标识
@ApiOperation(value="查询商品信息列表根据关联店铺标识")
@GetMapping("/getGoodsList")
public Result<?> getGoodsList(@RequestHeader("X-Access-Token") String token,String shopId,PageBean pageBean)
{
return yaoDuApiService.getGoodsList(token,shopId,pageBean);
}
}

+ 18
- 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/yaoduapi/YaoDuOrderController.java View File

@ -53,10 +53,9 @@ public class YaoDuOrderController {
return yaoDuOrderService.getOrderDetail(token,orderId);
}
//商城-支付回调
@ApiOperation(value="商城-支付回调", notes="商城-支付回调")
@PostMapping("/payNotify")
public Result<?> payNotify(@RequestBody String requestBody){
public Object payNotify(@RequestBody String requestBody){
return yaoDuOrderService.payNotify(requestBody);
}
@ -68,4 +67,20 @@ public class YaoDuOrderController {
return yaoDuOrderService.openMember(token,type);
}
@PostMapping("/vipOpenPayNotify")
public Object vipOpenPayNotify(@RequestBody String requestBody){
return yaoDuOrderService.vipPayNotify(requestBody);
}
//查询当前开通会员以及过期时间
@ApiOperation(value="查询当前开通会员以及过期时间", notes="查询当前开通会员以及过期时间")
@GetMapping("/getMemberInfo")
public Result<?> getMemberInfo(@RequestHeader("X-Access-Token") String token){
return yaoDuOrderService.getMemberInfo(token);
}
}

+ 4
- 2
jeecg-boot-module-system/src/main/resources/pay_weixin.properties View File

@ -2,5 +2,7 @@ pay.mchId=1673516176
pay.appId=wxa4d29e67e8a58d38
pay.mchKey=GVIP1008611ABCDEFGGGGJKHLOSJFLGK
pay.keyPath=
pay.notifyUrl=https://admin.hhlm1688.com/api/order/payNotify
pay.notifyUrlDev=https://admin.hhlm1688.com/api/order/payNotify
pay.notifyUrl=http://h5.xzaiyp.top/api/order/payNotify
pay.notifyUrlDev=http://h5.xzaiyp.top/api/order/payNotify
pay.notifyVipUrl=http://h5.xzaiyp.top/api/order/vipPayNotify
pay.notifyUrlVipDev=http://h5.xzaiyp.top/api/order/vipPayNotify

Loading…
Cancel
Save