| | |
| | | @SpringBootApplication |
| | | @MapperScan("com.doumee.dao") |
| | | public class CompanyApplication { |
| | | |
| | | public static void main(String[] args) { |
| | | ApplicationContext context = SpringApplication.run(CompanyApplication.class); |
| | | context.getEnvironment(); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.dao.business.model.BaseCateParam; |
| | | import com.doumee.service.business.BaseCateParamService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/09/07 11:41 |
| | | */ |
| | | @Api(tags = "ç´ æåº-åç±»åæ°ä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/baseCateParam") |
| | | public class BaseCateParamController extends BaseController { |
| | | |
| | | @Autowired |
| | | private BaseCateParamService baseCateParamService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:basecateparam:create") |
| | | public ApiResponse create(@RequestBody BaseCateParam baseCateParam) { |
| | | return ApiResponse.success(baseCateParamService.create(baseCateParam)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:basecateparam:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | baseCateParamService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:basecateparam:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | baseCateParamService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:basecateparam:update") |
| | | public ApiResponse updateById(@RequestBody BaseCateParam baseCateParam) { |
| | | baseCateParamService.updateById(baseCateParam); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:basecateparam:query") |
| | | public ApiResponse<PageData<BaseCateParam>> findPage (@RequestBody PageWrap<BaseCateParam> pageWrap) { |
| | | return ApiResponse.success(baseCateParamService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:basecateparam:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<BaseCateParam> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(BaseCateParam.class).export(baseCateParamService.findPage(pageWrap).getRecords(), "ç´ æåº-åç±»åæ°ä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:basecateparam:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(baseCateParamService.findById(id)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.dao.business.model.BaseCategory; |
| | | import com.doumee.service.business.BaseCategoryService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/09/07 11:41 |
| | | */ |
| | | @Api(tags = "ç´ æåº-å类信æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/baseCategory") |
| | | public class BaseCategoryController extends BaseController { |
| | | |
| | | @Autowired |
| | | private BaseCategoryService baseCategoryService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:basecategory:create") |
| | | public ApiResponse create(@RequestBody BaseCategory baseCategory) { |
| | | return ApiResponse.success(baseCategoryService.create(baseCategory)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:basecategory:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | baseCategoryService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:basecategory:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | baseCategoryService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:basecategory:update") |
| | | public ApiResponse updateById(@RequestBody BaseCategory baseCategory) { |
| | | baseCategoryService.updateById(baseCategory); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:basecategory:query") |
| | | public ApiResponse<PageData<BaseCategory>> findPage (@RequestBody PageWrap<BaseCategory> pageWrap) { |
| | | return ApiResponse.success(baseCategoryService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:basecategory:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<BaseCategory> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(BaseCategory.class).export(baseCategoryService.findPage(pageWrap).getRecords(), "ç´ æåº-å类信æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:basecategory:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(baseCategoryService.findById(id)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.dao.business.model.BaseGoods; |
| | | import com.doumee.service.business.BaseGoodsService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/09/07 11:41 |
| | | */ |
| | | @Api(tags = "ç´ æåº-ååä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/baseGoods") |
| | | public class BaseGoodsController extends BaseController { |
| | | |
| | | @Autowired |
| | | private BaseGoodsService baseGoodsService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:basegoods:create") |
| | | public ApiResponse create(@RequestBody BaseGoods baseGoods) { |
| | | return ApiResponse.success(baseGoodsService.create(baseGoods)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:basegoods:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | baseGoodsService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:basegoods:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | baseGoodsService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:basegoods:update") |
| | | public ApiResponse updateById(@RequestBody BaseGoods baseGoods) { |
| | | baseGoodsService.updateById(baseGoods); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:basegoods:query") |
| | | public ApiResponse<PageData<BaseGoods>> findPage (@RequestBody PageWrap<BaseGoods> pageWrap) { |
| | | return ApiResponse.success(baseGoodsService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:basegoods:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<BaseGoods> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(BaseGoods.class).export(baseGoodsService.findPage(pageWrap).getRecords(), "ç´ æåº-ååä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:basegoods:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(baseGoodsService.findById(id)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.dao.business.model.BaseGoodsParam; |
| | | import com.doumee.service.business.BaseGoodsParamService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/09/07 11:41 |
| | | */ |
| | | @Api(tags = "ç´ æåº-åååç±»åæ°é
置表") |
| | | @RestController |
| | | @RequestMapping("/business/baseGoodsParam") |
| | | public class BaseGoodsParamController extends BaseController { |
| | | |
| | | @Autowired |
| | | private BaseGoodsParamService baseGoodsParamService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:basegoodsparam:create") |
| | | public ApiResponse create(@RequestBody BaseGoodsParam baseGoodsParam) { |
| | | return ApiResponse.success(baseGoodsParamService.create(baseGoodsParam)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:basegoodsparam:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | baseGoodsParamService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:basegoodsparam:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | baseGoodsParamService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:basegoodsparam:update") |
| | | public ApiResponse updateById(@RequestBody BaseGoodsParam baseGoodsParam) { |
| | | baseGoodsParamService.updateById(baseGoodsParam); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:basegoodsparam:query") |
| | | public ApiResponse<PageData<BaseGoodsParam>> findPage (@RequestBody PageWrap<BaseGoodsParam> pageWrap) { |
| | | return ApiResponse.success(baseGoodsParamService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:basegoodsparam:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<BaseGoodsParam> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(BaseGoodsParam.class).export(baseGoodsParamService.findPage(pageWrap).getRecords(), "ç´ æåº-åååç±»åæ°é
置表", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:basegoodsparam:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(baseGoodsParamService.findById(id)); |
| | | } |
| | | } |
| | |
| | | map-underscore-to-camel-case: true |
| | | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | |
| | | |
| | | # ç¼åå
容设置 |
| | | cache: |
| | | session: |
| | |
| | | smart: true |
| | | # æé¤è·è¸ªçURLæ£å |
| | | exclude-patterns: .+/list[a-zA-Z0-9\-\_]*$, .+/tree[a-zA-Z0-9\-\_]*$, .+/page[a-zA-Z0-9\-\_]*$, .+/all[a-zA-Z0-9\-\_]*$, /swagger-resources.* |
| | | |
| | | |
| | | # æ¥å¿é
ç½® |
| | | logback: |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.dao.business.model.BaseCateParam; |
| | | import com.doumee.service.business.BaseCateParamService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/09/07 11:41 |
| | | */ |
| | | @Api(tags = "ç´ æåº-åç±»åæ°ä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/baseCateParam") |
| | | public class BaseCateParamController extends BaseController { |
| | | |
| | | @Autowired |
| | | private BaseCateParamService baseCateParamService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:basecateparam:create") |
| | | public ApiResponse create(@RequestBody BaseCateParam baseCateParam) { |
| | | return ApiResponse.success(baseCateParamService.create(baseCateParam)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:basecateparam:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | baseCateParamService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:basecateparam:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | baseCateParamService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:basecateparam:update") |
| | | public ApiResponse updateById(@RequestBody BaseCateParam baseCateParam) { |
| | | baseCateParamService.updateById(baseCateParam); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:basecateparam:query") |
| | | public ApiResponse<PageData<BaseCateParam>> findPage (@RequestBody PageWrap<BaseCateParam> pageWrap) { |
| | | return ApiResponse.success(baseCateParamService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:basecateparam:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<BaseCateParam> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(BaseCateParam.class).export(baseCateParamService.findPage(pageWrap).getRecords(), "ç´ æåº-åç±»åæ°ä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:basecateparam:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(baseCateParamService.findById(id)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.dao.business.model.BaseCategory; |
| | | import com.doumee.service.business.BaseCategoryService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/09/07 11:41 |
| | | */ |
| | | @Api(tags = "ç´ æåº-å类信æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/baseCategory") |
| | | public class BaseCategoryController extends BaseController { |
| | | |
| | | @Autowired |
| | | private BaseCategoryService baseCategoryService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:basecategory:create") |
| | | public ApiResponse create(@RequestBody BaseCategory baseCategory) { |
| | | return ApiResponse.success(baseCategoryService.create(baseCategory)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:basecategory:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | baseCategoryService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:basecategory:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | baseCategoryService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:basecategory:update") |
| | | public ApiResponse updateById(@RequestBody BaseCategory baseCategory) { |
| | | baseCategoryService.updateById(baseCategory); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:basecategory:query") |
| | | public ApiResponse<PageData<BaseCategory>> findPage (@RequestBody PageWrap<BaseCategory> pageWrap) { |
| | | return ApiResponse.success(baseCategoryService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:basecategory:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<BaseCategory> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(BaseCategory.class).export(baseCategoryService.findPage(pageWrap).getRecords(), "ç´ æåº-å类信æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:basecategory:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(baseCategoryService.findById(id)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.dao.business.model.BaseGoods; |
| | | import com.doumee.service.business.BaseGoodsService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/09/07 11:41 |
| | | */ |
| | | @Api(tags = "ç´ æåº-ååä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping("/business/baseGoods") |
| | | public class BaseGoodsController extends BaseController { |
| | | |
| | | @Autowired |
| | | private BaseGoodsService baseGoodsService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:basegoods:create") |
| | | public ApiResponse create(@RequestBody BaseGoods baseGoods) { |
| | | return ApiResponse.success(baseGoodsService.create(baseGoods)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:basegoods:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | baseGoodsService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:basegoods:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | baseGoodsService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:basegoods:update") |
| | | public ApiResponse updateById(@RequestBody BaseGoods baseGoods) { |
| | | baseGoodsService.updateById(baseGoods); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:basegoods:query") |
| | | public ApiResponse<PageData<BaseGoods>> findPage (@RequestBody PageWrap<BaseGoods> pageWrap) { |
| | | return ApiResponse.success(baseGoodsService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:basegoods:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<BaseGoods> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(BaseGoods.class).export(baseGoodsService.findPage(pageWrap).getRecords(), "ç´ æåº-ååä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:basegoods:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(baseGoodsService.findById(id)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.dao.business.model.BaseGoodsParam; |
| | | import com.doumee.service.business.BaseGoodsParamService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/09/07 11:41 |
| | | */ |
| | | @Api(tags = "ç´ æåº-åååç±»åæ°é
置表") |
| | | @RestController |
| | | @RequestMapping("/business/baseGoodsParam") |
| | | public class BaseGoodsParamController extends BaseController { |
| | | |
| | | @Autowired |
| | | private BaseGoodsParamService baseGoodsParamService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:basegoodsparam:create") |
| | | public ApiResponse create(@RequestBody BaseGoodsParam baseGoodsParam) { |
| | | return ApiResponse.success(baseGoodsParamService.create(baseGoodsParam)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:basegoodsparam:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | baseGoodsParamService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:basegoodsparam:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | baseGoodsParamService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:basegoodsparam:update") |
| | | public ApiResponse updateById(@RequestBody BaseGoodsParam baseGoodsParam) { |
| | | baseGoodsParamService.updateById(baseGoodsParam); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:basegoodsparam:query") |
| | | public ApiResponse<PageData<BaseGoodsParam>> findPage (@RequestBody PageWrap<BaseGoodsParam> pageWrap) { |
| | | return ApiResponse.success(baseGoodsParamService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:basegoodsparam:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<BaseGoodsParam> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(BaseGoodsParam.class).export(baseGoodsParamService.findPage(pageWrap).getRecords(), "ç´ æåº-åååç±»åæ°é
置表", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:basegoodsparam:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(baseGoodsParamService.findById(id)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.BaseCateParam; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/09/07 11:41 |
| | | */ |
| | | public interface BaseCateParamMapper extends BaseMapper<BaseCateParam> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.BaseCategory; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/09/07 11:41 |
| | | */ |
| | | public interface BaseCategoryMapper extends BaseMapper<BaseCategory> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.BaseGoods; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/09/07 11:41 |
| | | */ |
| | | public interface BaseGoodsMapper extends BaseMapper<BaseGoods> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.BaseGoodsParam; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/09/07 11:41 |
| | | */ |
| | | public interface BaseGoodsParamMapper extends BaseMapper<BaseGoodsParam> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | 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 java.util.Date; |
| | | |
| | | /** |
| | | * ç´ æåº-åç±»åæ°ä¿¡æ¯è¡¨ |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/09/07 11:41 |
| | | */ |
| | | @Data |
| | | @ApiModel("ç´ æåº-åç±»åæ°ä¿¡æ¯è¡¨") |
| | | @TableName("`base_cate_param`") |
| | | public class BaseCateParam { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | @ExcelColumn(name="主é®") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ", example = "1") |
| | | @ExcelColumn(name="å建人ç¼ç ") |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ", example = "1") |
| | | @ExcelColumn(name="æ´æ°äººç¼ç ") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name="æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "1") |
| | | @ExcelColumn(name="æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "åç§°") |
| | | @ExcelColumn(name="åç§°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name="夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 0å¯ç¨ 1ç¦ç¨", example = "1") |
| | | @ExcelColumn(name="ç¶æ 0å¯ç¨ 1ç¦ç¨") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "æåºç ", example = "1") |
| | | @ExcelColumn(name="æåºç ") |
| | | private Integer sortnum; |
| | | |
| | | @ApiModelProperty(value = "æå±åç±»ç¼ç (å
³ècategory表)", example = "1") |
| | | @ExcelColumn(name="æå±åç±»ç¼ç (å
³ècategory表)") |
| | | private Integer categoryId; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | 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 java.util.Date; |
| | | |
| | | /** |
| | | * ç´ æåº-å类信æ¯è¡¨ |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/09/07 11:41 |
| | | */ |
| | | @Data |
| | | @ApiModel("ç´ æåº-å类信æ¯è¡¨") |
| | | @TableName("`base_category`") |
| | | public class BaseCategory { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | @ExcelColumn(name="主é®") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ", example = "1") |
| | | @ExcelColumn(name="å建人ç¼ç ") |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ", example = "1") |
| | | @ExcelColumn(name="æ´æ°äººç¼ç ") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name="æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "1") |
| | | @ExcelColumn(name="æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "åç§°ï¼ä¸å¯éå¤ï¼") |
| | | @ExcelColumn(name="åç§°ï¼ä¸å¯éå¤ï¼") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name="夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "屿§1åç§°") |
| | | @ExcelColumn(name="屿§1åç§°") |
| | | private String attrFirst; |
| | | |
| | | @ApiModelProperty(value = "屿§2åç§°") |
| | | @ExcelColumn(name="屿§2åç§°") |
| | | private String attrSecond; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 0å¯ç¨ 1ç¦ç¨", example = "1") |
| | | @ExcelColumn(name="ç¶æ 0å¯ç¨ 1ç¦ç¨") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "æåºç ", example = "1") |
| | | @ExcelColumn(name="æåºç ") |
| | | private Integer sortnum; |
| | | |
| | | @ApiModelProperty(value = "徿 ") |
| | | @ExcelColumn(name="徿 ") |
| | | private String imgurl; |
| | | |
| | | @ApiModelProperty(value = "åç§°æ¼é³") |
| | | @ExcelColumn(name="åç§°æ¼é³") |
| | | private String pinyin; |
| | | |
| | | @ApiModelProperty(value = "åç§°æ¼é³é¦åæ¯") |
| | | @ExcelColumn(name="åç§°æ¼é³é¦åæ¯") |
| | | private String shortPinyin; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | 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 java.util.Date; |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * ç´ æåº-ååä¿¡æ¯è¡¨ |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/09/07 11:41 |
| | | */ |
| | | @Data |
| | | @ApiModel("ç´ æåº-ååä¿¡æ¯è¡¨") |
| | | @TableName("`base_goods`") |
| | | public class BaseGoods { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | @ExcelColumn(name="主é®") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ", example = "1") |
| | | @ExcelColumn(name="å建人ç¼ç ") |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ", example = "1") |
| | | @ExcelColumn(name="æ´æ°äººç¼ç ") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name="æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "1") |
| | | @ExcelColumn(name="æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name="夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "åç§°ï¼ä¸å¯éå¤ï¼") |
| | | @ExcelColumn(name="åç§°ï¼ä¸å¯éå¤ï¼") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 0å¯ç¨ 1ç¦ç¨", example = "1") |
| | | @ExcelColumn(name="ç¶æ 0å¯ç¨ 1ç¦ç¨") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "æåºç ", example = "1") |
| | | @ExcelColumn(name="æåºç ") |
| | | private Integer sortnum; |
| | | |
| | | @ApiModelProperty(value = "徿 ") |
| | | @ExcelColumn(name="徿 ") |
| | | private String imgurl; |
| | | |
| | | @ApiModelProperty(value = "æå±åç±»ç¼ç (base_category)", example = "1") |
| | | @ExcelColumn(name="æå±åç±»ç¼ç (base_category)") |
| | | private Integer categoryId; |
| | | |
| | | @ApiModelProperty(value = "æå±åçç¼ç (base_brand)", example = "1") |
| | | @ExcelColumn(name="æå±åçç¼ç (base_brand)") |
| | | private Integer brandId; |
| | | |
| | | @ApiModelProperty(value = "æå¯¼ä»·ï¼å
ï¼", example = "1") |
| | | @ExcelColumn(name="æå¯¼ä»·ï¼å
ï¼") |
| | | private BigDecimal zdPrice; |
| | | |
| | | @ApiModelProperty(value = "å
¥æä»·æ ¼ï¼å
ï¼", example = "1") |
| | | @ExcelColumn(name="å
¥æä»·æ ¼ï¼å
ï¼") |
| | | private BigDecimal price; |
| | | |
| | | @ApiModelProperty(value = "åå详æ
") |
| | | @ExcelColumn(name="åå详æ
") |
| | | private String content; |
| | | |
| | | @ApiModelProperty(value = "åç§°æ¼é³") |
| | | @ExcelColumn(name="åç§°æ¼é³") |
| | | private String pinyin; |
| | | |
| | | @ApiModelProperty(value = "åç§°æ¼é³é¦åæ¯") |
| | | @ExcelColumn(name="åç§°æ¼é³é¦åæ¯") |
| | | private String shortPinyin; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | 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 java.util.Date; |
| | | |
| | | /** |
| | | * ç´ æåº-åååç±»åæ°é
置表 |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/09/07 11:41 |
| | | */ |
| | | @Data |
| | | @ApiModel("ç´ æåº-åååç±»åæ°é
置表") |
| | | @TableName("`base_goods_param`") |
| | | public class BaseGoodsParam { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | @ExcelColumn(name="主é®") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ", example = "1") |
| | | @ExcelColumn(name="å建人ç¼ç ") |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ", example = "1") |
| | | @ExcelColumn(name="æ´æ°äººç¼ç ") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name="æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "1") |
| | | @ExcelColumn(name="æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "åç§°ï¼ä¸å¯éå¤ï¼") |
| | | @ExcelColumn(name="åç§°ï¼ä¸å¯éå¤ï¼") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name="夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 0å¯ç¨ 1ç¦ç¨", example = "1") |
| | | @ExcelColumn(name="ç¶æ 0å¯ç¨ 1ç¦ç¨") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "æåºç ", example = "1") |
| | | @ExcelColumn(name="æåºç ") |
| | | private Integer sortnum; |
| | | |
| | | @ApiModelProperty(value = "å
³èåç±»åæ°ç¼ç ï¼å
³èbase_cate_param表ï¼", example = "1") |
| | | @ExcelColumn(name="å
³èåç±»åæ°ç¼ç ï¼å
³èbase_cate_param表ï¼") |
| | | private Integer pramaId; |
| | | |
| | | @ApiModelProperty(value = "åæ°å¼") |
| | | @ExcelColumn(name="åæ°å¼") |
| | | private String val; |
| | | |
| | | @ApiModelProperty(value = "ååç¼ç ï¼å
³èbase_goods表ï¼", example = "1") |
| | | @ExcelColumn(name="ååç¼ç ï¼å
³èbase_goods表ï¼") |
| | | private Integer goodsId; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "ç¶æ 0å¯ç¨ 1ç¦ç¨", example = "1") |
| | | @ExcelColumn(name="ç¶æ 0å¯ç¨ 1ç¦ç¨") |
| | | private Integer status; |
| | | @ApiModelProperty(value = "æ¯å¦é项 0å¦ 1æ¯", example = "1") |
| | | @ExcelColumn(name="æ¯å¦é项 0å¦ 1æ¯") |
| | | private Integer isselect; |
| | | @ApiModelProperty(value = "æ¯å¦æ¾ç¤º 0å¦ 1æ¯", example = "1") |
| | | @ExcelColumn(name="æ¯å¦æ¾ç¤º 0å¦ 1æ¯") |
| | | private Integer isshow; |
| | | |
| | | @ApiModelProperty(value = "æåºç ", example = "1") |
| | | @ExcelColumn(name="æåºç ") |
| | |
| | | @ApiModelProperty(value = "ä¼ä¸ç¼ç ") |
| | | @ExcelColumn(name="ä¼ä¸ç¼ç ") |
| | | private Integer companyId; |
| | | @ApiModelProperty(value = "å¹³å°åç±»ç¼ç ") |
| | | @ExcelColumn(name="å¹³å°åç±»ç¼ç ") |
| | | private Integer platCateId; |
| | | @ApiModelProperty(value = "ç±»å 0èªå»º 1å¹³å°å
³è") |
| | | @ExcelColumn(name="ç±»å") |
| | | private Integer type; |
| | | |
| | | |
| | | @ApiModelProperty(value = "åæ°åç§° å表å¼") |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.BaseCateParam; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ç´ æåº-åç±»åæ°ä¿¡æ¯è¡¨Serviceå®ä¹ |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/09/07 11:41 |
| | | */ |
| | | public interface BaseCateParamService { |
| | | |
| | | /** |
| | | * å建 |
| | | * |
| | | * @param baseCateParam å®ä½å¯¹è±¡ |
| | | * @return Integer |
| | | */ |
| | | Integer create(BaseCateParam baseCateParam); |
| | | |
| | | /** |
| | | * 主é®å é¤ |
| | | * |
| | | * @param id ä¸»é® |
| | | */ |
| | | void deleteById(Integer id); |
| | | |
| | | /** |
| | | * å é¤ |
| | | * |
| | | * @param baseCateParam å®ä½å¯¹è±¡ |
| | | */ |
| | | void delete(BaseCateParam baseCateParam); |
| | | |
| | | /** |
| | | * æ¹é主é®å é¤ |
| | | * |
| | | * @param ids 主é®é |
| | | */ |
| | | void deleteByIdInBatch(List<Integer> ids); |
| | | |
| | | /** |
| | | * 䏻鮿´æ° |
| | | * |
| | | * @param baseCateParam å®ä½å¯¹è±¡ |
| | | */ |
| | | void updateById(BaseCateParam baseCateParam); |
| | | |
| | | /** |
| | | * æ¹é䏻鮿´æ° |
| | | * |
| | | * @param baseCateParams å®ä½é |
| | | */ |
| | | void updateByIdInBatch(List<BaseCateParam> baseCateParams); |
| | | |
| | | /** |
| | | * 䏻鮿¥è¯¢ |
| | | * |
| | | * @param id ä¸»é® |
| | | * @return BaseCateParam |
| | | */ |
| | | BaseCateParam findById(Integer id); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢åæ¡è®°å½ |
| | | * |
| | | * @param baseCateParam å®ä½å¯¹è±¡ |
| | | * @return BaseCateParam |
| | | */ |
| | | BaseCateParam findOne(BaseCateParam baseCateParam); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢ |
| | | * |
| | | * @param baseCateParam å®ä½å¯¹è±¡ |
| | | * @return List<BaseCateParam> |
| | | */ |
| | | List<BaseCateParam> findList(BaseCateParam baseCateParam); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param pageWrap å页对象 |
| | | * @return PageData<BaseCateParam> |
| | | */ |
| | | PageData<BaseCateParam> findPage(PageWrap<BaseCateParam> pageWrap); |
| | | |
| | | /** |
| | | * æ¡ä»¶ç»è®¡ |
| | | * |
| | | * @param baseCateParam å®ä½å¯¹è±¡ |
| | | * @return long |
| | | */ |
| | | long count(BaseCateParam baseCateParam); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.BaseCategory; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ç´ æåº-å类信æ¯è¡¨Serviceå®ä¹ |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/09/07 11:41 |
| | | */ |
| | | public interface BaseCategoryService { |
| | | |
| | | /** |
| | | * å建 |
| | | * |
| | | * @param baseCategory å®ä½å¯¹è±¡ |
| | | * @return Integer |
| | | */ |
| | | Integer create(BaseCategory baseCategory); |
| | | |
| | | /** |
| | | * 主é®å é¤ |
| | | * |
| | | * @param id ä¸»é® |
| | | */ |
| | | void deleteById(Integer id); |
| | | |
| | | /** |
| | | * å é¤ |
| | | * |
| | | * @param baseCategory å®ä½å¯¹è±¡ |
| | | */ |
| | | void delete(BaseCategory baseCategory); |
| | | |
| | | /** |
| | | * æ¹é主é®å é¤ |
| | | * |
| | | * @param ids 主é®é |
| | | */ |
| | | void deleteByIdInBatch(List<Integer> ids); |
| | | |
| | | /** |
| | | * 䏻鮿´æ° |
| | | * |
| | | * @param baseCategory å®ä½å¯¹è±¡ |
| | | */ |
| | | void updateById(BaseCategory baseCategory); |
| | | |
| | | /** |
| | | * æ¹é䏻鮿´æ° |
| | | * |
| | | * @param baseCategorys å®ä½é |
| | | */ |
| | | void updateByIdInBatch(List<BaseCategory> baseCategorys); |
| | | |
| | | /** |
| | | * 䏻鮿¥è¯¢ |
| | | * |
| | | * @param id ä¸»é® |
| | | * @return BaseCategory |
| | | */ |
| | | BaseCategory findById(Integer id); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢åæ¡è®°å½ |
| | | * |
| | | * @param baseCategory å®ä½å¯¹è±¡ |
| | | * @return BaseCategory |
| | | */ |
| | | BaseCategory findOne(BaseCategory baseCategory); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢ |
| | | * |
| | | * @param baseCategory å®ä½å¯¹è±¡ |
| | | * @return List<BaseCategory> |
| | | */ |
| | | List<BaseCategory> findList(BaseCategory baseCategory); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param pageWrap å页对象 |
| | | * @return PageData<BaseCategory> |
| | | */ |
| | | PageData<BaseCategory> findPage(PageWrap<BaseCategory> pageWrap); |
| | | |
| | | /** |
| | | * æ¡ä»¶ç»è®¡ |
| | | * |
| | | * @param baseCategory å®ä½å¯¹è±¡ |
| | | * @return long |
| | | */ |
| | | long count(BaseCategory baseCategory); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.BaseGoodsParam; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ç´ æåº-åååç±»åæ°é
置表Serviceå®ä¹ |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/09/07 11:41 |
| | | */ |
| | | public interface BaseGoodsParamService { |
| | | |
| | | /** |
| | | * å建 |
| | | * |
| | | * @param baseGoodsParam å®ä½å¯¹è±¡ |
| | | * @return Integer |
| | | */ |
| | | Integer create(BaseGoodsParam baseGoodsParam); |
| | | |
| | | /** |
| | | * 主é®å é¤ |
| | | * |
| | | * @param id ä¸»é® |
| | | */ |
| | | void deleteById(Integer id); |
| | | |
| | | /** |
| | | * å é¤ |
| | | * |
| | | * @param baseGoodsParam å®ä½å¯¹è±¡ |
| | | */ |
| | | void delete(BaseGoodsParam baseGoodsParam); |
| | | |
| | | /** |
| | | * æ¹é主é®å é¤ |
| | | * |
| | | * @param ids 主é®é |
| | | */ |
| | | void deleteByIdInBatch(List<Integer> ids); |
| | | |
| | | /** |
| | | * 䏻鮿´æ° |
| | | * |
| | | * @param baseGoodsParam å®ä½å¯¹è±¡ |
| | | */ |
| | | void updateById(BaseGoodsParam baseGoodsParam); |
| | | |
| | | /** |
| | | * æ¹é䏻鮿´æ° |
| | | * |
| | | * @param baseGoodsParams å®ä½é |
| | | */ |
| | | void updateByIdInBatch(List<BaseGoodsParam> baseGoodsParams); |
| | | |
| | | /** |
| | | * 䏻鮿¥è¯¢ |
| | | * |
| | | * @param id ä¸»é® |
| | | * @return BaseGoodsParam |
| | | */ |
| | | BaseGoodsParam findById(Integer id); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢åæ¡è®°å½ |
| | | * |
| | | * @param baseGoodsParam å®ä½å¯¹è±¡ |
| | | * @return BaseGoodsParam |
| | | */ |
| | | BaseGoodsParam findOne(BaseGoodsParam baseGoodsParam); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢ |
| | | * |
| | | * @param baseGoodsParam å®ä½å¯¹è±¡ |
| | | * @return List<BaseGoodsParam> |
| | | */ |
| | | List<BaseGoodsParam> findList(BaseGoodsParam baseGoodsParam); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param pageWrap å页对象 |
| | | * @return PageData<BaseGoodsParam> |
| | | */ |
| | | PageData<BaseGoodsParam> findPage(PageWrap<BaseGoodsParam> pageWrap); |
| | | |
| | | /** |
| | | * æ¡ä»¶ç»è®¡ |
| | | * |
| | | * @param baseGoodsParam å®ä½å¯¹è±¡ |
| | | * @return long |
| | | */ |
| | | long count(BaseGoodsParam baseGoodsParam); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.BaseGoods; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ç´ æåº-ååä¿¡æ¯è¡¨Serviceå®ä¹ |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/09/07 11:41 |
| | | */ |
| | | public interface BaseGoodsService { |
| | | |
| | | /** |
| | | * å建 |
| | | * |
| | | * @param baseGoods å®ä½å¯¹è±¡ |
| | | * @return Integer |
| | | */ |
| | | Integer create(BaseGoods baseGoods); |
| | | |
| | | /** |
| | | * 主é®å é¤ |
| | | * |
| | | * @param id ä¸»é® |
| | | */ |
| | | void deleteById(Integer id); |
| | | |
| | | /** |
| | | * å é¤ |
| | | * |
| | | * @param baseGoods å®ä½å¯¹è±¡ |
| | | */ |
| | | void delete(BaseGoods baseGoods); |
| | | |
| | | /** |
| | | * æ¹é主é®å é¤ |
| | | * |
| | | * @param ids 主é®é |
| | | */ |
| | | void deleteByIdInBatch(List<Integer> ids); |
| | | |
| | | /** |
| | | * 䏻鮿´æ° |
| | | * |
| | | * @param baseGoods å®ä½å¯¹è±¡ |
| | | */ |
| | | void updateById(BaseGoods baseGoods); |
| | | |
| | | /** |
| | | * æ¹é䏻鮿´æ° |
| | | * |
| | | * @param baseGoodss å®ä½é |
| | | */ |
| | | void updateByIdInBatch(List<BaseGoods> baseGoodss); |
| | | |
| | | /** |
| | | * 䏻鮿¥è¯¢ |
| | | * |
| | | * @param id ä¸»é® |
| | | * @return BaseGoods |
| | | */ |
| | | BaseGoods findById(Integer id); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢åæ¡è®°å½ |
| | | * |
| | | * @param baseGoods å®ä½å¯¹è±¡ |
| | | * @return BaseGoods |
| | | */ |
| | | BaseGoods findOne(BaseGoods baseGoods); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢ |
| | | * |
| | | * @param baseGoods å®ä½å¯¹è±¡ |
| | | * @return List<BaseGoods> |
| | | */ |
| | | List<BaseGoods> findList(BaseGoods baseGoods); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param pageWrap å页对象 |
| | | * @return PageData<BaseGoods> |
| | | */ |
| | | PageData<BaseGoods> findPage(PageWrap<BaseGoods> pageWrap); |
| | | |
| | | /** |
| | | * æ¡ä»¶ç»è®¡ |
| | | * |
| | | * @param baseGoods å®ä½å¯¹è±¡ |
| | | * @return long |
| | | */ |
| | | long count(BaseGoods baseGoods); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.BaseCateParamMapper; |
| | | import com.doumee.dao.business.model.BaseCateParam; |
| | | import com.doumee.service.business.BaseCateParamService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ç´ æåº-åç±»åæ°ä¿¡æ¯è¡¨Serviceå®ç° |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/09/07 11:41 |
| | | */ |
| | | @Service |
| | | public class BaseCateParamServiceImpl implements BaseCateParamService { |
| | | |
| | | @Autowired |
| | | private BaseCateParamMapper baseCateParamMapper; |
| | | |
| | | @Override |
| | | public Integer create(BaseCateParam baseCateParam) { |
| | | baseCateParamMapper.insert(baseCateParam); |
| | | return baseCateParam.getId(); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id) { |
| | | baseCateParamMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(BaseCateParam baseCateParam) { |
| | | UpdateWrapper<BaseCateParam> deleteWrapper = new UpdateWrapper<>(baseCateParam); |
| | | baseCateParamMapper.delete(deleteWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | baseCateParamMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public void updateById(BaseCateParam baseCateParam) { |
| | | baseCateParamMapper.updateById(baseCateParam); |
| | | } |
| | | |
| | | @Override |
| | | public void updateByIdInBatch(List<BaseCateParam> baseCateParams) { |
| | | if (CollectionUtils.isEmpty(baseCateParams)) { |
| | | return; |
| | | } |
| | | for (BaseCateParam baseCateParam: baseCateParams) { |
| | | this.updateById(baseCateParam); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public BaseCateParam findById(Integer id) { |
| | | return baseCateParamMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public BaseCateParam findOne(BaseCateParam baseCateParam) { |
| | | QueryWrapper<BaseCateParam> wrapper = new QueryWrapper<>(baseCateParam); |
| | | return baseCateParamMapper.selectOne(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<BaseCateParam> findList(BaseCateParam baseCateParam) { |
| | | QueryWrapper<BaseCateParam> wrapper = new QueryWrapper<>(baseCateParam); |
| | | return baseCateParamMapper.selectList(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public PageData<BaseCateParam> findPage(PageWrap<BaseCateParam> pageWrap) { |
| | | IPage<BaseCateParam> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | QueryWrapper<BaseCateParam> queryWrapper = new QueryWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | if (pageWrap.getModel().getId() != null) { |
| | | queryWrapper.lambda().eq(BaseCateParam::getId, pageWrap.getModel().getId()); |
| | | } |
| | | if (pageWrap.getModel().getCreator() != null) { |
| | | queryWrapper.lambda().eq(BaseCateParam::getCreator, pageWrap.getModel().getCreator()); |
| | | } |
| | | if (pageWrap.getModel().getCreateDate() != null) { |
| | | queryWrapper.lambda().ge(BaseCateParam::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate())); |
| | | queryWrapper.lambda().le(BaseCateParam::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate())); |
| | | } |
| | | if (pageWrap.getModel().getEditor() != null) { |
| | | queryWrapper.lambda().eq(BaseCateParam::getEditor, pageWrap.getModel().getEditor()); |
| | | } |
| | | if (pageWrap.getModel().getEditDate() != null) { |
| | | queryWrapper.lambda().ge(BaseCateParam::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate())); |
| | | queryWrapper.lambda().le(BaseCateParam::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate())); |
| | | } |
| | | if (pageWrap.getModel().getIsdeleted() != null) { |
| | | queryWrapper.lambda().eq(BaseCateParam::getIsdeleted, pageWrap.getModel().getIsdeleted()); |
| | | } |
| | | if (pageWrap.getModel().getName() != null) { |
| | | queryWrapper.lambda().eq(BaseCateParam::getName, pageWrap.getModel().getName()); |
| | | } |
| | | if (pageWrap.getModel().getRemark() != null) { |
| | | queryWrapper.lambda().eq(BaseCateParam::getRemark, pageWrap.getModel().getRemark()); |
| | | } |
| | | if (pageWrap.getModel().getStatus() != null) { |
| | | queryWrapper.lambda().eq(BaseCateParam::getStatus, pageWrap.getModel().getStatus()); |
| | | } |
| | | if (pageWrap.getModel().getSortnum() != null) { |
| | | queryWrapper.lambda().eq(BaseCateParam::getSortnum, pageWrap.getModel().getSortnum()); |
| | | } |
| | | if (pageWrap.getModel().getCategoryId() != null) { |
| | | queryWrapper.lambda().eq(BaseCateParam::getCategoryId, pageWrap.getModel().getCategoryId()); |
| | | } |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | queryWrapper.orderByDesc(sortData.getProperty()); |
| | | } else { |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | } |
| | | } |
| | | return PageData.from(baseCateParamMapper.selectPage(page, queryWrapper)); |
| | | } |
| | | |
| | | @Override |
| | | public long count(BaseCateParam baseCateParam) { |
| | | QueryWrapper<BaseCateParam> wrapper = new QueryWrapper<>(baseCateParam); |
| | | return baseCateParamMapper.selectCount(wrapper); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.BaseCategoryMapper; |
| | | import com.doumee.dao.business.model.BaseCategory; |
| | | import com.doumee.service.business.BaseCategoryService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ç´ æåº-å类信æ¯è¡¨Serviceå®ç° |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/09/07 11:41 |
| | | */ |
| | | @Service |
| | | public class BaseCategoryServiceImpl implements BaseCategoryService { |
| | | |
| | | @Autowired |
| | | private BaseCategoryMapper baseCategoryMapper; |
| | | |
| | | @Override |
| | | public Integer create(BaseCategory baseCategory) { |
| | | baseCategoryMapper.insert(baseCategory); |
| | | return baseCategory.getId(); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id) { |
| | | baseCategoryMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(BaseCategory baseCategory) { |
| | | UpdateWrapper<BaseCategory> deleteWrapper = new UpdateWrapper<>(baseCategory); |
| | | baseCategoryMapper.delete(deleteWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | baseCategoryMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public void updateById(BaseCategory baseCategory) { |
| | | baseCategoryMapper.updateById(baseCategory); |
| | | } |
| | | |
| | | @Override |
| | | public void updateByIdInBatch(List<BaseCategory> baseCategorys) { |
| | | if (CollectionUtils.isEmpty(baseCategorys)) { |
| | | return; |
| | | } |
| | | for (BaseCategory baseCategory: baseCategorys) { |
| | | this.updateById(baseCategory); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public BaseCategory findById(Integer id) { |
| | | return baseCategoryMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public BaseCategory findOne(BaseCategory baseCategory) { |
| | | QueryWrapper<BaseCategory> wrapper = new QueryWrapper<>(baseCategory); |
| | | return baseCategoryMapper.selectOne(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<BaseCategory> findList(BaseCategory baseCategory) { |
| | | QueryWrapper<BaseCategory> wrapper = new QueryWrapper<>(baseCategory); |
| | | return baseCategoryMapper.selectList(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public PageData<BaseCategory> findPage(PageWrap<BaseCategory> pageWrap) { |
| | | IPage<BaseCategory> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | QueryWrapper<BaseCategory> queryWrapper = new QueryWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | if (pageWrap.getModel().getId() != null) { |
| | | queryWrapper.lambda().eq(BaseCategory::getId, pageWrap.getModel().getId()); |
| | | } |
| | | if (pageWrap.getModel().getCreator() != null) { |
| | | queryWrapper.lambda().eq(BaseCategory::getCreator, pageWrap.getModel().getCreator()); |
| | | } |
| | | if (pageWrap.getModel().getCreateDate() != null) { |
| | | queryWrapper.lambda().ge(BaseCategory::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate())); |
| | | queryWrapper.lambda().le(BaseCategory::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate())); |
| | | } |
| | | if (pageWrap.getModel().getEditor() != null) { |
| | | queryWrapper.lambda().eq(BaseCategory::getEditor, pageWrap.getModel().getEditor()); |
| | | } |
| | | if (pageWrap.getModel().getEditDate() != null) { |
| | | queryWrapper.lambda().ge(BaseCategory::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate())); |
| | | queryWrapper.lambda().le(BaseCategory::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate())); |
| | | } |
| | | if (pageWrap.getModel().getIsdeleted() != null) { |
| | | queryWrapper.lambda().eq(BaseCategory::getIsdeleted, pageWrap.getModel().getIsdeleted()); |
| | | } |
| | | if (pageWrap.getModel().getName() != null) { |
| | | queryWrapper.lambda().eq(BaseCategory::getName, pageWrap.getModel().getName()); |
| | | } |
| | | if (pageWrap.getModel().getRemark() != null) { |
| | | queryWrapper.lambda().eq(BaseCategory::getRemark, pageWrap.getModel().getRemark()); |
| | | } |
| | | if (pageWrap.getModel().getAttrFirst() != null) { |
| | | queryWrapper.lambda().eq(BaseCategory::getAttrFirst, pageWrap.getModel().getAttrFirst()); |
| | | } |
| | | if (pageWrap.getModel().getAttrSecond() != null) { |
| | | queryWrapper.lambda().eq(BaseCategory::getAttrSecond, pageWrap.getModel().getAttrSecond()); |
| | | } |
| | | if (pageWrap.getModel().getStatus() != null) { |
| | | queryWrapper.lambda().eq(BaseCategory::getStatus, pageWrap.getModel().getStatus()); |
| | | } |
| | | if (pageWrap.getModel().getSortnum() != null) { |
| | | queryWrapper.lambda().eq(BaseCategory::getSortnum, pageWrap.getModel().getSortnum()); |
| | | } |
| | | if (pageWrap.getModel().getImgurl() != null) { |
| | | queryWrapper.lambda().eq(BaseCategory::getImgurl, pageWrap.getModel().getImgurl()); |
| | | } |
| | | if (pageWrap.getModel().getPinyin() != null) { |
| | | queryWrapper.lambda().eq(BaseCategory::getPinyin, pageWrap.getModel().getPinyin()); |
| | | } |
| | | if (pageWrap.getModel().getShortPinyin() != null) { |
| | | queryWrapper.lambda().eq(BaseCategory::getShortPinyin, pageWrap.getModel().getShortPinyin()); |
| | | } |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | queryWrapper.orderByDesc(sortData.getProperty()); |
| | | } else { |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | } |
| | | } |
| | | return PageData.from(baseCategoryMapper.selectPage(page, queryWrapper)); |
| | | } |
| | | |
| | | @Override |
| | | public long count(BaseCategory baseCategory) { |
| | | QueryWrapper<BaseCategory> wrapper = new QueryWrapper<>(baseCategory); |
| | | return baseCategoryMapper.selectCount(wrapper); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.BaseGoodsParamMapper; |
| | | import com.doumee.dao.business.model.BaseGoodsParam; |
| | | import com.doumee.service.business.BaseGoodsParamService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ç´ æåº-åååç±»åæ°é
置表Serviceå®ç° |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/09/07 11:41 |
| | | */ |
| | | @Service |
| | | public class BaseGoodsParamServiceImpl implements BaseGoodsParamService { |
| | | |
| | | @Autowired |
| | | private BaseGoodsParamMapper baseGoodsParamMapper; |
| | | |
| | | @Override |
| | | public Integer create(BaseGoodsParam baseGoodsParam) { |
| | | baseGoodsParamMapper.insert(baseGoodsParam); |
| | | return baseGoodsParam.getId(); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id) { |
| | | baseGoodsParamMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(BaseGoodsParam baseGoodsParam) { |
| | | UpdateWrapper<BaseGoodsParam> deleteWrapper = new UpdateWrapper<>(baseGoodsParam); |
| | | baseGoodsParamMapper.delete(deleteWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | baseGoodsParamMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public void updateById(BaseGoodsParam baseGoodsParam) { |
| | | baseGoodsParamMapper.updateById(baseGoodsParam); |
| | | } |
| | | |
| | | @Override |
| | | public void updateByIdInBatch(List<BaseGoodsParam> baseGoodsParams) { |
| | | if (CollectionUtils.isEmpty(baseGoodsParams)) { |
| | | return; |
| | | } |
| | | for (BaseGoodsParam baseGoodsParam: baseGoodsParams) { |
| | | this.updateById(baseGoodsParam); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public BaseGoodsParam findById(Integer id) { |
| | | return baseGoodsParamMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public BaseGoodsParam findOne(BaseGoodsParam baseGoodsParam) { |
| | | QueryWrapper<BaseGoodsParam> wrapper = new QueryWrapper<>(baseGoodsParam); |
| | | return baseGoodsParamMapper.selectOne(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<BaseGoodsParam> findList(BaseGoodsParam baseGoodsParam) { |
| | | QueryWrapper<BaseGoodsParam> wrapper = new QueryWrapper<>(baseGoodsParam); |
| | | return baseGoodsParamMapper.selectList(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public PageData<BaseGoodsParam> findPage(PageWrap<BaseGoodsParam> pageWrap) { |
| | | IPage<BaseGoodsParam> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | QueryWrapper<BaseGoodsParam> queryWrapper = new QueryWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | if (pageWrap.getModel().getId() != null) { |
| | | queryWrapper.lambda().eq(BaseGoodsParam::getId, pageWrap.getModel().getId()); |
| | | } |
| | | if (pageWrap.getModel().getCreator() != null) { |
| | | queryWrapper.lambda().eq(BaseGoodsParam::getCreator, pageWrap.getModel().getCreator()); |
| | | } |
| | | if (pageWrap.getModel().getCreateDate() != null) { |
| | | queryWrapper.lambda().ge(BaseGoodsParam::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate())); |
| | | queryWrapper.lambda().le(BaseGoodsParam::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate())); |
| | | } |
| | | if (pageWrap.getModel().getEditor() != null) { |
| | | queryWrapper.lambda().eq(BaseGoodsParam::getEditor, pageWrap.getModel().getEditor()); |
| | | } |
| | | if (pageWrap.getModel().getEditDate() != null) { |
| | | queryWrapper.lambda().ge(BaseGoodsParam::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate())); |
| | | queryWrapper.lambda().le(BaseGoodsParam::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate())); |
| | | } |
| | | if (pageWrap.getModel().getIsdeleted() != null) { |
| | | queryWrapper.lambda().eq(BaseGoodsParam::getIsdeleted, pageWrap.getModel().getIsdeleted()); |
| | | } |
| | | if (pageWrap.getModel().getName() != null) { |
| | | queryWrapper.lambda().eq(BaseGoodsParam::getName, pageWrap.getModel().getName()); |
| | | } |
| | | if (pageWrap.getModel().getRemark() != null) { |
| | | queryWrapper.lambda().eq(BaseGoodsParam::getRemark, pageWrap.getModel().getRemark()); |
| | | } |
| | | if (pageWrap.getModel().getStatus() != null) { |
| | | queryWrapper.lambda().eq(BaseGoodsParam::getStatus, pageWrap.getModel().getStatus()); |
| | | } |
| | | if (pageWrap.getModel().getSortnum() != null) { |
| | | queryWrapper.lambda().eq(BaseGoodsParam::getSortnum, pageWrap.getModel().getSortnum()); |
| | | } |
| | | if (pageWrap.getModel().getPramaId() != null) { |
| | | queryWrapper.lambda().eq(BaseGoodsParam::getPramaId, pageWrap.getModel().getPramaId()); |
| | | } |
| | | if (pageWrap.getModel().getVal() != null) { |
| | | queryWrapper.lambda().eq(BaseGoodsParam::getVal, pageWrap.getModel().getVal()); |
| | | } |
| | | if (pageWrap.getModel().getGoodsId() != null) { |
| | | queryWrapper.lambda().eq(BaseGoodsParam::getGoodsId, pageWrap.getModel().getGoodsId()); |
| | | } |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | queryWrapper.orderByDesc(sortData.getProperty()); |
| | | } else { |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | } |
| | | } |
| | | return PageData.from(baseGoodsParamMapper.selectPage(page, queryWrapper)); |
| | | } |
| | | |
| | | @Override |
| | | public long count(BaseGoodsParam baseGoodsParam) { |
| | | QueryWrapper<BaseGoodsParam> wrapper = new QueryWrapper<>(baseGoodsParam); |
| | | return baseGoodsParamMapper.selectCount(wrapper); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.BaseGoodsMapper; |
| | | import com.doumee.dao.business.model.BaseGoods; |
| | | import com.doumee.service.business.BaseGoodsService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ç´ æåº-ååä¿¡æ¯è¡¨Serviceå®ç° |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/09/07 11:41 |
| | | */ |
| | | @Service |
| | | public class BaseGoodsServiceImpl implements BaseGoodsService { |
| | | |
| | | @Autowired |
| | | private BaseGoodsMapper baseGoodsMapper; |
| | | |
| | | @Override |
| | | public Integer create(BaseGoods baseGoods) { |
| | | baseGoodsMapper.insert(baseGoods); |
| | | return baseGoods.getId(); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id) { |
| | | baseGoodsMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(BaseGoods baseGoods) { |
| | | UpdateWrapper<BaseGoods> deleteWrapper = new UpdateWrapper<>(baseGoods); |
| | | baseGoodsMapper.delete(deleteWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | baseGoodsMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public void updateById(BaseGoods baseGoods) { |
| | | baseGoodsMapper.updateById(baseGoods); |
| | | } |
| | | |
| | | @Override |
| | | public void updateByIdInBatch(List<BaseGoods> baseGoodss) { |
| | | if (CollectionUtils.isEmpty(baseGoodss)) { |
| | | return; |
| | | } |
| | | for (BaseGoods baseGoods: baseGoodss) { |
| | | this.updateById(baseGoods); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public BaseGoods findById(Integer id) { |
| | | return baseGoodsMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public BaseGoods findOne(BaseGoods baseGoods) { |
| | | QueryWrapper<BaseGoods> wrapper = new QueryWrapper<>(baseGoods); |
| | | return baseGoodsMapper.selectOne(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<BaseGoods> findList(BaseGoods baseGoods) { |
| | | QueryWrapper<BaseGoods> wrapper = new QueryWrapper<>(baseGoods); |
| | | return baseGoodsMapper.selectList(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public PageData<BaseGoods> findPage(PageWrap<BaseGoods> pageWrap) { |
| | | IPage<BaseGoods> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | QueryWrapper<BaseGoods> queryWrapper = new QueryWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | if (pageWrap.getModel().getId() != null) { |
| | | queryWrapper.lambda().eq(BaseGoods::getId, pageWrap.getModel().getId()); |
| | | } |
| | | if (pageWrap.getModel().getCreator() != null) { |
| | | queryWrapper.lambda().eq(BaseGoods::getCreator, pageWrap.getModel().getCreator()); |
| | | } |
| | | if (pageWrap.getModel().getCreateDate() != null) { |
| | | queryWrapper.lambda().ge(BaseGoods::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate())); |
| | | queryWrapper.lambda().le(BaseGoods::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate())); |
| | | } |
| | | if (pageWrap.getModel().getEditor() != null) { |
| | | queryWrapper.lambda().eq(BaseGoods::getEditor, pageWrap.getModel().getEditor()); |
| | | } |
| | | if (pageWrap.getModel().getEditDate() != null) { |
| | | queryWrapper.lambda().ge(BaseGoods::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate())); |
| | | queryWrapper.lambda().le(BaseGoods::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate())); |
| | | } |
| | | if (pageWrap.getModel().getIsdeleted() != null) { |
| | | queryWrapper.lambda().eq(BaseGoods::getIsdeleted, pageWrap.getModel().getIsdeleted()); |
| | | } |
| | | if (pageWrap.getModel().getRemark() != null) { |
| | | queryWrapper.lambda().eq(BaseGoods::getRemark, pageWrap.getModel().getRemark()); |
| | | } |
| | | if (pageWrap.getModel().getName() != null) { |
| | | queryWrapper.lambda().eq(BaseGoods::getName, pageWrap.getModel().getName()); |
| | | } |
| | | if (pageWrap.getModel().getStatus() != null) { |
| | | queryWrapper.lambda().eq(BaseGoods::getStatus, pageWrap.getModel().getStatus()); |
| | | } |
| | | if (pageWrap.getModel().getSortnum() != null) { |
| | | queryWrapper.lambda().eq(BaseGoods::getSortnum, pageWrap.getModel().getSortnum()); |
| | | } |
| | | if (pageWrap.getModel().getImgurl() != null) { |
| | | queryWrapper.lambda().eq(BaseGoods::getImgurl, pageWrap.getModel().getImgurl()); |
| | | } |
| | | if (pageWrap.getModel().getCategoryId() != null) { |
| | | queryWrapper.lambda().eq(BaseGoods::getCategoryId, pageWrap.getModel().getCategoryId()); |
| | | } |
| | | if (pageWrap.getModel().getBrandId() != null) { |
| | | queryWrapper.lambda().eq(BaseGoods::getBrandId, pageWrap.getModel().getBrandId()); |
| | | } |
| | | if (pageWrap.getModel().getZdPrice() != null) { |
| | | queryWrapper.lambda().eq(BaseGoods::getZdPrice, pageWrap.getModel().getZdPrice()); |
| | | } |
| | | if (pageWrap.getModel().getPrice() != null) { |
| | | queryWrapper.lambda().eq(BaseGoods::getPrice, pageWrap.getModel().getPrice()); |
| | | } |
| | | if (pageWrap.getModel().getContent() != null) { |
| | | queryWrapper.lambda().eq(BaseGoods::getContent, pageWrap.getModel().getContent()); |
| | | } |
| | | if (pageWrap.getModel().getPinyin() != null) { |
| | | queryWrapper.lambda().eq(BaseGoods::getPinyin, pageWrap.getModel().getPinyin()); |
| | | } |
| | | if (pageWrap.getModel().getShortPinyin() != null) { |
| | | queryWrapper.lambda().eq(BaseGoods::getShortPinyin, pageWrap.getModel().getShortPinyin()); |
| | | } |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | queryWrapper.orderByDesc(sortData.getProperty()); |
| | | } else { |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | } |
| | | } |
| | | return PageData.from(baseGoodsMapper.selectPage(page, queryWrapper)); |
| | | } |
| | | |
| | | @Override |
| | | public long count(BaseGoods baseGoods) { |
| | | QueryWrapper<BaseGoods> wrapper = new QueryWrapper<>(baseGoods); |
| | | return baseGoodsMapper.selectCount(wrapper); |
| | | } |
| | | } |