Merge remote-tracking branch 'origin/master'
| | |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | @ApiOperation(value = "分页查询商铺", response = ComShopStoreVO.class) |
| | | @ApiOperation(value = "分页查询商家", response = ComShopStoreVO.class) |
| | | @PostMapping("/page") |
| | | public R pageVolunteer(@RequestBody PageComShopStoreDTO pageComShopStoreDTO) { |
| | | return communityService.pageStoreList(pageComShopStoreDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "保存商铺") |
| | | @ApiOperation(value = "保存商家") |
| | | @PostMapping("/save") |
| | | public R saveStore(@Valid @RequestBody ShopStoreVO storeVO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑店铺、启用、禁用") |
| | | @ApiOperation(value = "编辑商家、启用、禁用") |
| | | @PostMapping("/edit/{id}") |
| | | @ApiImplicitParam(name = "id", value = "商铺id") |
| | | @ApiImplicitParam(name = "id", value = "商家id") |
| | | public R editStore(@Valid @RequestBody ShopStoreVO storeVO, @PathVariable("id") Long id) { |
| | | R<LoginUserInfoVO> sysUserVO = userService.getUserInfoByUserId(storeVO.getSysUserId() + ""); |
| | | if (sysUserVO.getData() == null) { |
| | |
| | | return R.fail(); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除商铺") |
| | | @ApiOperation(value = "删除商家") |
| | | @PostMapping("/delete") |
| | | public R delete(@RequestBody Long[] ids) { |
| | | return communityService.deleteStore(ids); |
| | |
| | | @ApiModelProperty(value = "商家姓名") |
| | | private String contacts; |
| | | @ApiModelProperty(value = "商家账号") |
| | | private String name; |
| | | @ApiModelProperty(value = "店铺名称") |
| | | private String account; |
| | | @ApiModelProperty(value = "店铺名称") |
| | | private String name; |
| | | @ApiModelProperty(value = "配送方式(1.商家配送 2.快递物流)") |
| | | private Integer deliveryType; |
| | | @ApiModelProperty(value = "店铺状态(1.启用 2.禁用)") |
| | |
| | | @Mapper |
| | | public interface ComShopStoreDAO extends BaseMapper<ComShopStoreDO> { |
| | | |
| | | @Select("select id,`name`,classify_id,logo,phone,delivery_type,remark,`status`,sale,sale_volume,store_detail from com_shop_store") |
| | | @Select("<script>" + |
| | | "select id,`name`,classify_id,logo,phone,delivery_type,remark,`status`,sale,sale_volume,store_detail from com_shop_store c" + |
| | | " <where>" + |
| | | "<if test='pageComShopStoreDTO.contacts != null and pageComShopStoreDTO.contacts.trim() != ""'>" + |
| | | "and c.contacts like concat('%',#{pageComShopStoreDTO.contacts},'%') \n" + |
| | | " </if> " + |
| | | "<if test='pageComShopStoreDTO.account != null and pageComShopStoreDTO.account.trim() != ""'>" + |
| | | "and c.account = #{pageComShopStoreDTO.account} \n" + |
| | | " </if> " + |
| | | "<if test='pageComShopStoreDTO.name != null and pageComShopStoreDTO.name.trim() != ""'>" + |
| | | "and c.`name` like concat('%',#{pageComShopStoreDTO.name},'%') \n" + |
| | | " </if> " + |
| | | "<if test='pageComShopStoreDTO.deliveryType != null'>" + |
| | | "and c.delivery_type =#{pageComShopStoreDTO.deliveryType}\n" + |
| | | " </if> " + |
| | | "<if test='pageComShopStoreDTO.status != null'>" + |
| | | "and c.status =#{pageComShopStoreDTO.status} \n" + |
| | | " </if> " + |
| | | " </where>" + |
| | | " order by c.create_at desc"+ |
| | | "</script>") |
| | | IPage<ComShopStoreVO> pageShopStore(Page page, @Param("pageComShopStoreDTO") PageComShopStoreDTO pageComShopStoreDTO); |
| | | |
| | | } |