| | |
| | | import com.oying.modules.sh.domain.OrderAddressSnapshot; |
| | | import com.oying.modules.sh.service.OrderAddressSnapshotService; |
| | | import com.oying.modules.sh.domain.dto.OrderAddressSnapshotQueryCriteria; |
| | | import com.oying.utils.R; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import io.swagger.annotations.*; |
| | | |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @author lixin |
| | |
| | | @GetMapping |
| | | @ApiOperation("查询订单地址快照") |
| | | @PreAuthorize("@el.check('orderAddressSnapshot:list')") |
| | | public ResponseEntity<PageResult<OrderAddressSnapshot>> queryOrderAddressSnapshot(OrderAddressSnapshotQueryCriteria criteria){ |
| | | public ResponseEntity<Object> queryOrderAddressSnapshot(OrderAddressSnapshotQueryCriteria criteria) { |
| | | Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize()); |
| | | return new ResponseEntity<>(orderAddressSnapshotService.queryAll(criteria,page),HttpStatus.OK); |
| | | return new ResponseEntity<>(R.success(orderAddressSnapshotService.queryAll(criteria, page)), HttpStatus.OK); |
| | | } |
| | | |
| | | @PostMapping |
| | |
| | | @PreAuthorize("@el.check('orderAddressSnapshot:add')") |
| | | public ResponseEntity<Object> createOrderAddressSnapshot(@Validated @RequestBody OrderAddressSnapshot resources){ |
| | | orderAddressSnapshotService.create(resources); |
| | | return new ResponseEntity<>(HttpStatus.CREATED); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.CREATED); |
| | | } |
| | | |
| | | @PutMapping |
| | |
| | | @PreAuthorize("@el.check('orderAddressSnapshot:edit')") |
| | | public ResponseEntity<Object> updateOrderAddressSnapshot(@Validated @RequestBody OrderAddressSnapshot resources){ |
| | | orderAddressSnapshotService.update(resources); |
| | | return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.NO_CONTENT); |
| | | } |
| | | |
| | | @DeleteMapping |
| | |
| | | @PreAuthorize("@el.check('orderAddressSnapshot:del')") |
| | | public ResponseEntity<Object> deleteOrderAddressSnapshot(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) { |
| | | orderAddressSnapshotService.deleteAll(ids); |
| | | return new ResponseEntity<>(HttpStatus.OK); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.OK); |
| | | } |
| | | } |
| | |
| | | import com.oying.modules.sh.domain.Order; |
| | | import com.oying.modules.sh.service.OrderService; |
| | | import com.oying.modules.sh.domain.dto.OrderQueryCriteria; |
| | | import com.oying.utils.R; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import io.swagger.annotations.*; |
| | | |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @author lixin |
| | |
| | | @GetMapping |
| | | @ApiOperation("查询订单信息") |
| | | @PreAuthorize("@el.check('order:list')") |
| | | public ResponseEntity<PageResult<Order>> queryOrder(OrderQueryCriteria criteria){ |
| | | public ResponseEntity<Object> queryOrder(OrderQueryCriteria criteria) { |
| | | Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize()); |
| | | return new ResponseEntity<>(orderService.queryAll(criteria,page),HttpStatus.OK); |
| | | return new ResponseEntity<>(R.success(orderService.queryAll(criteria, page)), HttpStatus.OK); |
| | | } |
| | | |
| | | @PostMapping |
| | |
| | | @PreAuthorize("@el.check('order:add')") |
| | | public ResponseEntity<Object> createOrder(@Validated @RequestBody Order resources){ |
| | | orderService.create(resources); |
| | | return new ResponseEntity<>(HttpStatus.CREATED); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.CREATED); |
| | | } |
| | | |
| | | @PutMapping |
| | |
| | | @PreAuthorize("@el.check('order:edit')") |
| | | public ResponseEntity<Object> updateOrder(@Validated @RequestBody Order resources){ |
| | | orderService.update(resources); |
| | | return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.NO_CONTENT); |
| | | } |
| | | |
| | | @DeleteMapping |
| | |
| | | @PreAuthorize("@el.check('order:del')") |
| | | public ResponseEntity<Object> deleteOrder(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) { |
| | | orderService.deleteAll(ids); |
| | | return new ResponseEntity<>(HttpStatus.OK); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.OK); |
| | | } |
| | | } |
| | |
| | | import com.oying.modules.sh.domain.OrderOperationLog; |
| | | import com.oying.modules.sh.service.OrderOperationLogService; |
| | | import com.oying.modules.sh.domain.dto.OrderOperationLogQueryCriteria; |
| | | import com.oying.utils.R; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import io.swagger.annotations.*; |
| | | |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @author lixin |
| | |
| | | @GetMapping |
| | | @ApiOperation("查询订单操作日志") |
| | | @PreAuthorize("@el.check('orderOperationLog:list')") |
| | | public ResponseEntity<PageResult<OrderOperationLog>> queryOrderOperationLog(OrderOperationLogQueryCriteria criteria){ |
| | | public ResponseEntity<Object> queryOrderOperationLog(OrderOperationLogQueryCriteria criteria) { |
| | | Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize()); |
| | | return new ResponseEntity<>(orderOperationLogService.queryAll(criteria,page),HttpStatus.OK); |
| | | return new ResponseEntity<>(R.success(orderOperationLogService.queryAll(criteria, page)), HttpStatus.OK); |
| | | } |
| | | |
| | | @PostMapping |
| | |
| | | @PreAuthorize("@el.check('orderOperationLog:add')") |
| | | public ResponseEntity<Object> createOrderOperationLog(@Validated @RequestBody OrderOperationLog resources){ |
| | | orderOperationLogService.create(resources); |
| | | return new ResponseEntity<>(HttpStatus.CREATED); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.CREATED); |
| | | } |
| | | |
| | | @PutMapping |
| | |
| | | @PreAuthorize("@el.check('orderOperationLog:edit')") |
| | | public ResponseEntity<Object> updateOrderOperationLog(@Validated @RequestBody OrderOperationLog resources){ |
| | | orderOperationLogService.update(resources); |
| | | return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.NO_CONTENT); |
| | | } |
| | | |
| | | @DeleteMapping |
| | |
| | | @PreAuthorize("@el.check('orderOperationLog:del')") |
| | | public ResponseEntity<Object> deleteOrderOperationLog(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) { |
| | | orderOperationLogService.deleteAll(ids); |
| | | return new ResponseEntity<>(HttpStatus.OK); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.OK); |
| | | } |
| | | } |
| | |
| | | import com.oying.modules.sh.service.OrderProductSnapshotService; |
| | | import com.oying.modules.sh.domain.dto.OrderProductSnapshotQueryCriteria; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import io.swagger.annotations.*; |
| | | |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @author lixin |
| | |
| | | @GetMapping |
| | | @ApiOperation("查询订单商品快照") |
| | | @PreAuthorize("@el.check('orderProductSnapshot:list')") |
| | | public ResponseEntity<PageResult<OrderProductSnapshot>> queryOrderProductSnapshot(OrderProductSnapshotQueryCriteria criteria){ |
| | | public ResponseEntity<Object> queryOrderProductSnapshot(OrderProductSnapshotQueryCriteria criteria) { |
| | | Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize()); |
| | | return new ResponseEntity<>(orderProductSnapshotService.queryAll(criteria,page),HttpStatus.OK); |
| | | } |
| | |
| | | import com.oying.modules.sh.domain.OrderReturn; |
| | | import com.oying.modules.sh.service.OrderReturnService; |
| | | import com.oying.modules.sh.domain.dto.OrderReturnQueryCriteria; |
| | | import com.oying.utils.R; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import io.swagger.annotations.*; |
| | | |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @author lixin |
| | |
| | | @GetMapping |
| | | @ApiOperation("查询退款订单") |
| | | @PreAuthorize("@el.check('orderReturn:list')") |
| | | public ResponseEntity<PageResult<OrderReturn>> queryOrderReturn(OrderReturnQueryCriteria criteria){ |
| | | public ResponseEntity<Object> queryOrderReturn(OrderReturnQueryCriteria criteria) { |
| | | Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize()); |
| | | return new ResponseEntity<>(orderReturnService.queryAll(criteria,page),HttpStatus.OK); |
| | | return new ResponseEntity<>(R.success(orderReturnService.queryAll(criteria, page)), HttpStatus.OK); |
| | | } |
| | | |
| | | @PostMapping |
| | |
| | | @PreAuthorize("@el.check('orderReturn:add')") |
| | | public ResponseEntity<Object> createOrderReturn(@Validated @RequestBody OrderReturn resources){ |
| | | orderReturnService.create(resources); |
| | | return new ResponseEntity<>(HttpStatus.CREATED); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.CREATED); |
| | | } |
| | | |
| | | @PutMapping |
| | |
| | | @PreAuthorize("@el.check('orderReturn:edit')") |
| | | public ResponseEntity<Object> updateOrderReturn(@Validated @RequestBody OrderReturn resources){ |
| | | orderReturnService.update(resources); |
| | | return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.NO_CONTENT); |
| | | } |
| | | |
| | | @DeleteMapping |
| | |
| | | @PreAuthorize("@el.check('orderReturn:del')") |
| | | public ResponseEntity<Object> deleteOrderReturn(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) { |
| | | orderReturnService.deleteAll(ids); |
| | | return new ResponseEntity<>(HttpStatus.OK); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.OK); |
| | | } |
| | | } |
| | |
| | | import com.oying.modules.sh.domain.OrderReturnProductSnapshot; |
| | | import com.oying.modules.sh.service.OrderReturnProductSnapshotService; |
| | | import com.oying.modules.sh.domain.dto.OrderReturnProductSnapshotQueryCriteria; |
| | | import com.oying.utils.R; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import io.swagger.annotations.*; |
| | | |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @author lixin |
| | |
| | | @GetMapping |
| | | @ApiOperation("查询退款订单商品快照") |
| | | @PreAuthorize("@el.check('orderReturnProductSnapshot:list')") |
| | | public ResponseEntity<PageResult<OrderReturnProductSnapshot>> queryOrderReturnProductSnapshot(OrderReturnProductSnapshotQueryCriteria criteria){ |
| | | public ResponseEntity<Object> queryOrderReturnProductSnapshot(OrderReturnProductSnapshotQueryCriteria criteria) { |
| | | Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize()); |
| | | return new ResponseEntity<>(orderReturnProductSnapshotService.queryAll(criteria,page),HttpStatus.OK); |
| | | return new ResponseEntity<>(R.success(orderReturnProductSnapshotService.queryAll(criteria, page)), HttpStatus.OK); |
| | | } |
| | | |
| | | @PostMapping |
| | |
| | | @PreAuthorize("@el.check('orderReturnProductSnapshot:add')") |
| | | public ResponseEntity<Object> createOrderReturnProductSnapshot(@Validated @RequestBody OrderReturnProductSnapshot resources){ |
| | | orderReturnProductSnapshotService.create(resources); |
| | | return new ResponseEntity<>(HttpStatus.CREATED); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.CREATED); |
| | | } |
| | | |
| | | @PutMapping |
| | |
| | | @PreAuthorize("@el.check('orderReturnProductSnapshot:edit')") |
| | | public ResponseEntity<Object> updateOrderReturnProductSnapshot(@Validated @RequestBody OrderReturnProductSnapshot resources){ |
| | | orderReturnProductSnapshotService.update(resources); |
| | | return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.NO_CONTENT); |
| | | } |
| | | |
| | | @DeleteMapping |
| | |
| | | @PreAuthorize("@el.check('orderReturnProductSnapshot:del')") |
| | | public ResponseEntity<Object> deleteOrderReturnProductSnapshot(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) { |
| | | orderReturnProductSnapshotService.deleteAll(ids); |
| | | return new ResponseEntity<>(HttpStatus.OK); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.OK); |
| | | } |
| | | } |
| | |
| | | import com.oying.modules.sh.domain.OrderReturnReason; |
| | | import com.oying.modules.sh.service.OrderReturnReasonService; |
| | | import com.oying.modules.sh.domain.dto.OrderReturnReasonQueryCriteria; |
| | | import com.oying.utils.R; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import io.swagger.annotations.*; |
| | | |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @author lixin |
| | |
| | | @GetMapping |
| | | @ApiOperation("查询退货原因表") |
| | | @PreAuthorize("@el.check('orderReturnReason:list')") |
| | | public ResponseEntity<PageResult<OrderReturnReason>> queryOrderReturnReason(OrderReturnReasonQueryCriteria criteria){ |
| | | public ResponseEntity<Object> queryOrderReturnReason(OrderReturnReasonQueryCriteria criteria) { |
| | | Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize()); |
| | | return new ResponseEntity<>(orderReturnReasonService.queryAll(criteria,page),HttpStatus.OK); |
| | | return new ResponseEntity<>(R.success(orderReturnReasonService.queryAll(criteria, page)), HttpStatus.OK); |
| | | } |
| | | |
| | | @PostMapping |
| | |
| | | @PreAuthorize("@el.check('orderReturnReason:add')") |
| | | public ResponseEntity<Object> createOrderReturnReason(@Validated @RequestBody OrderReturnReason resources){ |
| | | orderReturnReasonService.create(resources); |
| | | return new ResponseEntity<>(HttpStatus.CREATED); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.CREATED); |
| | | } |
| | | |
| | | @PutMapping |
| | |
| | | @PreAuthorize("@el.check('orderReturnReason:edit')") |
| | | public ResponseEntity<Object> updateOrderReturnReason(@Validated @RequestBody OrderReturnReason resources){ |
| | | orderReturnReasonService.update(resources); |
| | | return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.NO_CONTENT); |
| | | } |
| | | |
| | | @DeleteMapping |
| | |
| | | @PreAuthorize("@el.check('orderReturnReason:del')") |
| | | public ResponseEntity<Object> deleteOrderReturnReason(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) { |
| | | orderReturnReasonService.deleteAll(ids); |
| | | return new ResponseEntity<>(HttpStatus.OK); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.OK); |
| | | } |
| | | } |
| | |
| | | import com.oying.modules.sh.domain.UserAddress; |
| | | import com.oying.modules.sh.service.UserAddressService; |
| | | import com.oying.modules.sh.domain.dto.UserAddressQueryCriteria; |
| | | import com.oying.utils.R; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import io.swagger.annotations.*; |
| | | |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @author lixin |
| | |
| | | @GetMapping |
| | | @ApiOperation("查询用户地址") |
| | | @PreAuthorize("@el.check('userAddress:list')") |
| | | public ResponseEntity<PageResult<UserAddress>> queryUserAddress(UserAddressQueryCriteria criteria){ |
| | | public ResponseEntity<Object> queryUserAddress(UserAddressQueryCriteria criteria) { |
| | | Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize()); |
| | | return new ResponseEntity<>(userAddressService.queryAll(criteria,page),HttpStatus.OK); |
| | | return new ResponseEntity<>(R.success(userAddressService.queryAll(criteria, page)), HttpStatus.OK); |
| | | } |
| | | |
| | | @PostMapping |
| | |
| | | @PreAuthorize("@el.check('userAddress:add')") |
| | | public ResponseEntity<Object> createUserAddress(@Validated @RequestBody UserAddress resources){ |
| | | userAddressService.create(resources); |
| | | return new ResponseEntity<>(HttpStatus.CREATED); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.CREATED); |
| | | } |
| | | |
| | | @PutMapping |
| | |
| | | @PreAuthorize("@el.check('userAddress:edit')") |
| | | public ResponseEntity<Object> updateUserAddress(@Validated @RequestBody UserAddress resources){ |
| | | userAddressService.update(resources); |
| | | return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.NO_CONTENT); |
| | | } |
| | | |
| | | @DeleteMapping |
| | |
| | | @PreAuthorize("@el.check('userAddress:del')") |
| | | public ResponseEntity<Object> deleteUserAddress(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) { |
| | | userAddressService.deleteAll(ids); |
| | | return new ResponseEntity<>(HttpStatus.OK); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.OK); |
| | | } |
| | | } |
| | |
| | | import com.oying.modules.system.domain.Merchant; |
| | | import com.oying.modules.system.service.MerchantService; |
| | | import com.oying.modules.system.domain.dto.MerchantsQueryCriteria; |
| | | import com.oying.utils.R; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import io.swagger.annotations.*; |
| | | |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @author lixin |
| | |
| | | @GetMapping |
| | | @ApiOperation("查询商户信息") |
| | | @PreAuthorize("@el.check('merchant:list')") |
| | | public ResponseEntity<PageResult<Merchant>> queryMerchants(MerchantsQueryCriteria criteria){ |
| | | public ResponseEntity<Object> queryMerchants(MerchantsQueryCriteria criteria) { |
| | | Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize()); |
| | | return new ResponseEntity<>(merchantService.queryAll(criteria,page),HttpStatus.OK); |
| | | return new ResponseEntity<>(R.success(merchantService.queryAll(criteria, page)), HttpStatus.OK); |
| | | } |
| | | |
| | | @PostMapping |
| | |
| | | @PreAuthorize("@el.check('merchant:add')") |
| | | public ResponseEntity<Object> createMerchants(@Validated @RequestBody Merchant resources){ |
| | | merchantService.create(resources); |
| | | return new ResponseEntity<>(HttpStatus.CREATED); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.CREATED); |
| | | } |
| | | |
| | | @PutMapping |
| | |
| | | @PreAuthorize("@el.check('merchant:edit')") |
| | | public ResponseEntity<Object> updateMerchants(@Validated @RequestBody Merchant resources){ |
| | | merchantService.update(resources); |
| | | return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.NO_CONTENT); |
| | | } |
| | | |
| | | @DeleteMapping |
| | |
| | | @PreAuthorize("@el.check('merchant:del')") |
| | | public ResponseEntity<Object> deleteMerchants(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) { |
| | | merchantService.deleteAll(ids); |
| | | return new ResponseEntity<>(HttpStatus.OK); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.OK); |
| | | } |
| | | } |
| | |
| | | import com.oying.modules.system.domain.UserMerchant; |
| | | import com.oying.modules.system.service.UserMerchantService; |
| | | import com.oying.modules.system.domain.dto.UserMerchantQueryCriteria; |
| | | import com.oying.utils.R; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import io.swagger.annotations.*; |
| | | |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @author lixin |
| | |
| | | @GetMapping |
| | | @ApiOperation("查询商户管理员信息") |
| | | @PreAuthorize("@el.check('userMerchant:list')") |
| | | public ResponseEntity<PageResult<UserMerchant>> queryUserMerchant(UserMerchantQueryCriteria criteria){ |
| | | public ResponseEntity<Object> queryUserMerchant(UserMerchantQueryCriteria criteria) { |
| | | Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize()); |
| | | return new ResponseEntity<>(userMerchantService.queryAll(criteria,page),HttpStatus.OK); |
| | | return new ResponseEntity<>(R.success(userMerchantService.queryAll(criteria, page)), HttpStatus.OK); |
| | | } |
| | | |
| | | @PostMapping |
| | |
| | | @PreAuthorize("@el.check('userMerchant:add')") |
| | | public ResponseEntity<Object> createUserMerchant(@Validated @RequestBody UserMerchant resources){ |
| | | userMerchantService.create(resources); |
| | | return new ResponseEntity<>(HttpStatus.CREATED); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.CREATED); |
| | | } |
| | | |
| | | @PutMapping |
| | |
| | | @PreAuthorize("@el.check('userMerchant:edit')") |
| | | public ResponseEntity<Object> updateUserMerchant(@Validated @RequestBody UserMerchant resources){ |
| | | userMerchantService.update(resources); |
| | | return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.NO_CONTENT); |
| | | } |
| | | |
| | | @DeleteMapping |
| | |
| | | @PreAuthorize("@el.check('userMerchant:del')") |
| | | public ResponseEntity<Object> deleteUserMerchant(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) { |
| | | userMerchantService.deleteAll(ids); |
| | | return new ResponseEntity<>(HttpStatus.OK); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.OK); |
| | | } |
| | | } |
| | |
| | | import com.oying.modules.system.domain.UserStore; |
| | | import com.oying.modules.system.service.UserStoreService; |
| | | import com.oying.modules.system.domain.dto.UserStoreQueryCriteria; |
| | | import com.oying.utils.R; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import io.swagger.annotations.*; |
| | | |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @author lixin |
| | |
| | | @GetMapping |
| | | @ApiOperation("查询门店管理信息") |
| | | @PreAuthorize("@el.check('userStore:list')") |
| | | public ResponseEntity<PageResult<UserStore>> queryUserStore(UserStoreQueryCriteria criteria){ |
| | | public ResponseEntity<Object> queryUserStore(UserStoreQueryCriteria criteria) { |
| | | Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize()); |
| | | return new ResponseEntity<>(userStoreService.queryAll(criteria,page),HttpStatus.OK); |
| | | return new ResponseEntity<>(R.success(userStoreService.queryAll(criteria, page)), HttpStatus.OK); |
| | | } |
| | | |
| | | @PostMapping |
| | |
| | | @PreAuthorize("@el.check('userStore:add')") |
| | | public ResponseEntity<Object> createUserStore(@Validated @RequestBody UserStore resources){ |
| | | userStoreService.create(resources); |
| | | return new ResponseEntity<>(HttpStatus.CREATED); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.CREATED); |
| | | } |
| | | |
| | | @PutMapping |
| | |
| | | @PreAuthorize("@el.check('userStore:edit')") |
| | | public ResponseEntity<Object> updateUserStore(@Validated @RequestBody UserStore resources){ |
| | | userStoreService.update(resources); |
| | | return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.NO_CONTENT); |
| | | } |
| | | |
| | | @DeleteMapping |