yshop1.4.2 商品新增多图评价,订单新增快递查询,导出最新sql
This commit is contained in:
@ -134,6 +134,10 @@ public class YxStoreOrder implements Serializable {
|
||||
@Column(name = "delivery_name")
|
||||
private String deliveryName;
|
||||
|
||||
@Column(name = "delivery_sn")
|
||||
private String deliverySn;
|
||||
|
||||
|
||||
// 发货类型
|
||||
@Column(name = "delivery_type")
|
||||
private String deliveryType;
|
||||
|
@ -1,5 +1,6 @@
|
||||
package co.yixiang.modules.shop.rest;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import co.yixiang.exception.BadRequestException;
|
||||
import co.yixiang.modules.shop.domain.YxStoreOrder;
|
||||
@ -8,6 +9,8 @@ import co.yixiang.modules.shop.service.YxStoreOrderService;
|
||||
import co.yixiang.aop.log.Log;
|
||||
import co.yixiang.modules.shop.service.YxStoreOrderStatusService;
|
||||
import co.yixiang.modules.shop.service.dto.YxStoreOrderQueryCriteria;
|
||||
import co.yixiang.modules.system.service.DictDetailService;
|
||||
import co.yixiang.modules.system.service.dto.DictDetailDTO;
|
||||
import co.yixiang.utils.OrderUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
@ -33,6 +36,9 @@ public class YxStoreOrderController {
|
||||
@Autowired
|
||||
private YxStoreOrderStatusService yxStoreOrderStatusService;
|
||||
|
||||
@Autowired
|
||||
private DictDetailService dictDetailService;
|
||||
|
||||
@GetMapping(value = "/data/count")
|
||||
//@PreAuthorize("hasAnyRole('ADMIN','YXSTOREORDER_ALL','YXSTOREORDER_SELECT')")
|
||||
public ResponseEntity getCount(){
|
||||
@ -114,8 +120,17 @@ public class YxStoreOrderController {
|
||||
@PutMapping(value = "/yxStoreOrder")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTOREORDER_ALL','YXSTOREORDER_EDIT')")
|
||||
public ResponseEntity update(@Validated @RequestBody YxStoreOrder resources){
|
||||
|
||||
DictDetailDTO dictDetailDTO = dictDetailService.findById(Long.valueOf(resources
|
||||
.getDeliveryName()));
|
||||
if(ObjectUtil.isNull(dictDetailDTO)){
|
||||
throw new BadRequestException("请先添加快递公司");
|
||||
}
|
||||
resources.setStatus(1);
|
||||
resources.setDeliveryType("express");
|
||||
resources.setDeliveryName(dictDetailDTO.getLabel());
|
||||
resources.setDeliverySn(dictDetailDTO.getValue());
|
||||
|
||||
yxStoreOrderService.update(resources);
|
||||
|
||||
YxStoreOrderStatus storeOrderStatus = new YxStoreOrderStatus();
|
||||
|
@ -1,5 +1,6 @@
|
||||
package co.yixiang.modules.system.rest;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import co.yixiang.exception.BadRequestException;
|
||||
import co.yixiang.aop.log.Log;
|
||||
import co.yixiang.modules.system.domain.Dict;
|
||||
@ -37,6 +38,7 @@ public class DictController {
|
||||
@PostMapping(value = "/dict")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','DICT_ALL','DICT_CREATE')")
|
||||
public ResponseEntity create(@Validated @RequestBody Dict resources){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
if (resources.getId() != null) {
|
||||
throw new BadRequestException("A new "+ ENTITY_NAME +" cannot already have an ID");
|
||||
}
|
||||
@ -47,6 +49,7 @@ public class DictController {
|
||||
@PutMapping(value = "/dict")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','DICT_ALL','DICT_EDIT')")
|
||||
public ResponseEntity update(@Validated(Dict.Update.class) @RequestBody Dict resources){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
dictService.update(resources);
|
||||
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
@ -55,6 +58,7 @@ public class DictController {
|
||||
@DeleteMapping(value = "/dict/{id}")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','DICT_ALL','DICT_DELETE')")
|
||||
public ResponseEntity delete(@PathVariable Long id){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
dictService.delete(id);
|
||||
return new ResponseEntity(HttpStatus.OK);
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package co.yixiang.modules.system.rest;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import co.yixiang.exception.BadRequestException;
|
||||
import co.yixiang.aop.log.Log;
|
||||
import co.yixiang.modules.system.domain.DictDetail;
|
||||
@ -56,6 +57,7 @@ public class DictDetailController {
|
||||
@PostMapping(value = "/dictDetail")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','DICT_ALL','DICT_CREATE')")
|
||||
public ResponseEntity create(@Validated @RequestBody DictDetail resources){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
if (resources.getId() != null) {
|
||||
throw new BadRequestException("A new "+ ENTITY_NAME +" cannot already have an ID");
|
||||
}
|
||||
@ -66,6 +68,7 @@ public class DictDetailController {
|
||||
@PutMapping(value = "/dictDetail")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','DICT_ALL','DICT_EDIT')")
|
||||
public ResponseEntity update(@Validated(DictDetail.Update.class) @RequestBody DictDetail resources){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
dictDetailService.update(resources);
|
||||
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
@ -74,6 +77,7 @@ public class DictDetailController {
|
||||
@DeleteMapping(value = "/dictDetail/{id}")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','DICT_ALL','DICT_DELETE')")
|
||||
public ResponseEntity delete(@PathVariable Long id){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
dictDetailService.delete(id);
|
||||
return new ResponseEntity(HttpStatus.OK);
|
||||
}
|
||||
|
Reference in New Issue
Block a user