diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java index d565286..537c88e 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java @@ -80,6 +80,17 @@ public class ShiroConfig { + + + filterChainDefinitionMap.put("/pay-api/info/getPayShopOne", "anon"); + + filterChainDefinitionMap.put("/school-api/**", "anon"); + + + + + + filterChainDefinitionMap.put("/sys/oss/file/upload", "anon"); //图片上传验证放开 filterChainDefinitionMap.put("/sys/common/upload", "anon"); //图片上传验证放开 filterChainDefinitionMap.put("/sys/cas/client/validateLogin", "anon"); //cas验证登录 diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/controller/PayOrderController.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/controller/PayOrderController.java new file mode 100644 index 0000000..c331861 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/controller/PayOrderController.java @@ -0,0 +1,171 @@ +package org.jeecg.modules.payOrder.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.payOrder.entity.PayOrder; +import org.jeecg.modules.payOrder.service.IPayOrderService; + +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-08-29 + * @Version: V1.0 + */ +@Api(tags="知识付费订单表") +@RestController +@RequestMapping("/payOrder/payOrder") +@Slf4j +public class PayOrderController extends JeecgController { + @Autowired + private IPayOrderService payOrderService; + + /** + * 分页列表查询 + * + * @param payOrder + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "知识付费订单表-分页列表查询") + @ApiOperation(value="知识付费订单表-分页列表查询", notes="知识付费订单表-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(PayOrder payOrder, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(payOrder, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = payOrderService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param payOrder + * @return + */ + @AutoLog(value = "知识付费订单表-添加") + @ApiOperation(value="知识付费订单表-添加", notes="知识付费订单表-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody PayOrder payOrder) { + payOrderService.save(payOrder); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param payOrder + * @return + */ + @AutoLog(value = "知识付费订单表-编辑") + @ApiOperation(value="知识付费订单表-编辑", notes="知识付费订单表-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody PayOrder payOrder) { + payOrderService.updateById(payOrder); + 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) { + payOrderService.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.payOrderService.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) { + PayOrder payOrder = payOrderService.getById(id); + if(payOrder==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(payOrder); + } + + /** + * 导出excel + * + * @param request + * @param payOrder + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, PayOrder payOrder) { + return super.exportXls(request, payOrder, PayOrder.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, PayOrder.class); + } + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/entity/PayOrder.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/entity/PayOrder.java new file mode 100644 index 0000000..eaf311b --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/entity/PayOrder.java @@ -0,0 +1,70 @@ +package org.jeecg.modules.payOrder.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-08-29 + * @Version: V1.0 + */ +@Data +@TableName("pay_order") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="pay_order对象", description="知识付费订单表") +public class PayOrder 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 shopId; + /**订单名称*/ + @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.Integer num; + /**用户*/ + @Excel(name = "用户", width = 15) + @ApiModelProperty(value = "用户") + private java.lang.String userId; +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/mapper/PayOrderMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/mapper/PayOrderMapper.java new file mode 100644 index 0000000..b501ff4 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/mapper/PayOrderMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.payOrder.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.payOrder.entity.PayOrder; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 知识付费订单表 + * @Author: jeecg-boot + * @Date: 2024-08-29 + * @Version: V1.0 + */ +public interface PayOrderMapper extends BaseMapper { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/mapper/xml/PayOrderMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/mapper/xml/PayOrderMapper.xml new file mode 100644 index 0000000..7b0a219 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/mapper/xml/PayOrderMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/service/IPayOrderService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/service/IPayOrderService.java new file mode 100644 index 0000000..09707be --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/service/IPayOrderService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.payOrder.service; + +import org.jeecg.modules.payOrder.entity.PayOrder; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 知识付费订单表 + * @Author: jeecg-boot + * @Date: 2024-08-29 + * @Version: V1.0 + */ +public interface IPayOrderService extends IService { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/service/impl/PayOrderServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/service/impl/PayOrderServiceImpl.java new file mode 100644 index 0000000..9887f8f --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/service/impl/PayOrderServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.payOrder.service.impl; + +import org.jeecg.modules.payOrder.entity.PayOrder; +import org.jeecg.modules.payOrder.mapper.PayOrderMapper; +import org.jeecg.modules.payOrder.service.IPayOrderService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 知识付费订单表 + * @Author: jeecg-boot + * @Date: 2024-08-29 + * @Version: V1.0 + */ +@Service +public class PayOrderServiceImpl extends ServiceImpl implements IPayOrderService { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/vue/PayOrderList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/vue/PayOrderList.vue new file mode 100644 index 0000000..790e535 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/vue/PayOrderList.vue @@ -0,0 +1,195 @@ + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/vue/modules/PayOrderForm.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/vue/modules/PayOrderForm.vue new file mode 100644 index 0000000..73521de --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/vue/modules/PayOrderForm.vue @@ -0,0 +1,124 @@ + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/vue/modules/PayOrderModal.Style#Drawer.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/vue/modules/PayOrderModal.Style#Drawer.vue new file mode 100644 index 0000000..d5d01b2 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/vue/modules/PayOrderModal.Style#Drawer.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/vue/modules/PayOrderModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/vue/modules/PayOrderModal.vue new file mode 100644 index 0000000..26cb93e --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/vue/modules/PayOrderModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/vue3/PayOrder.api.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/vue3/PayOrder.api.ts new file mode 100644 index 0000000..5050c78 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/vue3/PayOrder.api.ts @@ -0,0 +1,61 @@ +import {defHttp} from '/@/utils/http/axios'; +import {Modal} from 'ant-design-vue'; + +enum Api { + list = '/payOrder/payOrder/list', + save='/payOrder/payOrder/add', + edit='/payOrder/payOrder/edit', + deleteOne = '/payOrder/payOrder/delete', + deleteBatch = '/payOrder/payOrder/deleteBatch', + importExcel = '/payOrder/payOrder/importExcel', + exportXls = '/payOrder/payOrder/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/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/vue3/PayOrder.data.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/vue3/PayOrder.data.ts new file mode 100644 index 0000000..80a49c0 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/vue3/PayOrder.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: 'shopId' + }, + { + title: '订单名称', + align:"center", + dataIndex: 'title' + }, + { + title: '价格', + align:"center", + dataIndex: 'price' + }, + { + title: '数量', + align:"center", + dataIndex: 'num' + }, + { + title: '用户', + align:"center", + dataIndex: 'userId' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '商品标识', + field: 'shopId', + component: 'Input', + }, + { + label: '订单名称', + field: 'title', + component: 'Input', + }, + { + label: '价格', + field: 'price', + component: 'InputNumber', + }, + { + label: '数量', + field: 'num', + component: 'InputNumber', + }, + { + label: '用户', + field: 'userId', + component: 'Input', + }, +]; diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/vue3/PayOrderList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/vue3/PayOrderList.vue new file mode 100644 index 0000000..1935da9 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/vue3/PayOrderList.vue @@ -0,0 +1,162 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/vue3/components/PayOrderModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/vue3/components/PayOrderModal.vue new file mode 100644 index 0000000..262e465 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payOrder/vue3/components/PayOrderModal.vue @@ -0,0 +1,58 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/controller/PayShopController.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/controller/PayShopController.java new file mode 100644 index 0000000..0224885 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/controller/PayShopController.java @@ -0,0 +1,171 @@ +package org.jeecg.modules.payShop.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.payShop.entity.PayShop; +import org.jeecg.modules.payShop.service.IPayShopService; + +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-08-29 + * @Version: V1.0 + */ +@Api(tags="付费商品修改表") +@RestController +@RequestMapping("/payShop/payShop") +@Slf4j +public class PayShopController extends JeecgController { + @Autowired + private IPayShopService payShopService; + + /** + * 分页列表查询 + * + * @param payShop + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "付费商品修改表-分页列表查询") + @ApiOperation(value="付费商品修改表-分页列表查询", notes="付费商品修改表-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(PayShop payShop, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(payShop, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = payShopService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param payShop + * @return + */ + @AutoLog(value = "付费商品修改表-添加") + @ApiOperation(value="付费商品修改表-添加", notes="付费商品修改表-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody PayShop payShop) { + payShopService.save(payShop); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param payShop + * @return + */ + @AutoLog(value = "付费商品修改表-编辑") + @ApiOperation(value="付费商品修改表-编辑", notes="付费商品修改表-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody PayShop payShop) { + payShopService.updateById(payShop); + 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) { + payShopService.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.payShopService.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) { + PayShop payShop = payShopService.getById(id); + if(payShop==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(payShop); + } + + /** + * 导出excel + * + * @param request + * @param payShop + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, PayShop payShop) { + return super.exportXls(request, payShop, PayShop.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, PayShop.class); + } + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/entity/PayShop.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/entity/PayShop.java new file mode 100644 index 0000000..7ff3158 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/entity/PayShop.java @@ -0,0 +1,82 @@ +package org.jeecg.modules.payShop.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-08-29 + * @Version: V1.0 + */ +@Data +@TableName("pay_shop") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="pay_shop对象", description="付费商品修改表") +public class PayShop 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 image; + /**标题*/ + @Excel(name = "标题", width = 15) + @ApiModelProperty(value = "标题") + private java.lang.String title; + /**内容*/ + @Excel(name = "内容", width = 15) + @ApiModelProperty(value = "内容") + private java.lang.String titleText; + /**级别*/ + @Excel(name = "级别", width = 15) + @ApiModelProperty(value = "级别") + private java.lang.String classValue; + /**购买人数*/ + @Excel(name = "购买人数", width = 15) + @ApiModelProperty(value = "购买人数") + private java.lang.String num; + /**价格*/ + @Excel(name = "价格", width = 15) + @ApiModelProperty(value = "价格") + private java.math.BigDecimal price; + /**原价*/ + @Excel(name = "原价", width = 15) + @ApiModelProperty(value = "原价") + private java.math.BigDecimal oldPrice; + /**资源介绍*/ + @Excel(name = "资源介绍", width = 15) + @ApiModelProperty(value = "资源介绍") + private java.lang.String content; +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/mapper/PayShopMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/mapper/PayShopMapper.java new file mode 100644 index 0000000..d6dae60 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/mapper/PayShopMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.payShop.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.payShop.entity.PayShop; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 付费商品修改表 + * @Author: jeecg-boot + * @Date: 2024-08-29 + * @Version: V1.0 + */ +public interface PayShopMapper extends BaseMapper { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/mapper/xml/PayShopMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/mapper/xml/PayShopMapper.xml new file mode 100644 index 0000000..c122179 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/mapper/xml/PayShopMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/service/IPayShopService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/service/IPayShopService.java new file mode 100644 index 0000000..b9edab2 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/service/IPayShopService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.payShop.service; + +import org.jeecg.modules.payShop.entity.PayShop; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 付费商品修改表 + * @Author: jeecg-boot + * @Date: 2024-08-29 + * @Version: V1.0 + */ +public interface IPayShopService extends IService { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/service/impl/PayShopServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/service/impl/PayShopServiceImpl.java new file mode 100644 index 0000000..fdcd7b1 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/service/impl/PayShopServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.payShop.service.impl; + +import org.jeecg.modules.payShop.entity.PayShop; +import org.jeecg.modules.payShop.mapper.PayShopMapper; +import org.jeecg.modules.payShop.service.IPayShopService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 付费商品修改表 + * @Author: jeecg-boot + * @Date: 2024-08-29 + * @Version: V1.0 + */ +@Service +public class PayShopServiceImpl extends ServiceImpl implements IPayShopService { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/vue/PayShopList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/vue/PayShopList.vue new file mode 100644 index 0000000..7ea84f4 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/vue/PayShopList.vue @@ -0,0 +1,209 @@ + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/vue/modules/PayShopForm.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/vue/modules/PayShopForm.vue new file mode 100644 index 0000000..e828b4a --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/vue/modules/PayShopForm.vue @@ -0,0 +1,139 @@ + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/vue/modules/PayShopModal.Style#Drawer.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/vue/modules/PayShopModal.Style#Drawer.vue new file mode 100644 index 0000000..56195c9 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/vue/modules/PayShopModal.Style#Drawer.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/vue/modules/PayShopModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/vue/modules/PayShopModal.vue new file mode 100644 index 0000000..8be2583 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/vue/modules/PayShopModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/vue3/PayShop.api.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/vue3/PayShop.api.ts new file mode 100644 index 0000000..fdb5102 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/vue3/PayShop.api.ts @@ -0,0 +1,61 @@ +import {defHttp} from '/@/utils/http/axios'; +import {Modal} from 'ant-design-vue'; + +enum Api { + list = '/payShop/payShop/list', + save='/payShop/payShop/add', + edit='/payShop/payShop/edit', + deleteOne = '/payShop/payShop/delete', + deleteBatch = '/payShop/payShop/deleteBatch', + importExcel = '/payShop/payShop/importExcel', + exportXls = '/payShop/payShop/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/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/vue3/PayShop.data.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/vue3/PayShop.data.ts new file mode 100644 index 0000000..0d591b2 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/vue3/PayShop.data.ts @@ -0,0 +1,91 @@ +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: 'image', + customRender:render.renderAvatar, + }, + { + title: '标题', + align:"center", + dataIndex: 'title' + }, + { + title: '内容', + align:"center", + dataIndex: 'titleText' + }, + { + title: '级别', + align:"center", + dataIndex: 'classValue' + }, + { + title: '购买人数', + align:"center", + dataIndex: 'num' + }, + { + title: '价格', + align:"center", + dataIndex: 'price' + }, + { + title: '原价', + align:"center", + dataIndex: 'oldPrice' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '图片', + field: 'image', + component: 'JImageUpload', + componentProps:{ + }, + }, + { + label: '标题', + field: 'title', + component: 'Input', + }, + { + label: '内容', + field: 'titleText', + component: 'Input', + }, + { + label: '级别', + field: 'classValue', + component: 'Input', + }, + { + label: '购买人数', + field: 'num', + component: 'Input', + }, + { + label: '价格', + field: 'price', + component: 'InputNumber', + }, + { + label: '原价', + field: 'oldPrice', + component: 'InputNumber', + }, + { + label: '资源介绍', + field: 'content', + component: 'JCodeEditor', //TODO String后缀暂未添加 + }, +]; diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/vue3/PayShopList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/vue3/PayShopList.vue new file mode 100644 index 0000000..8447ee0 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/vue3/PayShopList.vue @@ -0,0 +1,162 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/vue3/components/PayShopModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/vue3/components/PayShopModal.vue new file mode 100644 index 0000000..f557b7c --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/payShop/vue3/components/PayShopModal.vue @@ -0,0 +1,58 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/controller/ShcoolSubController.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/controller/ShcoolSubController.java new file mode 100644 index 0000000..9c880f4 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/controller/ShcoolSubController.java @@ -0,0 +1,171 @@ +package org.jeecg.modules.shcoolSub.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.shcoolSub.entity.ShcoolSub; +import org.jeecg.modules.shcoolSub.service.IShcoolSubService; + +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-08-29 + * @Version: V1.0 + */ +@Api(tags="报修表") +@RestController +@RequestMapping("/shcoolSub/shcoolSub") +@Slf4j +public class ShcoolSubController extends JeecgController { + @Autowired + private IShcoolSubService shcoolSubService; + + /** + * 分页列表查询 + * + * @param shcoolSub + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "报修表-分页列表查询") + @ApiOperation(value="报修表-分页列表查询", notes="报修表-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(ShcoolSub shcoolSub, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(shcoolSub, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = shcoolSubService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param shcoolSub + * @return + */ + @AutoLog(value = "报修表-添加") + @ApiOperation(value="报修表-添加", notes="报修表-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody ShcoolSub shcoolSub) { + shcoolSubService.save(shcoolSub); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param shcoolSub + * @return + */ + @AutoLog(value = "报修表-编辑") + @ApiOperation(value="报修表-编辑", notes="报修表-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody ShcoolSub shcoolSub) { + shcoolSubService.updateById(shcoolSub); + 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) { + shcoolSubService.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.shcoolSubService.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) { + ShcoolSub shcoolSub = shcoolSubService.getById(id); + if(shcoolSub==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(shcoolSub); + } + + /** + * 导出excel + * + * @param request + * @param shcoolSub + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, ShcoolSub shcoolSub) { + return super.exportXls(request, shcoolSub, ShcoolSub.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, ShcoolSub.class); + } + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/entity/ShcoolSub.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/entity/ShcoolSub.java new file mode 100644 index 0000000..a7ab016 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/entity/ShcoolSub.java @@ -0,0 +1,110 @@ +package org.jeecg.modules.shcoolSub.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-08-29 + * @Version: V1.0 + */ +@Data +@TableName("shcool_sub") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="shcool_sub对象", description="报修表") +public class ShcoolSub 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 building; + /**室号*/ + @Excel(name = "室号", width = 15) + @ApiModelProperty(value = "室号") + private java.lang.String room; + /**项目*/ + @Excel(name = "项目", width = 15) + @ApiModelProperty(value = "项目") + private java.lang.String project; + /**姓名*/ + @Excel(name = "姓名", width = 15) + @ApiModelProperty(value = "姓名") + private java.lang.String name; + /**简介*/ + @Excel(name = "简介", width = 15) + @ApiModelProperty(value = "简介") + private java.lang.String context; + /**电话*/ + @Excel(name = "电话", width = 15) + @ApiModelProperty(value = "电话") + private java.lang.String phone; + /**照片*/ + @Excel(name = "照片", width = 15) + @ApiModelProperty(value = "照片") + private java.lang.String image; + /**用户标识*/ + @Excel(name = "用户标识", width = 15) + @ApiModelProperty(value = "用户标识") + private java.lang.String userId; + /**状态*/ + @Excel(name = "状态", width = 15) + @ApiModelProperty(value = "状态") + private java.lang.String state; + /**结单/驳回*/ + @Excel(name = "结单/驳回", width = 15) + @ApiModelProperty(value = "结单/驳回") + private java.lang.String cleckState; + /**驳回原因*/ + @Excel(name = "驳回原因", width = 15) + @ApiModelProperty(value = "驳回原因") + private java.lang.String returnValue; + /**结单结果*/ + @Excel(name = "结单结果", width = 15) + @ApiModelProperty(value = "结单结果") + private java.lang.String successTitle; + /**结单金额*/ + @Excel(name = "结单金额", width = 15) + @ApiModelProperty(value = "结单金额") + private java.math.BigDecimal successPrice; + /**处理说明*/ + @Excel(name = "处理说明", width = 15) + @ApiModelProperty(value = "处理说明") + private java.lang.String sucessText; + /**照片*/ + @Excel(name = "照片", width = 15) + @ApiModelProperty(value = "照片") + private java.lang.String successImage; +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/mapper/ShcoolSubMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/mapper/ShcoolSubMapper.java new file mode 100644 index 0000000..c6b0a82 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/mapper/ShcoolSubMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.shcoolSub.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.shcoolSub.entity.ShcoolSub; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 报修表 + * @Author: jeecg-boot + * @Date: 2024-08-29 + * @Version: V1.0 + */ +public interface ShcoolSubMapper extends BaseMapper { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/mapper/xml/ShcoolSubMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/mapper/xml/ShcoolSubMapper.xml new file mode 100644 index 0000000..a05ada2 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/mapper/xml/ShcoolSubMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/service/IShcoolSubService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/service/IShcoolSubService.java new file mode 100644 index 0000000..6e124e1 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/service/IShcoolSubService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.shcoolSub.service; + +import org.jeecg.modules.shcoolSub.entity.ShcoolSub; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 报修表 + * @Author: jeecg-boot + * @Date: 2024-08-29 + * @Version: V1.0 + */ +public interface IShcoolSubService extends IService { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/service/impl/ShcoolSubServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/service/impl/ShcoolSubServiceImpl.java new file mode 100644 index 0000000..ab90074 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/service/impl/ShcoolSubServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.shcoolSub.service.impl; + +import org.jeecg.modules.shcoolSub.entity.ShcoolSub; +import org.jeecg.modules.shcoolSub.mapper.ShcoolSubMapper; +import org.jeecg.modules.shcoolSub.service.IShcoolSubService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 报修表 + * @Author: jeecg-boot + * @Date: 2024-08-29 + * @Version: V1.0 + */ +@Service +public class ShcoolSubServiceImpl extends ServiceImpl implements IShcoolSubService { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/vue/ShcoolSubList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/vue/ShcoolSubList.vue new file mode 100644 index 0000000..4ac20bb --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/vue/ShcoolSubList.vue @@ -0,0 +1,256 @@ + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/vue/modules/ShcoolSubForm.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/vue/modules/ShcoolSubForm.vue new file mode 100644 index 0000000..5831aaa --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/vue/modules/ShcoolSubForm.vue @@ -0,0 +1,174 @@ + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/vue/modules/ShcoolSubModal.Style#Drawer.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/vue/modules/ShcoolSubModal.Style#Drawer.vue new file mode 100644 index 0000000..5f63f7f --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/vue/modules/ShcoolSubModal.Style#Drawer.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/vue/modules/ShcoolSubModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/vue/modules/ShcoolSubModal.vue new file mode 100644 index 0000000..eaf4dab --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/vue/modules/ShcoolSubModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/vue3/ShcoolSub.api.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/vue3/ShcoolSub.api.ts new file mode 100644 index 0000000..744c4ad --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/vue3/ShcoolSub.api.ts @@ -0,0 +1,61 @@ +import {defHttp} from '/@/utils/http/axios'; +import {Modal} from 'ant-design-vue'; + +enum Api { + list = '/shcoolSub/shcoolSub/list', + save='/shcoolSub/shcoolSub/add', + edit='/shcoolSub/shcoolSub/edit', + deleteOne = '/shcoolSub/shcoolSub/delete', + deleteBatch = '/shcoolSub/shcoolSub/deleteBatch', + importExcel = '/shcoolSub/shcoolSub/importExcel', + exportXls = '/shcoolSub/shcoolSub/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/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/vue3/ShcoolSub.data.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/vue3/ShcoolSub.data.ts new file mode 100644 index 0000000..76c738f --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/vue3/ShcoolSub.data.ts @@ -0,0 +1,166 @@ +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: 'building' + }, + { + title: '室号', + align:"center", + dataIndex: 'room' + }, + { + title: '项目', + align:"center", + dataIndex: 'project' + }, + { + title: '姓名', + align:"center", + dataIndex: 'name' + }, + { + title: '简介', + align:"center", + dataIndex: 'context' + }, + { + title: '电话', + align:"center", + dataIndex: 'phone' + }, + { + title: '照片', + align:"center", + dataIndex: 'image', + customRender:render.renderAvatar, + }, + { + title: '用户标识', + align:"center", + dataIndex: 'userId' + }, + { + title: '状态', + align:"center", + dataIndex: 'state' + }, + { + title: '结单/驳回', + align:"center", + dataIndex: 'cleckState' + }, + { + title: '驳回原因', + align:"center", + dataIndex: 'returnValue' + }, + { + title: '结单结果', + align:"center", + dataIndex: 'successTitle' + }, + { + title: '结单金额', + align:"center", + dataIndex: 'successPrice' + }, + { + title: '处理说明', + align:"center", + dataIndex: 'sucessText' + }, + { + title: '照片', + align:"center", + dataIndex: 'successImage' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '楼栋', + field: 'building', + component: 'Input', + }, + { + label: '室号', + field: 'room', + component: 'Input', + }, + { + label: '项目', + field: 'project', + component: 'Input', + }, + { + label: '姓名', + field: 'name', + component: 'Input', + }, + { + label: '简介', + field: 'context', + component: 'InputTextArea',//TODO 注意string转换问题 + }, + { + label: '电话', + field: 'phone', + component: 'Input', + }, + { + label: '照片', + field: 'image', + component: 'JImageUpload', + componentProps:{ + }, + }, + { + label: '用户标识', + field: 'userId', + component: 'Input', + }, + { + label: '状态', + field: 'state', + component: 'Input', + }, + { + label: '结单/驳回', + field: 'cleckState', + component: 'Input', + }, + { + label: '驳回原因', + field: 'returnValue', + component: 'Input', + }, + { + label: '结单结果', + field: 'successTitle', + component: 'Input', + }, + { + label: '结单金额', + field: 'successPrice', + component: 'InputNumber', + }, + { + label: '处理说明', + field: 'sucessText', + component: 'Input', + }, + { + label: '照片', + field: 'successImage', + component: 'Input', + }, +]; diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/vue3/ShcoolSubList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/vue3/ShcoolSubList.vue new file mode 100644 index 0000000..a01f737 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/vue3/ShcoolSubList.vue @@ -0,0 +1,162 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/vue3/components/ShcoolSubModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/vue3/components/ShcoolSubModal.vue new file mode 100644 index 0000000..be54a26 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/shcoolSub/vue3/components/ShcoolSubModal.vue @@ -0,0 +1,58 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/config/shiro/ShiroConfig.class b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/config/shiro/ShiroConfig.class index 8f7712f..7e83e9b 100644 Binary files a/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/config/shiro/ShiroConfig.class and b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/config/shiro/ShiroConfig.class differ diff --git a/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payOrder/controller/PayOrderController.class b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payOrder/controller/PayOrderController.class new file mode 100644 index 0000000..eef42e5 Binary files /dev/null and b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payOrder/controller/PayOrderController.class differ diff --git a/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payOrder/entity/PayOrder.class b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payOrder/entity/PayOrder.class new file mode 100644 index 0000000..7d4706c Binary files /dev/null and b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payOrder/entity/PayOrder.class differ diff --git a/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payOrder/mapper/PayOrderMapper.class b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payOrder/mapper/PayOrderMapper.class new file mode 100644 index 0000000..c6477c1 Binary files /dev/null and b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payOrder/mapper/PayOrderMapper.class differ diff --git a/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payOrder/mapper/xml/PayOrderMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payOrder/mapper/xml/PayOrderMapper.xml new file mode 100644 index 0000000..7b0a219 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payOrder/mapper/xml/PayOrderMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payOrder/service/IPayOrderService.class b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payOrder/service/IPayOrderService.class new file mode 100644 index 0000000..8e4a906 Binary files /dev/null and b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payOrder/service/IPayOrderService.class differ diff --git a/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payOrder/service/impl/PayOrderServiceImpl.class b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payOrder/service/impl/PayOrderServiceImpl.class new file mode 100644 index 0000000..af3fec9 Binary files /dev/null and b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payOrder/service/impl/PayOrderServiceImpl.class differ diff --git a/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payShop/controller/PayShopController.class b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payShop/controller/PayShopController.class new file mode 100644 index 0000000..b35e5e6 Binary files /dev/null and b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payShop/controller/PayShopController.class differ diff --git a/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payShop/entity/PayShop.class b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payShop/entity/PayShop.class new file mode 100644 index 0000000..7bec725 Binary files /dev/null and b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payShop/entity/PayShop.class differ diff --git a/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payShop/mapper/PayShopMapper.class b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payShop/mapper/PayShopMapper.class new file mode 100644 index 0000000..51f11bb Binary files /dev/null and b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payShop/mapper/PayShopMapper.class differ diff --git a/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payShop/mapper/xml/PayShopMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payShop/mapper/xml/PayShopMapper.xml new file mode 100644 index 0000000..c122179 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payShop/mapper/xml/PayShopMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payShop/service/IPayShopService.class b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payShop/service/IPayShopService.class new file mode 100644 index 0000000..37927ef Binary files /dev/null and b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payShop/service/IPayShopService.class differ diff --git a/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payShop/service/impl/PayShopServiceImpl.class b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payShop/service/impl/PayShopServiceImpl.class new file mode 100644 index 0000000..c9b8bbd Binary files /dev/null and b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/payShop/service/impl/PayShopServiceImpl.class differ diff --git a/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/shcoolSub/controller/ShcoolSubController.class b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/shcoolSub/controller/ShcoolSubController.class new file mode 100644 index 0000000..d238bf8 Binary files /dev/null and b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/shcoolSub/controller/ShcoolSubController.class differ diff --git a/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/shcoolSub/entity/ShcoolSub.class b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/shcoolSub/entity/ShcoolSub.class new file mode 100644 index 0000000..bc4ec24 Binary files /dev/null and b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/shcoolSub/entity/ShcoolSub.class differ diff --git a/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/shcoolSub/mapper/ShcoolSubMapper.class b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/shcoolSub/mapper/ShcoolSubMapper.class new file mode 100644 index 0000000..5e6f286 Binary files /dev/null and b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/shcoolSub/mapper/ShcoolSubMapper.class differ diff --git a/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/shcoolSub/mapper/xml/ShcoolSubMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/shcoolSub/mapper/xml/ShcoolSubMapper.xml new file mode 100644 index 0000000..a05ada2 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/shcoolSub/mapper/xml/ShcoolSubMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/shcoolSub/service/IShcoolSubService.class b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/shcoolSub/service/IShcoolSubService.class new file mode 100644 index 0000000..926503a Binary files /dev/null and b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/shcoolSub/service/IShcoolSubService.class differ diff --git a/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/shcoolSub/service/impl/ShcoolSubServiceImpl.class b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/shcoolSub/service/impl/ShcoolSubServiceImpl.class new file mode 100644 index 0000000..ec5f0ca Binary files /dev/null and b/jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/shcoolSub/service/impl/ShcoolSubServiceImpl.class differ diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/payController/PayApiIndexController.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/payController/PayApiIndexController.java new file mode 100644 index 0000000..2393dc6 --- /dev/null +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/payController/PayApiIndexController.java @@ -0,0 +1,76 @@ +package org.jeecg.modules.api.payController; + + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.jboss.jandex.Index; +import org.jeecg.common.api.vo.Result; +import org.jeecg.modules.apiservice.IndexApiService; +import org.jeecg.modules.apiservice.InfoApiService; +import org.jeecg.modules.bean.WaterPageBean; +import org.jeecg.modules.hanHaiMember.entity.HanHaiMember; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +@Api(tags="知识付费小程序-接口部分") +@RestController +@RequestMapping("/pay-api/info") +@Slf4j +public class PayApiIndexController { + + + //获取个人中心接口 + @Resource + private InfoApiService infoApiService; + + //获取首页接口 + + @Resource + private IndexApiService indexApiService; + + //获取个人信息接口 + @ApiOperation(value="小程序-获取个人信息接口", notes="小程序-获取个人信息接口") + @GetMapping("/getInfo") + public Result getInfo(@RequestHeader("X-Access-Token") String token) + { + return infoApiService.getInfo(token); + } + + + //修改个人信息接口 + @ApiOperation(value="小程序-修改个人信息接口", notes="小程序-修改个人信息接口") + @PostMapping("/updateInfo") + public Result updateInfo(@RequestHeader("X-Access-Token") String token, HanHaiMember bean) + { + return infoApiService.updateInfo(token,bean); + } + + + //获取商品信息 + @ApiOperation(value="小程序-获取商品信息", notes="小程序-获取商品信息") + @GetMapping("/getPayShopOne") + public Result getPayShopOne(){ + return indexApiService.getPayShopOne(); + } + + //获取订单列表 + @ApiOperation(value="小程序-获取订单列表", notes="小程序-获取订单列表") + @GetMapping("/getPayOrderPage") + public Result getPayOrderPage(@RequestHeader("X-Access-Token") String token, WaterPageBean bean){ + return indexApiService.getPayOrderPage(token,bean); + } + + + //创建支付订单 + @ApiOperation(value="小程序-创建支付订单", notes="小程序-创建支付订单") + @PostMapping("/createPayOrder") + public Result createPayOrder(@RequestHeader("X-Access-Token") String token,String shopId,Integer num){ + return indexApiService.createPayOrder(token,shopId,num); + } + + + + +} diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/payController/PayLoginController.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/payController/PayLoginController.java new file mode 100644 index 0000000..cc9d632 --- /dev/null +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/payController/PayLoginController.java @@ -0,0 +1,51 @@ +package org.jeecg.modules.api.payController; + + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.jeecg.common.api.vo.Result; +import org.jeecg.modules.apiservice.LoginApiService; +import org.jeecg.modules.bean.LoginReq; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; + +@Api(tags="知识付费小程序-登录相关接口") +@RestController +@RequestMapping("/pay-api/login") +@Slf4j +public class PayLoginController { + + + //授权登录 + @Resource + private LoginApiService loginApiService; + + + //小程序授权登录 + @ApiOperation(value="小程序-登录接口", notes="小程序-登录接口") + @GetMapping("/login") + public Result login(LoginReq loginReq){ + return loginApiService.login(loginReq); + } + + + //获取用户协议 + @ApiOperation(value="小程序-获取用户协议", notes="小程序-获取用户协议") + @GetMapping("/getUserAgreement") + public Result getUserAgreement(){ + return loginApiService.getUserAgreement(); + } + + + //获取隐私政策 + @ApiOperation(value="小程序-获取隐私政策", notes="小程序-获取隐私政策") + @GetMapping("/getPrivacyPolicy") + public Result getPrivacyPolicy(){ + return loginApiService.getPrivacyPolicy(); + } + +} diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/schoolcontroller/SchoolApiController.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/schoolcontroller/SchoolApiController.java new file mode 100644 index 0000000..d79e974 --- /dev/null +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/schoolcontroller/SchoolApiController.java @@ -0,0 +1,66 @@ +package org.jeecg.modules.api.schoolcontroller; + + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.jeecg.common.api.vo.Result; +import org.jeecg.modules.apiservice.IndexApiService; +import org.jeecg.modules.bean.WaterPageBean; +import org.jeecg.modules.shcoolSub.entity.ShcoolSub; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; + +@Api(tags="报修小程序-报修相关接口") +@RestController +@RequestMapping("/school-api") +@Slf4j +public class SchoolApiController { + + + //获取首页接口 + + @Resource + private IndexApiService indexApiService; + + + //增加报修单 + @ApiOperation(value="小程序-增加报修单", notes="小程序-增加报修单") + @GetMapping("/addSchoolOrder") + public Result addSchoolOrder(ShcoolSub bean){ + return indexApiService.addSchoolOrder(bean); + } + + //驳回 + @ApiOperation(value="小程序-驳回", notes="小程序-驳回") + @GetMapping("/editSchoolOrderError") + public Result editSchoolOrderError(ShcoolSub bean){ + return indexApiService.editSchoolOrderError(bean); + } + + //结单 + @ApiOperation(value="小程序-结单", notes="小程序-结单") + @GetMapping("/editSchoolOrderSuccess") + public Result editSchoolOrderSuccess(ShcoolSub bean){ + return indexApiService.editSchoolOrderSuccess(bean); + } + + + //列表 + @ApiOperation(value="小程序-报修列表", notes="小程序-报修列表") + @GetMapping("/getSchoolOrderPage") + public Result getSchoolOrderPage(String state, WaterPageBean bean){ + return indexApiService.getSchoolOrderPage(state,bean); + } + + + + + + + + +} diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiservice/IndexApiService.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiservice/IndexApiService.java index 794e4e1..259e59d 100644 --- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiservice/IndexApiService.java +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiservice/IndexApiService.java @@ -2,8 +2,10 @@ package org.jeecg.modules.apiservice; import org.jeecg.common.api.vo.Result; import org.jeecg.modules.apiBean.ActorSetPageBean; +import org.jeecg.modules.apiBean.OrderPayBean; import org.jeecg.modules.apiBean.TrendsBean; import org.jeecg.modules.bean.WaterPageBean; +import org.jeecg.modules.shcoolSub.entity.ShcoolSub; public interface IndexApiService { @@ -32,4 +34,35 @@ public interface IndexApiService { //获取投诉原因 Result getComplaintReason(); + //获取商品信息 + Result getPayShopOne(); + + //获取订单列表 + Result getPayOrderPage(String token, WaterPageBean bean); + + + //创建支付订单 + Result createPayOrder(String token, String shopId,Integer num); + + + + + //增加报修单 + Result addSchoolOrder(ShcoolSub bean); + + //驳回 + Result editSchoolOrderError(ShcoolSub bean); + + //结单 + Result editSchoolOrderSuccess(ShcoolSub bean); + + + //列表 + Result getSchoolOrderPage(String state,WaterPageBean bean); + + + + + + } diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiservice/impl/IndexApiServiceImpl.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiservice/impl/IndexApiServiceImpl.java index c7921a8..6e5eefe 100644 --- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiservice/impl/IndexApiServiceImpl.java +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiservice/impl/IndexApiServiceImpl.java @@ -1,6 +1,7 @@ package org.jeecg.modules.apiservice.impl; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.commons.lang.StringUtils; import org.jeecg.common.api.vo.Result; import org.jeecg.common.util.RedisUtil; import org.jeecg.config.shiro.ShiroRealm; @@ -25,9 +26,17 @@ import org.jeecg.modules.hanHaiMember.service.IHanHaiMemberService; import org.jeecg.modules.hanHaiWater.entity.HanHaiWater; import org.jeecg.modules.hanHanBanner.entity.HanHaiBanner; import org.jeecg.modules.hanHanBanner.service.IHanHaiBannerService; +import org.jeecg.modules.payOrder.entity.PayOrder; +import org.jeecg.modules.payOrder.service.IPayOrderService; +import org.jeecg.modules.payShop.entity.PayShop; +import org.jeecg.modules.payShop.service.IPayShopService; +import org.jeecg.modules.shcoolSub.entity.ShcoolSub; +import org.jeecg.modules.shcoolSub.service.IShcoolSubService; import org.springframework.stereotype.Service; import javax.annotation.Resource; +import java.math.BigDecimal; +import java.util.Date; import java.util.List; @Service @@ -131,4 +140,120 @@ public class IndexApiServiceImpl implements IndexApiService { } + + + @Resource + private IPayShopService payShopService; + @Resource + private IPayOrderService payOrderService; + + + //获取商品信息 + @Override + public Result getPayShopOne(){ + PayShop payShop = payShopService.list().get(0); + return Result.OK("查询成功",payShop); + } + + //获取订单列表 + @Override + public Result getPayOrderPage(String token, WaterPageBean bean){ + HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); + Page page = new Page(bean.getPageNo(), bean.getPageSize()); + Page pageList = payOrderService + .lambdaQuery() + .orderByDesc(PayOrder::getCreateTime) + .eq(PayOrder::getUserId,hanHaiMember.getId()) + .page(page); + return Result.OK("订单列表",pageList); + } + + + //创建支付订单 + @Override + public Result createPayOrder(String token, String shopId,Integer num){ + HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); + //判断商品标识不能为空 + if(StringUtils.isBlank(shopId)){ + return Result.error("商品标识不能为空"); + } + //判断数量不能为空 + if(num == null){ + return Result.error("数量不能为空"); + } + //判断数量不能为空 + if(num < 1){ + return Result.error("购买数量不能小于1"); + } + + //查询当前商品信息 + PayShop byId = payShopService.getById(shopId); + + //创建支付订单 + PayOrder order = new PayOrder(); + order.setCreateTime(new Date()); + order.setPrice(byId.getPrice().multiply(new BigDecimal(num))); + order.setNum(num); + order.setUserId(hanHaiMember.getId()); + order.setTitle(byId.getTitle()+"购买"); + + payOrderService.save(order); + return Result.OK("订单创建成功"); + } + + + + + + @Resource + private IShcoolSubService shcoolSubService; + + //增加报修单 + @Override + public Result addSchoolOrder(ShcoolSub bean){ + shcoolSubService.save(bean); + return Result.OK("增加成功"); + } + + //驳回 + @Override + public Result editSchoolOrderError(ShcoolSub bean){ + if(StringUtils.isBlank(bean.getId())){ + return Result.error("订单标识不能为空"); + } + shcoolSubService.updateById(bean); + return Result.OK("驳回成功"); + } + + //结单 + @Override + public Result editSchoolOrderSuccess(ShcoolSub bean){ + if(StringUtils.isBlank(bean.getId())){ + return Result.error("订单标识不能为空"); + } + shcoolSubService.updateById(bean); + return Result.OK("结单成功"); + } + + + //列表 + @Override + public Result getSchoolOrderPage(String state,WaterPageBean bean){ + Page page = new Page(bean.getPageNo(), bean.getPageSize()); + Page pageList = shcoolSubService + .lambdaQuery() + .orderByDesc(ShcoolSub::getCreateTime) + .page(page); + + if(StringUtils.isNotBlank(state)){ + pageList = shcoolSubService + .lambdaQuery() + .orderByDesc(ShcoolSub::getCreateTime) + .eq(ShcoolSub::getState,state) + .page(page); + } + return Result.OK("订单列表",pageList); + } + + }