|
@@ -0,0 +1,80 @@
|
|
|
+package org.jeecg.modules.shop.commission.controller;
|
|
|
+
|
|
|
+
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+import org.jeecg.common.api.vo.Result;
|
|
|
+import org.jeecg.common.system.base.controller.JeecgController;
|
|
|
+import org.jeecg.common.system.query.QueryGenerator;
|
|
|
+
|
|
|
+
|
|
|
+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.jeecg.modules.shop.commission.entity.PartnerCommission;
|
|
|
+import org.jeecg.modules.shop.commission.service.IPartnerCommissionService;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @Description: 合作伙伴佣金
|
|
|
+ * @Author: jeecg-boot
|
|
|
+ * @Date: 2025-07-15
|
|
|
+ * @Version: V1.0
|
|
|
+ */
|
|
|
+@Api(tags="合作伙伴佣金")
|
|
|
+@RestController
|
|
|
+@RequestMapping("/partnercustomer4/partnerCommission")
|
|
|
+@Slf4j
|
|
|
+public class PartnerCommissionController extends JeecgController<PartnerCommission, IPartnerCommissionService> {
|
|
|
+ @Autowired
|
|
|
+ private IPartnerCommissionService partnerCommissionService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 分页列表查询
|
|
|
+ *
|
|
|
+ * @param partnerCommission
|
|
|
+ * @param pageNo
|
|
|
+ * @param pageSize
|
|
|
+ * @param req
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ //@AutoLog(value = "合作伙伴佣金-分页列表查询")
|
|
|
+ @ApiOperation(value="合作伙伴佣金-分页列表查询", notes="合作伙伴佣金-分页列表查询")
|
|
|
+ @GetMapping(value = "/list")
|
|
|
+ public Result<IPage<PartnerCommission>> queryPageList(PartnerCommission partnerCommission,
|
|
|
+ @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
|
+ @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
|
+ HttpServletRequest req) {
|
|
|
+ QueryWrapper<PartnerCommission> queryWrapper = QueryGenerator.initQueryWrapper(partnerCommission, req.getParameterMap());
|
|
|
+ Page<PartnerCommission> page = new Page<PartnerCommission>(pageNo, pageSize);
|
|
|
+ IPage<PartnerCommission> pageList = partnerCommissionService.page(page, queryWrapper);
|
|
|
+ return Result.OK(pageList);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 通过id查询
|
|
|
+ *
|
|
|
+ * @param id
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ //@AutoLog(value = "合作伙伴佣金-通过id查询")
|
|
|
+ @ApiOperation(value="合作伙伴佣金-通过id查询", notes="合作伙伴佣金-通过id查询")
|
|
|
+ @GetMapping(value = "/queryById")
|
|
|
+ public Result<PartnerCommission> queryById(@RequestParam(name="id",required=true) String id) {
|
|
|
+ PartnerCommission partnerCommission = partnerCommissionService.getById(id);
|
|
|
+ if(partnerCommission==null) {
|
|
|
+ return Result.error("未找到对应数据");
|
|
|
+ }
|
|
|
+ return Result.OK(partnerCommission);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+}
|