diff --git a/module-common/src/main/java/org/jeecg/api/bean/PageBean.java b/module-common/src/main/java/org/jeecg/api/bean/PageBean.java new file mode 100644 index 0000000..4dc0eee --- /dev/null +++ b/module-common/src/main/java/org/jeecg/api/bean/PageBean.java @@ -0,0 +1,19 @@ +package org.jeecg.api.bean; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +public class PageBean { + /**显示条数*/ + @ApiModelProperty(value = "显示条数" ) + private Integer pageSize; + /**当前页*/ + @ApiModelProperty(value = "当前页" ) + private Integer pageNo; + + public PageBean() { + this.pageNo = 1; + this.pageSize = 1000; + } +} diff --git a/module-common/src/main/java/org/jeecg/api/controller/ApiIndexController.java b/module-common/src/main/java/org/jeecg/api/controller/ApiIndexController.java index a2d8998..63aab7d 100644 --- a/module-common/src/main/java/org/jeecg/api/controller/ApiIndexController.java +++ b/module-common/src/main/java/org/jeecg/api/controller/ApiIndexController.java @@ -6,8 +6,10 @@ import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.jeecg.api.bean.CommonHomeBo; import org.jeecg.api.bean.HousePageList; +import org.jeecg.api.bean.PageBean; import org.jeecg.api.service.ApiIndexService; import org.jeecg.common.api.vo.Result; +import org.jeecg.modules.commonBanner.entity.CommonBanner; import org.jeecg.modules.commonHome.entity.CommonHome; import org.jeecg.modules.commonNews.entity.CommonNews; import org.jeecg.modules.hanHaiMember.service.IHanHaiMemberService; @@ -27,6 +29,13 @@ public class ApiIndexController { @Resource private ApiIndexService apiIndexService; + //获取banner图列表 + @ApiOperation(value="首页-获取banner图列表", notes="首页-获取banner图列表") + @RequestMapping(value = "/queryBannerList", method = {RequestMethod.GET}) + public Result queryBannerList(CommonBanner communityBanner, PageBean pageBean){ + return apiIndexService.queryBannerList(communityBanner, pageBean); + } + //获取通知公告 @ApiOperation(value="获取通知公告", notes="获取通知公告") @GetMapping(value = "/getNotice") diff --git a/module-common/src/main/java/org/jeecg/api/controller/AppletLoginController.java b/module-common/src/main/java/org/jeecg/api/controller/AppletLoginController.java index 0390b4e..be80ae1 100644 --- a/module-common/src/main/java/org/jeecg/api/controller/AppletLoginController.java +++ b/module-common/src/main/java/org/jeecg/api/controller/AppletLoginController.java @@ -41,12 +41,12 @@ public class AppletLoginController { } - //绑定手机号码 - @ApiOperation(value="绑定手机号码", notes="绑定手机号码") - @GetMapping(value = "/bindPhone") - public Result bindPhone(LoginReq loginReq){ - return appletLoginService.bindPhone(loginReq); - } +// //绑定手机号码 +// @ApiOperation(value="绑定手机号码", notes="绑定手机号码") +// @GetMapping(value = "/bindPhone") +// public Result bindPhone(LoginReq loginReq){ +// return appletLoginService.bindPhone(loginReq); +// } diff --git a/module-common/src/main/java/org/jeecg/api/controller/AppletMyInfoController.java b/module-common/src/main/java/org/jeecg/api/controller/AppletMyInfoController.java index 4ecd04e..b5e0d0a 100644 --- a/module-common/src/main/java/org/jeecg/api/controller/AppletMyInfoController.java +++ b/module-common/src/main/java/org/jeecg/api/controller/AppletMyInfoController.java @@ -3,13 +3,20 @@ package org.jeecg.api.controller; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections.map.HashedMap; import org.jeecg.common.api.vo.Result; import org.jeecg.config.shiro.ShiroRealm; +import org.jeecg.modules.commonVipCombo.entity.CommonVipCombo; +import org.jeecg.modules.commonVipCombo.service.ICommonVipComboService; +import org.jeecg.modules.commonVipInfo.entity.CommonVipInfo; +import org.jeecg.modules.commonVipInfo.service.ICommonVipInfoService; +import org.jeecg.modules.commonVipRecord.service.ICommonVipRecordService; import org.jeecg.modules.hanHaiMember.entity.HanHaiMember; import org.jeecg.modules.hanHaiMember.service.IHanHaiMemberService; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import java.util.Map; @Api(tags="项目通用-修改个人信息") @RestController @@ -22,6 +29,14 @@ public class AppletMyInfoController { //权限验证 @Resource private ShiroRealm shiroRealm; + //会员套餐信息 + @Resource + private ICommonVipComboService commonVipComboService; + //会员信息 + @Resource + private ICommonVipInfoService commonVipInfoService; + /******************************************************************************************************************/ + //修改个人信息 @PostMapping(value = "/updateInfo") @@ -41,9 +56,43 @@ public class AppletMyInfoController { @GetMapping(value = "/getInfo") @ApiOperation(value="获取个人信息", notes="获取个人信息") public Result getInfo(@RequestHeader("X-Access-Token") String token){ + log.info("开始获取个人信息"); + //权限验证 HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); - HanHaiMember byId = hanHaiMemberService.getById(hanHaiMember.getId()); - return Result.OK(byId); + + //返回数据 + Map map = new HashedMap(); + + try{ + //个人基础数据 + log.info("获取用户基础信息"); + map.put("member", hanHaiMember); + log.info("用户基础信息获取成功"); + + //会员信息 + log.info("获取用户会员信息"); + CommonVipInfo vipInfo = commonVipInfoService + .lambdaQuery() + .eq(CommonVipInfo::getUserId, hanHaiMember.getId()) + .one(); + if(null != vipInfo){ + log.info("用户会员信息获取成功,开始获取用户会员套餐信息"); + //会员套餐信息 + CommonVipCombo vipCombo = commonVipComboService.getById(vipInfo.getComboId()); + vipInfo.setCommonVipCombo(vipCombo); + log.info("用户会员套餐信息获取成功"); + }else { + log.info("会员套餐信息获取失败"); + } + map.put("vipInfo", vipInfo); + + return Result.OK("个人信息", map); + + }catch (Exception e){ + e.printStackTrace(); + return Result.error("获取个人信息失败", map); + } + } diff --git a/module-common/src/main/java/org/jeecg/api/service/ApiIndexService.java b/module-common/src/main/java/org/jeecg/api/service/ApiIndexService.java index b4c7669..64ad4ed 100644 --- a/module-common/src/main/java/org/jeecg/api/service/ApiIndexService.java +++ b/module-common/src/main/java/org/jeecg/api/service/ApiIndexService.java @@ -1,17 +1,25 @@ package org.jeecg.api.service; +import io.swagger.annotations.ApiOperation; import org.jeecg.api.bean.CommonHomeBo; import org.jeecg.api.bean.HousePageList; +import org.jeecg.api.bean.PageBean; import org.jeecg.common.api.vo.Result; +import org.jeecg.modules.commonBanner.entity.CommonBanner; import org.jeecg.modules.commonComment.entity.CommonComment; import org.jeecg.modules.commonHome.entity.CommonHome; import org.jeecg.modules.commonNews.entity.CommonNews; import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; import javax.servlet.http.HttpServletRequest; public interface ApiIndexService { + //获取banner图列表 + public Result queryBannerList(CommonBanner communityBanner, PageBean pageBean); + //获取通知公告 Result getNotice(); diff --git a/module-common/src/main/java/org/jeecg/api/service/impl/ApiIndexServiceImpl.java b/module-common/src/main/java/org/jeecg/api/service/impl/ApiIndexServiceImpl.java index dc7e690..a3fd2f7 100644 --- a/module-common/src/main/java/org/jeecg/api/service/impl/ApiIndexServiceImpl.java +++ b/module-common/src/main/java/org/jeecg/api/service/impl/ApiIndexServiceImpl.java @@ -3,11 +3,13 @@ package org.jeecg.api.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang.StringUtils; import org.jeecg.api.bean.CommonHomeBo; import org.jeecg.api.bean.HousePageList; +import org.jeecg.api.bean.PageBean; import org.jeecg.api.service.ApiIndexService; import org.jeecg.api.untils.HttpConf; import org.jeecg.common.api.vo.Result; @@ -18,6 +20,8 @@ import org.jeecg.modules.commCity.entity.CommCity; import org.jeecg.modules.commCity.service.ICommCityService; import org.jeecg.modules.commonAccount.entity.CommonAccount; import org.jeecg.modules.commonAccount.service.ICommonAccountService; +import org.jeecg.modules.commonBanner.entity.CommonBanner; +import org.jeecg.modules.commonBanner.service.ICommonBannerService; import org.jeecg.modules.commonClass.entity.CommonClass; import org.jeecg.modules.commonClass.service.ICommonClassService; import org.jeecg.modules.commonComment.entity.CommonComment; @@ -76,6 +80,8 @@ public class ApiIndexServiceImpl implements ApiIndexService { private ICommCityService cityService; @Resource private ICommonAccountService accountService; + @Resource + private ICommonBannerService commonBannerService; @@ -85,6 +91,42 @@ public class ApiIndexServiceImpl implements ApiIndexService { @Resource private HttpConf httpConf; + //获取banner图列表 + @Override + public Result queryBannerList(CommonBanner commonBanner, PageBean pageBean) { + log.info("开始查询轮播图列表"); + //返回信息 + String massege = ""; + //分页信息 + Page page = null; + //查询信息 + LambdaQueryChainWrapper query = null; + //返回信息 + Page pageList = null; + + try{ + //分页 + page = new Page(pageBean.getPageNo(), pageBean.getPageSize()); + query = commonBannerService + .lambdaQuery(); + + //组装查询条件 + + //按照创建日期升序排列 + query.orderByAsc(CommonBanner::getCreateTime); + + //获取轮播图列表 + pageList = query.page(page); + + log.info("轮播图列表查询结束"); + return Result.OK("轮播图列表", pageList); + }catch (Exception e){ + log.info("轮播图列表查询失败"); + e.printStackTrace(); + return Result.error("轮播图列表查询失败"); + } + } + //获取通知公告 @Override diff --git a/module-common/src/main/java/org/jeecg/api/service/impl/AppletLoginServiceImpl.java b/module-common/src/main/java/org/jeecg/api/service/impl/AppletLoginServiceImpl.java index e3655d8..7ee57d0 100644 --- a/module-common/src/main/java/org/jeecg/api/service/impl/AppletLoginServiceImpl.java +++ b/module-common/src/main/java/org/jeecg/api/service/impl/AppletLoginServiceImpl.java @@ -32,6 +32,7 @@ import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; import java.nio.charset.StandardCharsets; +import java.util.Date; import java.util.HashMap; import java.util.Map; @@ -226,59 +227,59 @@ public class AppletLoginServiceImpl implements AppletLoginService { // return Result.error("未获取到openid"); // } // return Result.OK("获取成功",userPhone); - - } - +// +// } - /** - * 解析电话号码 - * @param loginReq - * @return - */ - public String getPhoneNumber(LoginReq loginReq) { - String encryptedData = loginReq.getEncryptedData(); - String session_key = loginReq.getSession_key(); - String iv = loginReq.getIv(); - // 被加密的数据 - byte[] dataByte = Base64.decodeBase64(encryptedData); - // 加密秘钥 - byte[] keyByte = Base64.decodeBase64(session_key); - // 偏移量 - byte[] ivByte = Base64.decodeBase64(iv); - try { - // 如果密钥不足16位,那么就补足. 这个if 中的内容很重要 - int base = 16; - if (keyByte.length % base != 0) { - int groups = keyByte.length / base + (keyByte.length % base != 0 ? 1 : 0); - byte[] temp = new byte[groups * base]; - Arrays.fill(temp, (byte) 0); - System.arraycopy(keyByte, 0, temp, 0, keyByte.length); - keyByte = temp; - } - // 初始化 - Security.addProvider(new BouncyCastleProvider()); - Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding", "BC"); - SecretKeySpec spec = new SecretKeySpec(keyByte, "AES"); - AlgorithmParameters parameters = AlgorithmParameters.getInstance("AES"); - parameters.init(new IvParameterSpec(ivByte)); - cipher.init(Cipher.DECRYPT_MODE, spec, parameters);// 初始化 - byte[] resultByte = cipher.doFinal(dataByte); - if (null != resultByte && resultByte.length > 0) { - String result = new String(resultByte, "UTF-8"); - JSONObject userPhoneObj = JSONObject.parseObject(result); - Map userMap = new HashMap<>(); - for (Map.Entry entry : userPhoneObj.entrySet()) { - userMap.put(entry.getKey(), entry.getValue()); - } - // 获取phoneNumber 带区号 - String userPhone = (String) userMap.get("phoneNumber"); - return userPhone; - } - } catch (Exception e) { - e.printStackTrace(); - } - return null; - } +// +// /** +// * 解析电话号码 +// * @param loginReq +// * @return +// */ +// public String getPhoneNumber(LoginReq loginReq) { +// String encryptedData = loginReq.getEncryptedData(); +// String session_key = loginReq.getSession_key(); +// String iv = loginReq.getIv(); +// // 被加密的数据 +// byte[] dataByte = Base64.decodeBase64(encryptedData); +// // 加密秘钥 +// byte[] keyByte = Base64.decodeBase64(session_key); +// // 偏移量 +// byte[] ivByte = Base64.decodeBase64(iv); +// try { +// // 如果密钥不足16位,那么就补足. 这个if 中的内容很重要 +// int base = 16; +// if (keyByte.length % base != 0) { +// int groups = keyByte.length / base + (keyByte.length % base != 0 ? 1 : 0); +// byte[] temp = new byte[groups * base]; +// Arrays.fill(temp, (byte) 0); +// System.arraycopy(keyByte, 0, temp, 0, keyByte.length); +// keyByte = temp; +// } +// // 初始化 +// Security.addProvider(new BouncyCastleProvider()); +// Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding", "BC"); +// SecretKeySpec spec = new SecretKeySpec(keyByte, "AES"); +// AlgorithmParameters parameters = AlgorithmParameters.getInstance("AES"); +// parameters.init(new IvParameterSpec(ivByte)); +// cipher.init(Cipher.DECRYPT_MODE, spec, parameters);// 初始化 +// byte[] resultByte = cipher.doFinal(dataByte); +// if (null != resultByte && resultByte.length > 0) { +// String result = new String(resultByte, "UTF-8"); +// JSONObject userPhoneObj = JSONObject.parseObject(result); +// Map userMap = new HashMap<>(); +// for (Map.Entry entry : userPhoneObj.entrySet()) { +// userMap.put(entry.getKey(), entry.getValue()); +// } +// // 获取phoneNumber 带区号 +// String userPhone = (String) userMap.get("phoneNumber"); +// return userPhone; +// } +// } catch (Exception e) { +// e.printStackTrace(); +// } +// return null; +// } } diff --git a/module-common/src/main/java/org/jeecg/modules/commonIconImage/controller/CommonIconImageController.java b/module-common/src/main/java/org/jeecg/modules/commonIconImage/controller/CommonIconImageController.java index 26fbded..8de805c 100644 --- a/module-common/src/main/java/org/jeecg/modules/commonIconImage/controller/CommonIconImageController.java +++ b/module-common/src/main/java/org/jeecg/modules/commonIconImage/controller/CommonIconImageController.java @@ -39,7 +39,7 @@ import org.jeecg.common.aspect.annotation.AutoLog; /** * @Description: 图标 * @Author: jeecg-boot - * @Date: 2024-11-24 + * @Date: 2025-07-29 * @Version: V1.0 */ @Api(tags="图标") diff --git a/module-common/src/main/java/org/jeecg/modules/commonIconImage/entity/CommonIconImage.java b/module-common/src/main/java/org/jeecg/modules/commonIconImage/entity/CommonIconImage.java index ac042fd..1611e1f 100644 --- a/module-common/src/main/java/org/jeecg/modules/commonIconImage/entity/CommonIconImage.java +++ b/module-common/src/main/java/org/jeecg/modules/commonIconImage/entity/CommonIconImage.java @@ -20,7 +20,7 @@ import lombok.experimental.Accessors; /** * @Description: 图标 * @Author: jeecg-boot - * @Date: 2024-11-24 + * @Date: 2025-07-29 * @Version: V1.0 */ @Data @@ -63,4 +63,12 @@ public class CommonIconImage implements Serializable { @Excel(name = "跳转", width = 15) @ApiModelProperty(value = "跳转") private java.lang.String url; + /**分类标识*/ + @Excel(name = "分类标识", width = 15) + @ApiModelProperty(value = "分类标识") + private java.lang.String code; + /**副标题*/ + @Excel(name = "副标题", width = 15) + @ApiModelProperty(value = "副标题") + private java.lang.String shortTitle; } diff --git a/module-common/src/main/java/org/jeecg/modules/commonIconImage/mapper/CommonIconImageMapper.java b/module-common/src/main/java/org/jeecg/modules/commonIconImage/mapper/CommonIconImageMapper.java index 8e25163..0767d16 100644 --- a/module-common/src/main/java/org/jeecg/modules/commonIconImage/mapper/CommonIconImageMapper.java +++ b/module-common/src/main/java/org/jeecg/modules/commonIconImage/mapper/CommonIconImageMapper.java @@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** * @Description: 图标 * @Author: jeecg-boot - * @Date: 2024-11-24 + * @Date: 2025-07-29 * @Version: V1.0 */ public interface CommonIconImageMapper extends BaseMapper { diff --git a/module-common/src/main/java/org/jeecg/modules/commonIconImage/service/ICommonIconImageService.java b/module-common/src/main/java/org/jeecg/modules/commonIconImage/service/ICommonIconImageService.java index 415b507..2e111f4 100644 --- a/module-common/src/main/java/org/jeecg/modules/commonIconImage/service/ICommonIconImageService.java +++ b/module-common/src/main/java/org/jeecg/modules/commonIconImage/service/ICommonIconImageService.java @@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService; /** * @Description: 图标 * @Author: jeecg-boot - * @Date: 2024-11-24 + * @Date: 2025-07-29 * @Version: V1.0 */ public interface ICommonIconImageService extends IService { diff --git a/module-common/src/main/java/org/jeecg/modules/commonIconImage/service/impl/CommonIconImageServiceImpl.java b/module-common/src/main/java/org/jeecg/modules/commonIconImage/service/impl/CommonIconImageServiceImpl.java index 6b50a47..8d05659 100644 --- a/module-common/src/main/java/org/jeecg/modules/commonIconImage/service/impl/CommonIconImageServiceImpl.java +++ b/module-common/src/main/java/org/jeecg/modules/commonIconImage/service/impl/CommonIconImageServiceImpl.java @@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; /** * @Description: 图标 * @Author: jeecg-boot - * @Date: 2024-11-24 + * @Date: 2025-07-29 * @Version: V1.0 */ @Service diff --git a/module-common/src/main/java/org/jeecg/modules/commonIconImage/vue/CommonIconImageList.vue b/module-common/src/main/java/org/jeecg/modules/commonIconImage/vue/CommonIconImageList.vue index 35c75c9..45bd079 100644 --- a/module-common/src/main/java/org/jeecg/modules/commonIconImage/vue/CommonIconImageList.vue +++ b/module-common/src/main/java/org/jeecg/modules/commonIconImage/vue/CommonIconImageList.vue @@ -142,6 +142,16 @@ align:"center", dataIndex: 'url' }, + { + title:'分类标识', + align:"center", + dataIndex: 'code' + }, + { + title:'副标题', + align:"center", + dataIndex: 'shortTitle' + }, { title: '操作', dataIndex: 'action', @@ -180,6 +190,8 @@ fieldList.push({type:'Text',value:'image',text:'图',dictCode:''}) fieldList.push({type:'int',value:'sort',text:'排序',dictCode:''}) fieldList.push({type:'string',value:'url',text:'跳转',dictCode:''}) + fieldList.push({type:'string',value:'code',text:'分类标识',dictCode:''}) + fieldList.push({type:'string',value:'shortTitle',text:'副标题',dictCode:''}) this.superFieldList = fieldList } } diff --git a/module-common/src/main/java/org/jeecg/modules/commonIconImage/vue/modules/CommonIconImageForm.vue b/module-common/src/main/java/org/jeecg/modules/commonIconImage/vue/modules/CommonIconImageForm.vue index aac8fba..4131a8b 100644 --- a/module-common/src/main/java/org/jeecg/modules/commonIconImage/vue/modules/CommonIconImageForm.vue +++ b/module-common/src/main/java/org/jeecg/modules/commonIconImage/vue/modules/CommonIconImageForm.vue @@ -23,6 +23,16 @@ + + + + + + + + + + diff --git a/module-common/src/main/java/org/jeecg/modules/commonIconImage/vue3/CommonIconImage.data.ts b/module-common/src/main/java/org/jeecg/modules/commonIconImage/vue3/CommonIconImage.data.ts index 11b3f98..0cf0bef 100644 --- a/module-common/src/main/java/org/jeecg/modules/commonIconImage/vue3/CommonIconImage.data.ts +++ b/module-common/src/main/java/org/jeecg/modules/commonIconImage/vue3/CommonIconImage.data.ts @@ -25,6 +25,16 @@ export const columns: BasicColumn[] = [ align:"center", dataIndex: 'url' }, + { + title: '分类标识', + align:"center", + dataIndex: 'code' + }, + { + title: '副标题', + align:"center", + dataIndex: 'shortTitle' + }, ]; //查询数据 export const searchFormSchema: FormSchema[] = [ @@ -53,4 +63,14 @@ export const formSchema: FormSchema[] = [ field: 'url', component: 'Input', }, + { + label: '分类标识', + field: 'code', + component: 'Input', + }, + { + label: '副标题', + field: 'shortTitle', + component: 'Input', + }, ]; diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipCombo/controller/CommonVipComboController.java b/module-common/src/main/java/org/jeecg/modules/commonVipCombo/controller/CommonVipComboController.java new file mode 100644 index 0000000..20564b2 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipCombo/controller/CommonVipComboController.java @@ -0,0 +1,171 @@ +package org.jeecg.modules.commonVipCombo.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.commonVipCombo.entity.CommonVipCombo; +import org.jeecg.modules.commonVipCombo.service.ICommonVipComboService; + +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: 2025-07-09 + * @Version: V1.0 + */ +@Api(tags="会员充值套餐表") +@RestController +@RequestMapping("/commonVipCombo/commonVipCombo") +@Slf4j +public class CommonVipComboController extends JeecgController { + @Autowired + private ICommonVipComboService commonVipComboService; + + /** + * 分页列表查询 + * + * @param commonVipCombo + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "会员充值套餐表-分页列表查询") + @ApiOperation(value="会员充值套餐表-分页列表查询", notes="会员充值套餐表-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(CommonVipCombo commonVipCombo, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(commonVipCombo, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = commonVipComboService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param commonVipCombo + * @return + */ + @AutoLog(value = "会员充值套餐表-添加") + @ApiOperation(value="会员充值套餐表-添加", notes="会员充值套餐表-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody CommonVipCombo commonVipCombo) { + commonVipComboService.save(commonVipCombo); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param commonVipCombo + * @return + */ + @AutoLog(value = "会员充值套餐表-编辑") + @ApiOperation(value="会员充值套餐表-编辑", notes="会员充值套餐表-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody CommonVipCombo commonVipCombo) { + commonVipComboService.updateById(commonVipCombo); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "会员充值套餐表-通过id删除") + @ApiOperation(value="会员充值套餐表-通过id删除", notes="会员充值套餐表-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + commonVipComboService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "会员充值套餐表-批量删除") + @ApiOperation(value="会员充值套餐表-批量删除", notes="会员充值套餐表-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.commonVipComboService.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 queryById(@RequestParam(name="id",required=true) String id) { + CommonVipCombo commonVipCombo = commonVipComboService.getById(id); + if(commonVipCombo==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(commonVipCombo); + } + + /** + * 导出excel + * + * @param request + * @param commonVipCombo + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, CommonVipCombo commonVipCombo) { + return super.exportXls(request, commonVipCombo, CommonVipCombo.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, CommonVipCombo.class); + } + +} diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipCombo/entity/CommonVipCombo.java b/module-common/src/main/java/org/jeecg/modules/commonVipCombo/entity/CommonVipCombo.java new file mode 100644 index 0000000..f70470f --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipCombo/entity/CommonVipCombo.java @@ -0,0 +1,70 @@ +package org.jeecg.modules.commonVipCombo.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: 2025-07-09 + * @Version: V1.0 + */ +@Data +@TableName("common_vip_combo") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="common_vip_combo对象", description="会员充值套餐表") +public class CommonVipCombo 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 title; + /**价格*/ + @Excel(name = "价格", width = 15) + @ApiModelProperty(value = "价格") + private java.math.BigDecimal price; + /**会员图标*/ + @Excel(name = "会员图标", width = 15) + @ApiModelProperty(value = "会员图标") + private java.lang.String image; + /**持续时长(月)*/ + @Excel(name = "持续时长(月)", width = 15) + @ApiModelProperty(value = "持续时长(月)") + private java.lang.Integer month; + /**排序编号*/ + @Excel(name = "排序编号", width = 15) + @ApiModelProperty(value = "排序编号") + private java.lang.Integer orderNo; +} diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipCombo/mapper/CommonVipComboMapper.java b/module-common/src/main/java/org/jeecg/modules/commonVipCombo/mapper/CommonVipComboMapper.java new file mode 100644 index 0000000..9b8b6de --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipCombo/mapper/CommonVipComboMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.commonVipCombo.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.commonVipCombo.entity.CommonVipCombo; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 会员充值套餐表 + * @Author: jeecg-boot + * @Date: 2025-07-09 + * @Version: V1.0 + */ +public interface CommonVipComboMapper extends BaseMapper { + +} diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipCombo/mapper/xml/CommonVipComboMapper.xml b/module-common/src/main/java/org/jeecg/modules/commonVipCombo/mapper/xml/CommonVipComboMapper.xml new file mode 100644 index 0000000..fa6af69 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipCombo/mapper/xml/CommonVipComboMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipCombo/service/ICommonVipComboService.java b/module-common/src/main/java/org/jeecg/modules/commonVipCombo/service/ICommonVipComboService.java new file mode 100644 index 0000000..05d1f64 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipCombo/service/ICommonVipComboService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.commonVipCombo.service; + +import org.jeecg.modules.commonVipCombo.entity.CommonVipCombo; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 会员充值套餐表 + * @Author: jeecg-boot + * @Date: 2025-07-09 + * @Version: V1.0 + */ +public interface ICommonVipComboService extends IService { + +} diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipCombo/service/impl/CommonVipComboServiceImpl.java b/module-common/src/main/java/org/jeecg/modules/commonVipCombo/service/impl/CommonVipComboServiceImpl.java new file mode 100644 index 0000000..05c53c6 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipCombo/service/impl/CommonVipComboServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.commonVipCombo.service.impl; + +import org.jeecg.modules.commonVipCombo.entity.CommonVipCombo; +import org.jeecg.modules.commonVipCombo.mapper.CommonVipComboMapper; +import org.jeecg.modules.commonVipCombo.service.ICommonVipComboService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 会员充值套餐表 + * @Author: jeecg-boot + * @Date: 2025-07-09 + * @Version: V1.0 + */ +@Service +public class CommonVipComboServiceImpl extends ServiceImpl implements ICommonVipComboService { + +} diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipCombo/vue/CommonVipComboList.vue b/module-common/src/main/java/org/jeecg/modules/commonVipCombo/vue/CommonVipComboList.vue new file mode 100644 index 0000000..f725446 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipCombo/vue/CommonVipComboList.vue @@ -0,0 +1,195 @@ + + + + \ No newline at end of file diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipCombo/vue/modules/CommonVipComboForm.vue b/module-common/src/main/java/org/jeecg/modules/commonVipCombo/vue/modules/CommonVipComboForm.vue new file mode 100644 index 0000000..772eb8d --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipCombo/vue/modules/CommonVipComboForm.vue @@ -0,0 +1,124 @@ + + + \ No newline at end of file diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipCombo/vue/modules/CommonVipComboModal.Style#Drawer.vue b/module-common/src/main/java/org/jeecg/modules/commonVipCombo/vue/modules/CommonVipComboModal.Style#Drawer.vue new file mode 100644 index 0000000..663d345 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipCombo/vue/modules/CommonVipComboModal.Style#Drawer.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipCombo/vue/modules/CommonVipComboModal.vue b/module-common/src/main/java/org/jeecg/modules/commonVipCombo/vue/modules/CommonVipComboModal.vue new file mode 100644 index 0000000..81de5af --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipCombo/vue/modules/CommonVipComboModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipCombo/vue3/CommonVipCombo.api.ts b/module-common/src/main/java/org/jeecg/modules/commonVipCombo/vue3/CommonVipCombo.api.ts new file mode 100644 index 0000000..42a4271 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipCombo/vue3/CommonVipCombo.api.ts @@ -0,0 +1,61 @@ +import {defHttp} from '/@/utils/http/axios'; +import {Modal} from 'ant-design-vue'; + +enum Api { + list = '/commonVipCombo/commonVipCombo/list', + save='/commonVipCombo/commonVipCombo/add', + edit='/commonVipCombo/commonVipCombo/edit', + deleteOne = '/commonVipCombo/commonVipCombo/delete', + deleteBatch = '/commonVipCombo/commonVipCombo/deleteBatch', + importExcel = '/commonVipCombo/commonVipCombo/importExcel', + exportXls = '/commonVipCombo/commonVipCombo/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}); +} diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipCombo/vue3/CommonVipCombo.data.ts b/module-common/src/main/java/org/jeecg/modules/commonVipCombo/vue3/CommonVipCombo.data.ts new file mode 100644 index 0000000..a3f309c --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipCombo/vue3/CommonVipCombo.data.ts @@ -0,0 +1,63 @@ +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: 'title' + }, + { + title: '价格', + align:"center", + dataIndex: 'price' + }, + { + title: '会员图标', + align:"center", + dataIndex: 'image' + }, + { + title: '持续时长(月)', + align:"center", + dataIndex: 'month' + }, + { + title: '排序编号', + align:"center", + dataIndex: 'orderNo' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '会员名称', + field: 'title', + component: 'Input', + }, + { + label: '价格', + field: 'price', + component: 'InputNumber', + }, + { + label: '会员图标', + field: 'image', + component: 'Input', + }, + { + label: '持续时长(月)', + field: 'month', + component: 'InputNumber', + }, + { + label: '排序编号', + field: 'orderNo', + component: 'InputNumber', + }, +]; diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipCombo/vue3/CommonVipComboList.vue b/module-common/src/main/java/org/jeecg/modules/commonVipCombo/vue3/CommonVipComboList.vue new file mode 100644 index 0000000..19725df --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipCombo/vue3/CommonVipComboList.vue @@ -0,0 +1,162 @@ + + + + + \ No newline at end of file diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipCombo/vue3/components/CommonVipComboModal.vue b/module-common/src/main/java/org/jeecg/modules/commonVipCombo/vue3/components/CommonVipComboModal.vue new file mode 100644 index 0000000..b1f877b --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipCombo/vue3/components/CommonVipComboModal.vue @@ -0,0 +1,58 @@ + + + + + \ No newline at end of file diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipInfo/controller/CommonVipInfoController.java b/module-common/src/main/java/org/jeecg/modules/commonVipInfo/controller/CommonVipInfoController.java new file mode 100644 index 0000000..411dce5 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipInfo/controller/CommonVipInfoController.java @@ -0,0 +1,171 @@ +package org.jeecg.modules.commonVipInfo.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.commonVipInfo.entity.CommonVipInfo; +import org.jeecg.modules.commonVipInfo.service.ICommonVipInfoService; + +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: 2025-07-09 + * @Version: V1.0 + */ +@Api(tags="会员信息表") +@RestController +@RequestMapping("/commonVipInfo/commonVipInfo") +@Slf4j +public class CommonVipInfoController extends JeecgController { + @Autowired + private ICommonVipInfoService commonVipInfoService; + + /** + * 分页列表查询 + * + * @param commonVipInfo + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "会员信息表-分页列表查询") + @ApiOperation(value="会员信息表-分页列表查询", notes="会员信息表-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(CommonVipInfo commonVipInfo, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(commonVipInfo, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = commonVipInfoService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param commonVipInfo + * @return + */ + @AutoLog(value = "会员信息表-添加") + @ApiOperation(value="会员信息表-添加", notes="会员信息表-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody CommonVipInfo commonVipInfo) { + commonVipInfoService.save(commonVipInfo); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param commonVipInfo + * @return + */ + @AutoLog(value = "会员信息表-编辑") + @ApiOperation(value="会员信息表-编辑", notes="会员信息表-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody CommonVipInfo commonVipInfo) { + commonVipInfoService.updateById(commonVipInfo); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "会员信息表-通过id删除") + @ApiOperation(value="会员信息表-通过id删除", notes="会员信息表-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + commonVipInfoService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "会员信息表-批量删除") + @ApiOperation(value="会员信息表-批量删除", notes="会员信息表-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.commonVipInfoService.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 queryById(@RequestParam(name="id",required=true) String id) { + CommonVipInfo commonVipInfo = commonVipInfoService.getById(id); + if(commonVipInfo==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(commonVipInfo); + } + + /** + * 导出excel + * + * @param request + * @param commonVipInfo + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, CommonVipInfo commonVipInfo) { + return super.exportXls(request, commonVipInfo, CommonVipInfo.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, CommonVipInfo.class); + } + +} diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipInfo/entity/CommonVipInfo.java b/module-common/src/main/java/org/jeecg/modules/commonVipInfo/entity/CommonVipInfo.java new file mode 100644 index 0000000..87a0a5b --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipInfo/entity/CommonVipInfo.java @@ -0,0 +1,73 @@ +package org.jeecg.modules.commonVipInfo.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.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.jeecg.modules.commonVipCombo.entity.CommonVipCombo; +import org.jeecg.modules.hanHaiMember.entity.HanHaiMember; +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: 2025-07-09 + * @Version: V1.0 + */ +@Data +@TableName("common_vip_info") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="common_vip_info对象", description="会员信息表") +public class CommonVipInfo 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 title; + /**关联会员套餐*/ + @Excel(name = "关联会员套餐", width = 15) + @ApiModelProperty(value = "关联会员套餐") + private java.lang.String comboId; + /**关联用户*/ + @Excel(name = "关联用户", width = 15) + @ApiModelProperty(value = "关联用户") + private java.lang.String userId; + /**会员到期时间*/ + @Excel(name = "会员到期时间", width = 15) + @ApiModelProperty(value = "会员到期时间") + private java.util.Date validTime; + + //会员套餐信息 + @TableField(exist = false) + CommonVipCombo commonVipCombo; +} diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipInfo/mapper/CommonVipInfoMapper.java b/module-common/src/main/java/org/jeecg/modules/commonVipInfo/mapper/CommonVipInfoMapper.java new file mode 100644 index 0000000..ae6d693 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipInfo/mapper/CommonVipInfoMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.commonVipInfo.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.commonVipInfo.entity.CommonVipInfo; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 会员信息表 + * @Author: jeecg-boot + * @Date: 2025-07-09 + * @Version: V1.0 + */ +public interface CommonVipInfoMapper extends BaseMapper { + +} diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipInfo/mapper/xml/CommonVipInfoMapper.xml b/module-common/src/main/java/org/jeecg/modules/commonVipInfo/mapper/xml/CommonVipInfoMapper.xml new file mode 100644 index 0000000..f676e6f --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipInfo/mapper/xml/CommonVipInfoMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipInfo/service/ICommonVipInfoService.java b/module-common/src/main/java/org/jeecg/modules/commonVipInfo/service/ICommonVipInfoService.java new file mode 100644 index 0000000..c7a6603 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipInfo/service/ICommonVipInfoService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.commonVipInfo.service; + +import org.jeecg.modules.commonVipInfo.entity.CommonVipInfo; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 会员信息表 + * @Author: jeecg-boot + * @Date: 2025-07-09 + * @Version: V1.0 + */ +public interface ICommonVipInfoService extends IService { + +} diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipInfo/service/impl/CommonVipInfoServiceImpl.java b/module-common/src/main/java/org/jeecg/modules/commonVipInfo/service/impl/CommonVipInfoServiceImpl.java new file mode 100644 index 0000000..f66bd7c --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipInfo/service/impl/CommonVipInfoServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.commonVipInfo.service.impl; + +import org.jeecg.modules.commonVipInfo.entity.CommonVipInfo; +import org.jeecg.modules.commonVipInfo.mapper.CommonVipInfoMapper; +import org.jeecg.modules.commonVipInfo.service.ICommonVipInfoService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 会员信息表 + * @Author: jeecg-boot + * @Date: 2025-07-09 + * @Version: V1.0 + */ +@Service +public class CommonVipInfoServiceImpl extends ServiceImpl implements ICommonVipInfoService { + +} diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipInfo/vue/CommonVipInfoList.vue b/module-common/src/main/java/org/jeecg/modules/commonVipInfo/vue/CommonVipInfoList.vue new file mode 100644 index 0000000..033c731 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipInfo/vue/CommonVipInfoList.vue @@ -0,0 +1,190 @@ + + + + \ No newline at end of file diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipInfo/vue/modules/CommonVipInfoForm.vue b/module-common/src/main/java/org/jeecg/modules/commonVipInfo/vue/modules/CommonVipInfoForm.vue new file mode 100644 index 0000000..8e1aad8 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipInfo/vue/modules/CommonVipInfoForm.vue @@ -0,0 +1,119 @@ + + + \ No newline at end of file diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipInfo/vue/modules/CommonVipInfoModal.Style#Drawer.vue b/module-common/src/main/java/org/jeecg/modules/commonVipInfo/vue/modules/CommonVipInfoModal.Style#Drawer.vue new file mode 100644 index 0000000..fc80691 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipInfo/vue/modules/CommonVipInfoModal.Style#Drawer.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipInfo/vue/modules/CommonVipInfoModal.vue b/module-common/src/main/java/org/jeecg/modules/commonVipInfo/vue/modules/CommonVipInfoModal.vue new file mode 100644 index 0000000..fac5753 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipInfo/vue/modules/CommonVipInfoModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipInfo/vue3/CommonVipInfo.api.ts b/module-common/src/main/java/org/jeecg/modules/commonVipInfo/vue3/CommonVipInfo.api.ts new file mode 100644 index 0000000..a04ae90 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipInfo/vue3/CommonVipInfo.api.ts @@ -0,0 +1,61 @@ +import {defHttp} from '/@/utils/http/axios'; +import {Modal} from 'ant-design-vue'; + +enum Api { + list = '/commonVipInfo/commonVipInfo/list', + save='/commonVipInfo/commonVipInfo/add', + edit='/commonVipInfo/commonVipInfo/edit', + deleteOne = '/commonVipInfo/commonVipInfo/delete', + deleteBatch = '/commonVipInfo/commonVipInfo/deleteBatch', + importExcel = '/commonVipInfo/commonVipInfo/importExcel', + exportXls = '/commonVipInfo/commonVipInfo/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}); +} diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipInfo/vue3/CommonVipInfo.data.ts b/module-common/src/main/java/org/jeecg/modules/commonVipInfo/vue3/CommonVipInfo.data.ts new file mode 100644 index 0000000..a01ce17 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipInfo/vue3/CommonVipInfo.data.ts @@ -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: 'title' + }, + { + title: '关联会员套餐', + align:"center", + dataIndex: 'comboId' + }, + { + title: '关联用户', + align:"center", + dataIndex: 'userId' + }, + { + title: '会员到期时间', + align:"center", + dataIndex: 'validTime' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '会员名称', + field: 'title', + component: 'Input', + }, + { + label: '关联会员套餐', + field: 'comboId', + component: 'Input', + }, + { + label: '关联用户', + field: 'userId', + component: 'Input', + }, + { + label: '会员到期时间', + field: 'validTime', + component: 'Input', + }, +]; diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipInfo/vue3/CommonVipInfoList.vue b/module-common/src/main/java/org/jeecg/modules/commonVipInfo/vue3/CommonVipInfoList.vue new file mode 100644 index 0000000..3286d87 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipInfo/vue3/CommonVipInfoList.vue @@ -0,0 +1,162 @@ + + + + + \ No newline at end of file diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipInfo/vue3/components/CommonVipInfoModal.vue b/module-common/src/main/java/org/jeecg/modules/commonVipInfo/vue3/components/CommonVipInfoModal.vue new file mode 100644 index 0000000..8a84f5a --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipInfo/vue3/components/CommonVipInfoModal.vue @@ -0,0 +1,58 @@ + + + + + \ No newline at end of file diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipRecord/controller/CommonVipRecordController.java b/module-common/src/main/java/org/jeecg/modules/commonVipRecord/controller/CommonVipRecordController.java new file mode 100644 index 0000000..51cee81 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipRecord/controller/CommonVipRecordController.java @@ -0,0 +1,171 @@ +package org.jeecg.modules.commonVipRecord.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.commonVipRecord.entity.CommonVipRecord; +import org.jeecg.modules.commonVipRecord.service.ICommonVipRecordService; + +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: 2025-07-09 + * @Version: V1.0 + */ +@Api(tags="会员充值记录表") +@RestController +@RequestMapping("/commonVipRecord/commonVipRecord") +@Slf4j +public class CommonVipRecordController extends JeecgController { + @Autowired + private ICommonVipRecordService commonVipRecordService; + + /** + * 分页列表查询 + * + * @param commonVipRecord + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "会员充值记录表-分页列表查询") + @ApiOperation(value="会员充值记录表-分页列表查询", notes="会员充值记录表-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(CommonVipRecord commonVipRecord, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(commonVipRecord, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = commonVipRecordService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param commonVipRecord + * @return + */ + @AutoLog(value = "会员充值记录表-添加") + @ApiOperation(value="会员充值记录表-添加", notes="会员充值记录表-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody CommonVipRecord commonVipRecord) { + commonVipRecordService.save(commonVipRecord); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param commonVipRecord + * @return + */ + @AutoLog(value = "会员充值记录表-编辑") + @ApiOperation(value="会员充值记录表-编辑", notes="会员充值记录表-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody CommonVipRecord commonVipRecord) { + commonVipRecordService.updateById(commonVipRecord); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "会员充值记录表-通过id删除") + @ApiOperation(value="会员充值记录表-通过id删除", notes="会员充值记录表-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + commonVipRecordService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "会员充值记录表-批量删除") + @ApiOperation(value="会员充值记录表-批量删除", notes="会员充值记录表-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.commonVipRecordService.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 queryById(@RequestParam(name="id",required=true) String id) { + CommonVipRecord commonVipRecord = commonVipRecordService.getById(id); + if(commonVipRecord==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(commonVipRecord); + } + + /** + * 导出excel + * + * @param request + * @param commonVipRecord + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, CommonVipRecord commonVipRecord) { + return super.exportXls(request, commonVipRecord, CommonVipRecord.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, CommonVipRecord.class); + } + +} diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipRecord/entity/CommonVipRecord.java b/module-common/src/main/java/org/jeecg/modules/commonVipRecord/entity/CommonVipRecord.java new file mode 100644 index 0000000..c7ca321 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipRecord/entity/CommonVipRecord.java @@ -0,0 +1,70 @@ +package org.jeecg.modules.commonVipRecord.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: 2025-07-09 + * @Version: V1.0 + */ +@Data +@TableName("common_vip_record") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="common_vip_record对象", description="会员充值记录表") +public class CommonVipRecord 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 title; + /**金额*/ + @Excel(name = "金额", width = 15) + @ApiModelProperty(value = "金额") + private java.math.BigDecimal amount; + /**支付时间*/ + @Excel(name = "支付时间", width = 15) + @ApiModelProperty(value = "支付时间") + private java.util.Date payTime; + /**支付状态*/ + @Excel(name = "支付状态", width = 15) + @ApiModelProperty(value = "支付状态") + private java.lang.String status; + /**关联用户*/ + @Excel(name = "关联用户", width = 15) + @ApiModelProperty(value = "关联用户") + private java.lang.String userId; +} diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipRecord/mapper/CommonVipRecordMapper.java b/module-common/src/main/java/org/jeecg/modules/commonVipRecord/mapper/CommonVipRecordMapper.java new file mode 100644 index 0000000..0a7cff3 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipRecord/mapper/CommonVipRecordMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.commonVipRecord.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.commonVipRecord.entity.CommonVipRecord; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 会员充值记录表 + * @Author: jeecg-boot + * @Date: 2025-07-09 + * @Version: V1.0 + */ +public interface CommonVipRecordMapper extends BaseMapper { + +} diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipRecord/mapper/xml/CommonVipRecordMapper.xml b/module-common/src/main/java/org/jeecg/modules/commonVipRecord/mapper/xml/CommonVipRecordMapper.xml new file mode 100644 index 0000000..c235309 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipRecord/mapper/xml/CommonVipRecordMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipRecord/service/ICommonVipRecordService.java b/module-common/src/main/java/org/jeecg/modules/commonVipRecord/service/ICommonVipRecordService.java new file mode 100644 index 0000000..e1a8d20 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipRecord/service/ICommonVipRecordService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.commonVipRecord.service; + +import org.jeecg.modules.commonVipRecord.entity.CommonVipRecord; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 会员充值记录表 + * @Author: jeecg-boot + * @Date: 2025-07-09 + * @Version: V1.0 + */ +public interface ICommonVipRecordService extends IService { + +} diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipRecord/service/impl/CommonVipRecordServiceImpl.java b/module-common/src/main/java/org/jeecg/modules/commonVipRecord/service/impl/CommonVipRecordServiceImpl.java new file mode 100644 index 0000000..83f1aab --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipRecord/service/impl/CommonVipRecordServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.commonVipRecord.service.impl; + +import org.jeecg.modules.commonVipRecord.entity.CommonVipRecord; +import org.jeecg.modules.commonVipRecord.mapper.CommonVipRecordMapper; +import org.jeecg.modules.commonVipRecord.service.ICommonVipRecordService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 会员充值记录表 + * @Author: jeecg-boot + * @Date: 2025-07-09 + * @Version: V1.0 + */ +@Service +public class CommonVipRecordServiceImpl extends ServiceImpl implements ICommonVipRecordService { + +} diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipRecord/vue/CommonVipRecordList.vue b/module-common/src/main/java/org/jeecg/modules/commonVipRecord/vue/CommonVipRecordList.vue new file mode 100644 index 0000000..21984f1 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipRecord/vue/CommonVipRecordList.vue @@ -0,0 +1,196 @@ + + + + \ No newline at end of file diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipRecord/vue/modules/CommonVipRecordForm.vue b/module-common/src/main/java/org/jeecg/modules/commonVipRecord/vue/modules/CommonVipRecordForm.vue new file mode 100644 index 0000000..ea1e7c4 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipRecord/vue/modules/CommonVipRecordForm.vue @@ -0,0 +1,124 @@ + + + \ No newline at end of file diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipRecord/vue/modules/CommonVipRecordModal.Style#Drawer.vue b/module-common/src/main/java/org/jeecg/modules/commonVipRecord/vue/modules/CommonVipRecordModal.Style#Drawer.vue new file mode 100644 index 0000000..a6d221f --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipRecord/vue/modules/CommonVipRecordModal.Style#Drawer.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipRecord/vue/modules/CommonVipRecordModal.vue b/module-common/src/main/java/org/jeecg/modules/commonVipRecord/vue/modules/CommonVipRecordModal.vue new file mode 100644 index 0000000..538c67b --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipRecord/vue/modules/CommonVipRecordModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipRecord/vue3/CommonVipRecord.api.ts b/module-common/src/main/java/org/jeecg/modules/commonVipRecord/vue3/CommonVipRecord.api.ts new file mode 100644 index 0000000..83f7012 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipRecord/vue3/CommonVipRecord.api.ts @@ -0,0 +1,61 @@ +import {defHttp} from '/@/utils/http/axios'; +import {Modal} from 'ant-design-vue'; + +enum Api { + list = '/commonVipRecord/commonVipRecord/list', + save='/commonVipRecord/commonVipRecord/add', + edit='/commonVipRecord/commonVipRecord/edit', + deleteOne = '/commonVipRecord/commonVipRecord/delete', + deleteBatch = '/commonVipRecord/commonVipRecord/deleteBatch', + importExcel = '/commonVipRecord/commonVipRecord/importExcel', + exportXls = '/commonVipRecord/commonVipRecord/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}); +} diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipRecord/vue3/CommonVipRecord.data.ts b/module-common/src/main/java/org/jeecg/modules/commonVipRecord/vue3/CommonVipRecord.data.ts new file mode 100644 index 0000000..adee09e --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipRecord/vue3/CommonVipRecord.data.ts @@ -0,0 +1,63 @@ +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: 'title' + }, + { + title: '金额', + align:"center", + dataIndex: 'amount' + }, + { + title: '支付时间', + align:"center", + dataIndex: 'payTime' + }, + { + title: '支付状态', + align:"center", + dataIndex: 'status' + }, + { + title: '关联用户', + align:"center", + dataIndex: 'userId' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '标题', + field: 'title', + component: 'Input', + }, + { + label: '金额', + field: 'amount', + component: 'InputNumber', + }, + { + label: '支付时间', + field: 'payTime', + component: 'Input', + }, + { + label: '支付状态', + field: 'status', + component: 'Input', + }, + { + label: '关联用户', + field: 'userId', + component: 'Input', + }, +]; diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipRecord/vue3/CommonVipRecordList.vue b/module-common/src/main/java/org/jeecg/modules/commonVipRecord/vue3/CommonVipRecordList.vue new file mode 100644 index 0000000..35915a5 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipRecord/vue3/CommonVipRecordList.vue @@ -0,0 +1,162 @@ + + + + + \ No newline at end of file diff --git a/module-common/src/main/java/org/jeecg/modules/commonVipRecord/vue3/components/CommonVipRecordModal.vue b/module-common/src/main/java/org/jeecg/modules/commonVipRecord/vue3/components/CommonVipRecordModal.vue new file mode 100644 index 0000000..d0e0fb9 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/modules/commonVipRecord/vue3/components/CommonVipRecordModal.vue @@ -0,0 +1,58 @@ + + + + + \ No newline at end of file