提交 a78ca2eb 作者: zhenjie

订单相关代码

上级 e983a855
package com.mmc.oms.client;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.mmc.oms.model.dto.mall.*;
import com.mmc.oms.model.qo.mall.MallOrderGoodsInfoQO;
import com.mmc.oms.model.qo.mall.ProductSpecPriceQO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.*;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import org.springframework.web.client.RestTemplate;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author: zj
* @Date: 2023/6/8 11:18
*/
@Component
public class PmsClient {
@Value("${pms.url}")
private String pmsAppUri;
@Autowired
private RestTemplate restTemplate;
public List<MallGoodsShopCarDTO> fillGoodsInfo(List<MallGoodsShopCarDTO> param, String token){
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
headers.add("token", token);
HttpEntity<String> entity = new HttpEntity<>(JSONObject.toJSONString(param), headers);
ResponseEntity<List> responseEntity = restTemplate.exchange(pmsAppUri + "goods/fillGoodsInfo", HttpMethod.POST, entity, List.class);
if (CollectionUtils.isEmpty(responseEntity.getBody())) {
return null;
}
List<MallGoodsShopCarDTO> orderGoodsProdDTO = (List<MallGoodsShopCarDTO>) responseEntity.getBody().stream().map(it->new ObjectMapper().convertValue(it,MallGoodsShopCarDTO.class)).collect(Collectors.toList());
return orderGoodsProdDTO;
}
public List<OrderGoodsProdDTO> feignListProdGoodsSkuInfo(MallOrderGoodsInfoQO mallOrderGoodsInfoQO, String token){
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
headers.add("token", token);
HttpEntity<String> entity = new HttpEntity<>(JSONObject.toJSONString(mallOrderGoodsInfoQO), headers);
ResponseEntity<List> responseEntity = restTemplate.exchange(pmsAppUri + "goods/feignListProdGoodsSkuInfo", HttpMethod.POST, entity, List.class);
if (CollectionUtils.isEmpty(responseEntity.getBody())) {
return null;
}
List<OrderGoodsProdDTO> orderGoodsProdDTO = (List<OrderGoodsProdDTO>) responseEntity.getBody().stream().map(it->new ObjectMapper().convertValue(it,OrderGoodsProdDTO.class)).collect(Collectors.toList());
//JSONArray.parseArray(responseEntity.getBody(),OrderGoodsProdDTO.class);
return orderGoodsProdDTO;
}
public List<OrderGoodsIndstDTO> feignListIndstGoodsSkuInfo(MallOrderGoodsInfoQO mallOrderGoodsInfoQO, String token){
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
headers.add("token", token);
HttpEntity<String> entity = new HttpEntity<>(JSONObject.toJSONString(mallOrderGoodsInfoQO), headers);
ResponseEntity<List> responseEntity = restTemplate.exchange(pmsAppUri + "goods/feignListIndstGoodsSkuInfo", HttpMethod.POST, entity, List.class);
if (CollectionUtils.isEmpty(responseEntity.getBody())) {
return null;
}
List<OrderGoodsIndstDTO> indstDTOS = (List<OrderGoodsIndstDTO>) responseEntity.getBody().stream().map(it->new ObjectMapper().convertValue(it,OrderGoodsIndstDTO.class)).collect(Collectors.toList());
return indstDTOS;
}
public List<MallProductSpecPriceDTO> feignListProductSpecPrice(ProductSpecPriceQO productSpecPriceQO, String token){
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
headers.add("token", token);
HttpEntity<String> entity = new HttpEntity<>(JSONObject.toJSONString(productSpecPriceQO), headers);
ResponseEntity<List> responseEntity = restTemplate.exchange(pmsAppUri + "goods/feignListProductSpecPrice", HttpMethod.POST, entity, List.class);
if (CollectionUtils.isEmpty(responseEntity.getBody())) {
return null;
}
List<MallProductSpecPriceDTO> mallProductSpecPriceDTO = (List<MallProductSpecPriceDTO>) responseEntity.getBody().stream().map(it->new ObjectMapper().convertValue(it,MallProductSpecPriceDTO.class)).collect(Collectors.toList());
return mallProductSpecPriceDTO;
}
public ProductSpecPriceDTO feignGetUnitPriceByTag(Integer specId, Integer tagId, String token){
HttpHeaders headers = new HttpHeaders();
headers.add("token", token);
HttpEntity<String> entity = new HttpEntity<>(null, headers);
ResponseEntity<ProductSpecPriceDTO> responseEntity = restTemplate.exchange(pmsAppUri + "goods/feignGetUnitPriceByTag" + "?specId=" + specId + "&tagId=" + tagId, HttpMethod.GET, entity, ProductSpecPriceDTO.class);
return responseEntity.getBody();
}
}
package com.mmc.oms.client;
import com.alibaba.fastjson2.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.mmc.oms.model.dto.mall.CooperationTagDTO;
import com.mmc.oms.model.dto.mall.MallProductSpecPriceDTO;
import com.mmc.oms.model.dto.user.UserAccountSimpleDTO;
import com.mmc.oms.model.qo.mall.BUserAccountQO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.*;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import org.springframework.web.client.RestTemplate;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author: zj
* @Date: 2023/6/8 10:16
*/
@Component
public class UserClient {
@Value("${userapp.url}")
private String userAppUri;
@Autowired
private RestTemplate restTemplate;
/**
* 根据用户id获取基本信息
* @param userAccountId
* @return
*/
public UserAccountSimpleDTO feignGetUserSimpleInfo(Integer userAccountId, String token){
HttpHeaders headers = new HttpHeaders();
headers.add("token", token);
HttpEntity<String> entity = new HttpEntity<>(null, headers);
ResponseEntity<UserAccountSimpleDTO> responseEntity = restTemplate.exchange(userAppUri + "user-account/feignGetUserSimpleInfo" + "?userAccountId=" + userAccountId, HttpMethod.GET, entity, UserAccountSimpleDTO.class);
return responseEntity.getBody();
}
/**
* 根据地区信息查询用户id
* @param provinceCode
* @param cityCode
* @param districtCode
* @return
*/
public List<Integer> feignListUserAccountIds(Integer provinceCode, Integer cityCode,
Integer districtCode, String token){
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
headers.add("token", token);
HttpEntity<String> entity = new HttpEntity<>(null, headers);
String param = "";
if (provinceCode != null){
param = "provinceCode=" + provinceCode;
}
if (cityCode != null){
param += "&cityCode=" + cityCode;
}
if (districtCode != null){
param += "&districtCode=" + districtCode;
}
ResponseEntity<List> exchange = restTemplate.exchange(userAppUri + "user-account/feignListUserAccountIds?" + param, HttpMethod.GET, entity, List.class);
List<Integer> ids = exchange.getBody();
return ids;
}
/**
* 获取用户集合列表页面
*
* @param bUserAccountQO 问:b用户帐户
* @return {@link List}<{@link UserAccountSimpleDTO}>
*/
public List<UserAccountSimpleDTO> feignListBAccountPage(BUserAccountQO bUserAccountQO, String token){
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
headers.add("token", token);
HttpEntity<String> entity = new HttpEntity<>(JSONObject.toJSONString(bUserAccountQO), headers);
ResponseEntity<List> responseEntity = restTemplate.exchange(userAppUri + "back-user/feignListBAccountPage", HttpMethod.POST, entity, List.class);
if (CollectionUtils.isEmpty(responseEntity.getBody())) {
return null;
}
List<UserAccountSimpleDTO> users = (List<UserAccountSimpleDTO>) responseEntity.getBody().stream().map(it->new ObjectMapper().convertValue(it,UserAccountSimpleDTO.class)).collect(Collectors.toList());
return users;
}
/**
* 根据用户id查询用户信息
* @param ids
* @param token
* @return
*/
public List<UserAccountSimpleDTO> feignListUserAccountByIds(List<Integer> ids, String token){
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
headers.add("token", token);
HttpEntity<String> entity = new HttpEntity<>(JSONObject.toJSONString(ids), headers);
ResponseEntity<List> responseEntity = restTemplate.exchange(userAppUri + "user-account/feignListUserAccountByIds", HttpMethod.POST, entity, List.class);
if (CollectionUtils.isEmpty(responseEntity.getBody())) {
return null;
}
List<UserAccountSimpleDTO> users = (List<UserAccountSimpleDTO>) responseEntity.getBody().stream().map(it->new ObjectMapper().convertValue(it,UserAccountSimpleDTO.class)).collect(Collectors.toList());
return users;
}
/**
* 查询推荐人信息
* @param userIds
* @return
*/
public List<UserAccountSimpleDTO> feignListRcdUserInfo(List<Integer> userIds, String token){
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
headers.add("token", token);
HttpEntity<String> entity = new HttpEntity<>(JSONObject.toJSONString(userIds), headers);
ResponseEntity<List> responseEntity = restTemplate.exchange(userAppUri + "user-account/feignListRcdUserInfo", HttpMethod.POST, entity, List.class);
if (CollectionUtils.isEmpty(responseEntity.getBody())) {
return null;
}
List<UserAccountSimpleDTO> users = (List<UserAccountSimpleDTO>) responseEntity.getBody().stream().map(it->new ObjectMapper().convertValue(it,UserAccountSimpleDTO.class)).collect(Collectors.toList());
return users;
}
/**
* 查询上级id
* @param userAccountId
* @return
*/
public Integer feignGetSuperiorRef(Integer userAccountId, String token){
HttpHeaders headers = new HttpHeaders();
headers.add("token", token);
HttpEntity<String> entity = new HttpEntity<>(null, headers);
ResponseEntity<Integer> responseEntity = restTemplate.exchange(userAppUri + "user-account/feignGetSuperiorRef" + "?userAccountId=" + userAccountId, HttpMethod.GET, entity, Integer.class);
return responseEntity.getBody();
}
/**
* 查询上级推荐人信息
* @param userAccountId
* @return
*/
public UserAccountSimpleDTO feignGetUserRcdInfo(Integer userAccountId, String token){
HttpHeaders headers = new HttpHeaders();
headers.add("token", token);
HttpEntity<String> entity = new HttpEntity<>(null, headers);
ResponseEntity<UserAccountSimpleDTO> responseEntity = restTemplate.exchange(userAppUri + "user-account/feignGetUserRcdInfo" + "?userAccountId=" + userAccountId, HttpMethod.GET, entity, UserAccountSimpleDTO.class);
return responseEntity.getBody();
}
/**
* 用户合作标签
* @return
*/
public List<CooperationTagDTO> feignListCooperationTag(){
ResponseEntity<List> responseEntity = restTemplate.getForEntity(userAppUri + "cooperation/feignListCooperationTag", List.class);
if (CollectionUtils.isEmpty(responseEntity.getBody())) {
return null;
}
List<CooperationTagDTO> cooperationTagDTO = (List<CooperationTagDTO>) responseEntity.getBody().stream().map(it->new ObjectMapper().convertValue(it,CooperationTagDTO.class)).collect(Collectors.toList());
return cooperationTagDTO;
}
}
package com.mmc.oms.common;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* author:zhenjie
* Date:2023/2/6
* time:15:44
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class KDNCallBackResponse implements Serializable {
private static final long serialVersionUID = 7993641230087715933L;
private String EBusinessID;
private String UpdateTime;
private Boolean Success;
private String Reason;
}
...@@ -4,6 +4,7 @@ import org.springframework.context.annotation.Bean; ...@@ -4,6 +4,7 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.http.client.ClientHttpRequestFactory; import org.springframework.http.client.ClientHttpRequestFactory;
import org.springframework.http.client.SimpleClientHttpRequestFactory; import org.springframework.http.client.SimpleClientHttpRequestFactory;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
/** /**
...@@ -24,4 +25,9 @@ public class RestTemplateConfig { ...@@ -24,4 +25,9 @@ public class RestTemplateConfig {
factory.setReadTimeout(5000); factory.setReadTimeout(5000);
return factory; return factory;
} }
@Bean
public MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter(){
return new MappingJackson2HttpMessageConverter();
}
} }
package com.mmc.oms.controller;
import com.mmc.oms.common.publicinterface.Insert;
import com.mmc.oms.common.publicinterface.Update;
import com.mmc.oms.common.result.ResultBody;
import com.mmc.oms.model.dto.mall.UserAddressDTO;
import com.mmc.oms.model.qo.mall.UserAddressQO;
import com.mmc.oms.model.vo.mall.UserAddressVO;
import com.mmc.oms.service.UserAddressService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
* @author: zj
* @Date: 2023/6/7 10:11
*/
@RestController
@RequestMapping("/user-address/")
@Api(tags = {"地址管理"})
public class UserAddressController extends BaseController{
@Autowired
private UserAddressService userAddressService;
/**
* 添加地址
* @param request
* @param param
* @return
*/
@ApiOperation(value = "新增用户地址")
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) })
@PostMapping("insert")
public ResultBody insert(HttpServletRequest request, @RequestBody @Validated(Insert.class) UserAddressVO param) {
return userAddressService.insert(param,this.getCurrentAccount(request));
}
@ApiOperation(value = "编辑用户地址")
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) })
@PostMapping("update")
public ResultBody update(@RequestBody @Validated(Update.class) UserAddressVO param, HttpServletRequest request) {
return userAddressService.update(param,this.getCurrentAccount(request));
}
@ApiOperation(value = "删除用户地址-根据id")
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) })
@GetMapping("deleteById")
public ResultBody deleteById(Integer id){
return userAddressService.deleteById(id);
}
@ApiOperation(value = "根据id查询地址")
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = UserAddressDTO.class) })
@ApiIgnore
@GetMapping("getUserAddressInfo")
public UserAddressDTO getUserAddressInfo(@RequestParam Integer userAddressId){
return userAddressService.getUserAddressInfo(userAddressId);
}
@ApiOperation(value = "查询用户地址列表-条件查询")
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = UserAddressDTO.class) })
@PostMapping("selectList")
public ResultBody<List<UserAddressDTO>> selectList(@RequestBody UserAddressQO param, HttpServletRequest request) {
return userAddressService.selectList(param, this.getCurrentAccount(request));
}
}
package com.mmc.oms.controller.mall;
import com.mmc.oms.common.publicinterface.Auto;
import com.mmc.oms.common.publicinterface.Confirm;
import com.mmc.oms.common.result.ResultBody;
import com.mmc.oms.controller.BaseController;
import com.mmc.oms.model.vo.mall.OrderPayVO;
import com.mmc.oms.service.mall.MallOrderService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
* @author 作者 geDuo
* @version 创建时间:2022年3月18日 下午8:09:54
* @explain 类说明
*/
//@Api(tags = { "小程序-订单管理-接口" })
@RestController
@RequestMapping("/amorder/")
public class AMOrderController extends BaseController {
@Autowired
private MallOrderService mallOrderService;
// @ApiOperation(value = "订单列表-查询")
// @ApiResponses({ @ApiResponse(code = 200, message = "OK", response = MallOrderDTO.class) })
// @GetMapping("listPage")
// public ResultBody listPage(@RequestParam Integer pageNo, @RequestParam Integer pageSize,
// @RequestParam(required = false) String keyword, @RequestParam(required = false) Integer showType,
// @ApiParam(value = "all全部-doing进行中") @RequestParam(required = false) String orderType,
// HttpServletRequest request) {
// return ResultBody.success(mallOrderService.listPage(pageNo, pageSize, keyword, orderType, this.getCurrentAccount(request)));
// }
@ApiOperation(value = "首次付款-上传支付凭证/重新上传支付凭证", hidden = true)
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) })
@PostMapping("orderPay")
public ResultBody orderPay(@Validated(value = { Confirm.class }) @RequestBody OrderPayVO param, HttpServletRequest request) {
return mallOrderService.orderPay(param, this.getCurrentAccount(request));
}
@ApiOperation(value = "重新上传尾款与验收凭证(新)", hidden = true)
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) })
@PostMapping("afterPayAndCheck")
public ResultBody afterPayAndCheck(@Validated(value = { Confirm.class }) @RequestBody List<OrderPayVO> param, HttpServletRequest request) {
return mallOrderService.afterPayAndCheck(param, this.getCurrentAccount(request));
}
@ApiOperation(value = "继续上传全款、预付款、尾款、验收凭证", hidden = true)
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) })
@PostMapping("continuePayAndCheck")
public ResultBody continuePayAndCheck(@Validated(value = { Confirm.class }) @RequestBody List<OrderPayVO> param, HttpServletRequest request) {
return mallOrderService.continuePayAndCheck(param, this.getCurrentAccount(request));
}
@ApiOperation(value = "确认收货", hidden = true)
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) })
@PostMapping("confirmReceipt")
public ResultBody confirmReceipt(@Validated(value = { Auto.class }) @RequestBody OrderPayVO param,
HttpServletRequest request) {
return mallOrderService.confirmReceipt(param, this.getCurrentAccount(request));
}
@ApiOperation(value = "取消订单", hidden = true)
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) })
@GetMapping("closeOrder")
public ResultBody closeOrder(@RequestParam Long orderId, @RequestParam(required = false) String shutReason,
HttpServletRequest request) {
return mallOrderService.closeOrder(orderId, shutReason, this.getCurrentAccount(request));
}
// @ApiOperation(value = "订单详情")
// @ApiResponses({ @ApiResponse(code = 200, message = "OK", response = MallOrderDTO.class) })
// @GetMapping("orderDetail")
// public ResultBody orderDetail(@RequestParam Long orderId, HttpServletRequest request) {
// return ResultBody.success(mallOrderService.appOrderDetail(orderId,this.getCurrentAccount(request)));
// }
@ApiOperation(value = "发送服务消息通知", hidden = true)
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) })
@GetMapping("sendOrderStatusChangeMsg")
public void sendOrderStatusChangeMsg(@RequestParam Long orderId) {
mallOrderService.sendOrderStatusChangeMsg(orderId);
}
}
package com.mmc.oms.controller.mall;
import com.mmc.oms.common.result.ResultBody;
import com.mmc.oms.controller.BaseController;
import com.mmc.oms.model.dto.mall.CountShowTypeDTO;
import com.mmc.oms.model.dto.mall.MallOrderDTO;
import com.mmc.oms.model.dto.mall.MallOrderPageDTO;
import com.mmc.oms.model.vo.mall.ConfirmMallOrderVO;
import com.mmc.oms.model.vo.mall.MallConfirmOrderVO;
import com.mmc.oms.service.mall.AppMallOrderService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletRequest;
/**
* @author
*/
@Api(tags = {"小程序-订单管理-接口(改版后)"})
@RestController
@RequestMapping("/app-order/")
public class AppMallOrderController extends BaseController {
@Autowired
private AppMallOrderService appMallOrderService;
@ApiOperation(value = "提交订单(意向)-改版后", hidden = true)
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = MallOrderDTO.class)})
@PostMapping("addMallOrder")
public ResultBody addMallOrder(@RequestBody ConfirmMallOrderVO param, HttpServletRequest request) throws Exception {
return appMallOrderService.addMallOrder(param, this.getCurrentAccount(request));
}
@ApiOperation(value = "订单列表-查询", hidden = true)
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = MallOrderPageDTO.class)})
@GetMapping("listPage")
public ResultBody listPage(@RequestParam Integer pageNo, @RequestParam Integer pageSize,
@RequestParam(required = false) String keyword, @RequestParam(required = false) Integer showType,
@ApiParam(value = "all全部-doing进行中") @RequestParam(required = false) String orderType,
HttpServletRequest request) {
return ResultBody.success(appMallOrderService.listAPPPage(pageNo, pageSize, keyword, showType, orderType, this.getCurrentAccount(request)));
}
@ApiOperation(value = "订单列表-数量查询", hidden = true)
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = CountShowTypeDTO.class) })
@GetMapping("countListPage")
public ResultBody countListPage(HttpServletRequest request) {
return ResultBody.success(appMallOrderService.countListPage(this.getCurrentAccount(request)));
}
@ApiOperation(value = "订单信息--查询订单的分享状态", hidden = true)
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@ApiIgnore
@GetMapping("getShareOrderStatus")
public ResultBody getShareOrderStatus(@RequestParam @ApiParam(value = "订单id") Long orderId) {
return appMallOrderService.getShareOrderStatus(orderId);
}
@ApiOperation(value = "订单信息--接受共享", hidden = true)
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@GetMapping("acceptShare")
public ResultBody acceptShare(@RequestParam @ApiParam(value = "订单id") Long orderId, @RequestParam @ApiParam(value = "分享人id") Integer shareId) {
return appMallOrderService.acceptShare(orderId,shareId);
}
@ApiOperation(value = "退回合同", hidden = true)
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@GetMapping("returnContractById")
public ResultBody returnContractById(@RequestParam @ApiParam(value = "订单id") Long orderId) {
return appMallOrderService.returnContractById(orderId);
}
@ApiOperation(value = "确认订单V1.0.0")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = MallOrderDTO.class)})
@PostMapping("confirmMallOrder")
public ResultBody confirmMallOrder(@RequestBody MallConfirmOrderVO param, HttpServletRequest request) throws Exception {
return appMallOrderService.confirmMallOrder(param, this.getCurrentAccount(request), request.getHeader("token"));
}
@ApiOperation(value = "提交订单V1.0.0")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = MallOrderDTO.class)})
@PostMapping("commitMallOrder")
public ResultBody commitMallOrder(@RequestBody MallConfirmOrderVO param, HttpServletRequest request) throws Exception {
return appMallOrderService.commitMallOrder(param, this.getCurrentAccount(request), request.getHeader("token"));
}
@ApiOperation(value = "订单详情V1.0.0", hidden = true)
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = MallOrderDTO.class) })
@GetMapping("getMallOrderDetailById")
public ResultBody getMallOrderDetailById(@RequestParam Long orderId, HttpServletRequest request) {
return ResultBody.success(appMallOrderService.getMallOrderDetailById(orderId,this.getCurrentAccount(request)));
}
}
package com.mmc.oms.controller.mall;
import com.mmc.oms.common.KDNCallBackResponse;
import com.mmc.oms.common.result.ResultBody;
import com.mmc.oms.controller.BaseController;
import com.mmc.oms.model.dto.mall.MallStatusDTO;
import com.mmc.oms.model.dto.mall.OrderPayDTO;
import com.mmc.oms.model.dto.kdn.KdnDicDTO;
import com.mmc.oms.model.dto.order.ExpressInfoDTO;
import com.mmc.oms.service.mall.KdnExpService;
import com.mmc.oms.service.mall.MallOrderService;
import com.mmc.oms.service.mall.OrderExpressService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.Map;
/**
* @author 作者 geDuo
* @version 创建时间:2022年3月22日 下午9:02:03
* @explain 类说明
*/
@Api(tags = { "订单信息-接口" })
@RestController
@RequestMapping("/mallorder/")
public class MallOrderController extends BaseController {
@Autowired
private MallOrderService mallOrderService;
@Autowired
private OrderExpressService orderExpressService;
@Autowired
private KdnExpService kdnExpService;
@ApiOperation(value = "订单状态-字典")
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = MallStatusDTO.class) })
@GetMapping("")
public ResultBody listOrderStatus() {
return ResultBody.success(mallOrderService.listOrderStatus());
}
@ApiOperation(value = "物流-状态码-字典")
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = KdnDicDTO.class) })
@GetMapping("listKdnDic")
public ResultBody listKdnDic() {
return ResultBody.success(kdnExpService.listKdnDic());
}
@ApiOperation(value = "物流公司-字典")
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ExpressInfoDTO.class) })
@GetMapping("listExpressInfo")
public ResultBody listExpressInfo() {
return ResultBody.success(orderExpressService.listExpressInfo());
}
@ApiOperation(value = "订单-查看支付凭证", hidden = true)
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = OrderPayDTO.class) })
@GetMapping("getOrderPay")
public ResultBody getOrderPay(@RequestParam Long orderId, @ApiParam("凭证类型(留空则全部):0全款 1预付款 2尾款 3验收单") @RequestParam(required = false) Integer payType, HttpServletRequest request) {
return ResultBody.success(mallOrderService.listOrderPayInfo(orderId, payType, this.getCurrentAccount(request)));
}
@ApiOperation(value = "修改订单的付款期限", hidden = true)
@GetMapping("updateMallOrder")
@ApiIgnore
public ResultBody updateMallOrder(@RequestParam Long orderId, @RequestParam Date singerTime){
return mallOrderService.updateMallOrder(orderId,singerTime);
}
@ApiOperation(value = "修改订单的合同状态", hidden = true)
@GetMapping("updateStatusMallOrder")
public ResultBody updateStatusMallOrder(@RequestParam Long orderId, @RequestParam Integer signStatus){
return mallOrderService.updateStatusMallOrder(orderId,signStatus);
}
@ApiOperation(value = "物流信息回调接收", hidden = true)
@PostMapping("callbackExpressInfo")
public KDNCallBackResponse callbackExpressInfo(@RequestParam Map<String, Object> map){
return kdnExpService.callbackExpressInfo(map);
}
@ApiOperation(value = "测试物流订阅", hidden = true)
@GetMapping("testCallbackExpressInfo")
public ResultBody testCallbackExpressInfo(@RequestParam String port, @RequestParam Long orderId, @RequestParam String shipperCode,
@RequestParam String logisticCode, @RequestParam String phone) throws Exception {
return kdnExpService.testCallbackExpressInfo(port, orderId, shipperCode, logisticCode, phone);
}
}
package com.mmc.oms.controller.mall;
import com.mmc.oms.common.result.ResultBody;
import com.mmc.oms.controller.BaseController;
import com.mmc.oms.service.mall.MallOrderService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
/**
* @author 作者 geDuo
* @version 创建时间:2022年3月18日 下午8:08:01
* @explain 类说明
*/
@Api(tags = { "平台-订单管理-接口" }, hidden = true)
@RestController
@RequestMapping("/pmorder/")
public class PMOrderController extends BaseController {
@Autowired
private MallOrderService mallOrderService;
// @ApiOperation(value = "(新)确认订单")
// @ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) })
// @PostMapping("confirmOrderVerOne")
// public ResultBody confirmOrderVerOne(@RequestBody ConfirmOrderVO confirmOrderVO, HttpServletRequest request) {
// return mallOrderService.confirmOrderVerOne(confirmOrderVO, this.getCurrentAccount(request));
// }
// @ApiOperation(value = "审批-首次收款(通过或不通过)")
// @ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) })
// @GetMapping("confirmCost")
// public ResultBody confirmCost(@ApiParam(value = "订单id") @RequestParam Long orderId,
// @ApiParam(value = "审核状态:0拒绝/1通过") @RequestParam Integer checkStatus,
// @ApiParam(value = "驳回原因") @RequestParam(required = false) String refuseReason,
// @ApiParam(value = "支付凭证-图片") @RequestParam(required = false) List<String> vouchr,
// HttpServletRequest request) {
// return mallOrderService.confirmCost(orderId, checkStatus, refuseReason,vouchr,null,this.getCurrentAccount(request));
// }
// @ApiOperation(value = "审批-尾款(通过或不通过)")
// @ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) })
// @GetMapping("confirmAfPay")
// public ResultBody confirmAfPay(@ApiParam(value = "订单id") @RequestParam Long orderId,
// @ApiParam(value = "审核状态:0拒绝/1通过") @RequestParam Integer checkStatus,
// @ApiParam(value = "驳回原因") @RequestParam(required = false) String refuseReason,
// @ApiParam(value = "支付凭证-图片") @RequestParam(required = false) List<String> vouchr,
// HttpServletRequest request) {
// return mallOrderService.confirmAfPay(orderId, checkStatus, refuseReason,vouchr,2, this.getCurrentAccount(request));
// }
// @ApiOperation(value = "审批-首次收款(通过或不通过)[新]")
// @ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) })
// @PostMapping("confirmCostVerOne")
// public ResultBody confirmCostVerOne(@RequestBody @Validated ConfirmAfPayVO confirmPay, HttpServletRequest request) {
// return mallOrderService.confirmCostVerOne(confirmPay,this.getCurrentAccount(request));
// }
//
// @ApiOperation(value = "审批-尾款(通过或不通过)[新]")
// @ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) })
// @PostMapping("confirmAfPayVerOne")
// public ResultBody confirmAfPayVerOne(@RequestBody @Validated List<ConfirmAfPayVO> confirmPay, HttpServletRequest request) {
// if(CollectionUtils.isEmpty(confirmPay)){
// return ResultBody.error("参数不能为空");
// }
// for (ConfirmAfPayVO confirmAfPay : confirmPay) {
// mallOrderService.confirmAfPayVerOne(confirmAfPay, this.getCurrentAccount(request));
// }
// return ResultBody.success();
// }
@ApiOperation(value = "确认库存", hidden = true)
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) })
@GetMapping("confirmInventory")
public ResultBody confirmInventory(@RequestParam Long orderId, HttpServletRequest request) {
return mallOrderService.confirmInventory(orderId, this.getCurrentAccount(request));
}
// @ApiOperation(value = "代工-上传尾款凭证")
// @ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) })
// @PostMapping("orderPayFinish")
// public ResultBody orderPayFinish(@Validated(value = { Confirm.class }) @RequestBody OrderPayVO param,
// HttpServletRequest request) {
// return mallOrderService.orderPayFinish(param, this.getCurrentAccount(request));
// }
// @ApiOperation(value = "菜单红点-待处理的订单数量")
// @ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) })
// @GetMapping("countMenuRedPoint")
// public ResultBody countMenuRedPoint(HttpServletRequest request) {
// return ResultBody.success(mallOrderService.countMenuRedPoint(this.getCurrentAccount(request)));
// }
// @ApiOperation(value = "订单关闭-根据id")
// @ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) })
// @GetMapping("deleteById")
// public ResultBody closeMallOrder(@RequestParam Long id, HttpServletRequest request) {
// return mallOrderService.closeMallOrder(id,this.getCurrentAccount(request));
// }
// @ApiOperation(value = "分配运营")
// @ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) })
// @GetMapping("allocateOperation")
// public ResultBody allocateOperation(@ApiParam(value = "订单id")@RequestParam(value = "orderId") Long orderId,
// @ApiParam(value = "运营id") @RequestParam(value = "operationId") Integer operationId) {
// return mallOrderService.allocateOperation(orderId,operationId);
// }
}
package com.mmc.oms.controller.mall;
import com.mmc.oms.common.publicinterface.Query;
import com.mmc.oms.common.result.ResultBody;
import com.mmc.oms.controller.BaseController;
import com.mmc.oms.model.dto.mall.MallGoodsShopCarDTO;
import com.mmc.oms.model.vo.mall.ConfirmMallOrderVO;
import com.mmc.oms.model.vo.mall.MallShopCarVO;
import com.mmc.oms.service.mall.ShoppingTrolleyService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
* author:zhenjie
* Date:2022/10/11
* time:10:21
*/
//@Api(tags = { "小程序-购物车-接口(改版后)" })
@RestController
@RequestMapping("/shopping-trolley/")
public class ShoppingTrolleyController extends BaseController {
@Autowired
private ShoppingTrolleyService shoppingTrolleyService;
@ApiOperation(value = "加入购物车", hidden = true)
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) })
@PostMapping("addGoods")
public ResultBody addGoods(@RequestBody MallShopCarVO mallShopCarVO, HttpServletRequest request){
return shoppingTrolleyService.addGoods(mallShopCarVO, this.getCurrentAccount(request));
}
@ApiOperation(value = "移除购物车", hidden = true)
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) })
@PostMapping("batchRemove/{type}")
public ResultBody batchRemove(@RequestBody List<Integer> carIds, @PathVariable Integer type, HttpServletRequest request) {
return shoppingTrolleyService.batchRemove(type, carIds, this.getCurrentAccount(request));
}
@ApiOperation(value = "购物车列表", hidden = true)
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = MallGoodsShopCarDTO.class) })
@GetMapping("listPage")
public ResultBody listPage(@RequestParam Integer pageNo, @RequestParam Integer pageSize,
HttpServletRequest request) {
return shoppingTrolleyService.listPage(pageNo, pageSize, this.getCurrentAccount(request));
}
@ApiOperation(value = "修改数量", hidden = true)
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) })
@GetMapping("updateBuyNum")
public ResultBody updateBuyNum(@RequestParam(required = true) Integer directoryId, @RequestParam(required = true) Integer mallShopCarId,
@ApiParam("改变的数量(正加负减)") @RequestParam(required = true) Integer buyNum, HttpServletRequest request) {
return shoppingTrolleyService.updateBuyNum(directoryId, mallShopCarId, buyNum, this.getCurrentAccount(request));
}
@ApiOperation(value = "购物车-提交订单-批量获取商品信息", hidden = true)
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) })
@PostMapping("confirmOrder")
public ResultBody confirmOrder(@Validated(Query.class) @RequestBody ConfirmMallOrderVO param, HttpServletRequest request) {
return shoppingTrolleyService.confirmShop(param, this.getCurrentAccount(request));
}
// @ApiOperation(value = "购物车导出")
// @ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) })
// @PostMapping("listShoppingTrolleyExport")
// public ResultBody listShoppingTrolleyExport(@Validated(Query.class) @RequestBody List<ConfirmShopVO> shopCarList, HttpServletRequest request, HttpServletResponse response) throws IOException {
// return shoppingTrolleyService.listShoppingTrolleyExport(shopCarList, this.getCurrentAccount(request), response);
// }
}
package com.mmc.oms.dao;
import com.mmc.oms.entity.mall.UserAddressDO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* @author: zj
* @Date: 2023/6/7 10:14
*/
@Mapper
public interface UserAddressDao {
void insert(UserAddressDO userAddressDO);
void update(UserAddressDO userAddressDO);
void removeById(Integer id);
UserAddressDO selectById(Integer userAddressId);
List<UserAddressDO> selectList(UserAddressDO userAddressDO);
}
package com.mmc.oms.dao.mall;
import com.mmc.oms.entity.mall.*;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* author:zhenjie
* Date:2022/10/18
* time:16:06
*/
@Mapper
public interface AppMallOrderDao {
void batchInsertOrderGoodsProdDO(List<OrderGoodsProdDO> orderGoodsProdDOS);
void batchInsertOrderGoodsProdDetailDO(List<OrderGoodsProdDetailDO> orderGoodsProdDetailDOList);
void batchInsertOrderGoodsIndstDO(List<OrderGoodsIndstDO> orderGoodsIndstDOS);
void batchInsertOrderGoodsIndstDetailDO(List<OrderGoodsIndstDetailDO> orderGoodsIndstDetailDOS);
void batchInsertOrderGoodsIndstProdListDO(List<OrderGoodsIndstProdListDO> orderGoodsIndstProdListDOS);
List<MallOrderSimpleDO> listMallOrderSkuSpec(List<Long> orderIds);
void updateOrderShareInfo(Long orderId, Integer shareId);
void batchInsertOrderCoupon(List<OrderCouponDO> orderCouponDOS);
List<OrderCouponDO> listOrderCoupon(Long orderId);
}
package com.mmc.oms.dao.mall;
import com.mmc.oms.entity.mall.*;
import com.mmc.oms.model.qo.mall.MallOrderQO;
import com.mmc.oms.model.qo.mall.OrderBonusQO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author 作者 geDuo
* @version 创建时间:2022年3月20日 上午12:10:00
* @explain 类说明
*/
@Mapper
public interface MallOrderDao {
int insertMallOrder(MallOrderDO order);
// int batchInsertOrderGoods(List<OrderGoodsDO> list);
int countPageAmOrder(String keyword, String orderType, Integer userAccountId);
List<MallOrderDO> listPageAmOrder(Integer pageNo, Integer pageSize, String keyword, String orderType,
Integer userAccountId);
int countAppPageOrder(String keyword, String orderType, List<Integer> statusCodes, Integer userAccountId);
List<MallOrderDO> listAppPageAmOrder(Integer pageNo, Integer pageSize, String keyword, String orderType,
List<Integer> statusCodes, Integer userAccountId);
// List<OrderGoodsDO> listOrderGoods(List<Long> orderIds);
//
// List<OrderGoodsDO> listOrderGoodsInfo(Long orderId);
MallOrderDO getMallOrderInfo(Long orderId);
/**
* 获取订单付款期限,和状态(未付款)
* @param orderId
*/
List<MallOrderDO> getMallOrderCreditPeriod(List<Long> orderId);
Integer updateMallOrder(MallOrderDO order);
int insertOrderPay(OrderPayDO pay);
int updateOrderPay(OrderPayDO pay);
OrderPayDO getOrderPayInfo(Long orderId, Integer payType);
List<MallOrderStatusDO> listOrderStatus();
int insertOrderExpress(MallOrderExpressDO express);
MallOrderExpressDO getOrderExpress(Long orderId);
int countPagePmOrder(MallOrderQO param);
List<MallOrderDO> listPagePmOrder(MallOrderQO param);
int batchInsertOrderService(List<OrderServiceDO> list);
List<OrderServiceDO> listOrderService(Long orderId);
List<OrderPayDO> listOrderPay(Long orderId, Integer payType);
int countPMOrderConfirm(Integer statusCode);
String getSysOrderParam(String paramType);
List<MallOrderDO> listExportOrder(MallOrderQO param);
Integer deleteById(Integer id);
List<MallOrderDO> listPagePmOrderVerOne(MallOrderQO param);
int countPagePmOrderVerOne(MallOrderQO param);
List<MallOrderDO> listExportOrderVerOne(MallOrderQO param);
Integer updateMallOrderAddreId(@Param("mallOrderId") Long mallOrderId, @Param("userAddressId") Integer userAddressId);
void updateMallOrderRemark(Long mallOrderId, String remark);
/**
* 商城订单列表
*
* @param orderIds 订单id
* @return {@link List}<{@link MallOrderDO}>
*/
List<MallOrderDO> listMallOrder(List<Long> orderIds);
List<MallOrderDO> getMallOrderByStatus(@Param("code") Integer code);
void saveOrderPay(OrderPayDO upPay);
Integer countOrderForCouponUse(@Param("orderIds") List<Long> orderIds, Integer orderStatus);
MallOrderDO getOrderInfoByOrderNo(String orderNo);
int rollbackMallOrder(MallOrderDO order);
List<MallOrderDO> listFinishMallOrder(OrderBonusQO orderBonusQO);
int countListFinishMallOrder(OrderBonusQO orderBonusQO);
int countPageOrderInfo(List<Long> orderIds);
List<MallOrderDO> listOperationalExportOrder(List<Long> orderIds);
}
package com.mmc.oms.dao.mall;
import com.mmc.oms.entity.mall.MallOrderExpressDO;
import com.mmc.oms.entity.order.ExpressInfoDO;
import com.mmc.oms.entity.order.KdnDicDO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* @author 作者 geDuo
* @version 创建时间:2022年3月23日 下午5:48:40
* @explain 类说明
*/
@Mapper
public interface OrderExpressDao {
List<KdnDicDO> listKdnDic();
List<ExpressInfoDO> listExpressInfo();
void updateOrderExpress(MallOrderExpressDO orderExpressDO);
List<Long> listReceivedOrderIds();
}
package com.mmc.oms.dao.mall;
import com.mmc.oms.entity.mall.MallOrderSimpleDO;
import com.mmc.oms.entity.mall.OrderGoodsIndstProdListBO;
import com.mmc.oms.entity.mall.OrderGoodsIndstProdListDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* <p>
* Mapper 接口
* </p>
*
* @author dahang
* @since 2022-10-29
*/
@Mapper
public interface OrderGoodsIndstDao {
List<OrderGoodsIndstProdListBO> getProductInfoByMallId(@Param("orderId") Long orderId);
List<MallOrderSimpleDO> listOrderGoodsIndstBaseInfo(List<Long> mallOrderIds);
List<OrderGoodsIndstProdListDO> listIMallOrderProdList(Long orderId);
}
package com.mmc.oms.dao.mall;
import com.mmc.oms.entity.mall.MallOrderSimpleDO;
import com.mmc.oms.entity.mall.OrderGoodsProdDetailBO;
import com.mmc.oms.entity.mall.OrderGoodsProdDetailDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* <p>
* Mapper 接口
* </p>
*
* @author dahang
* @since 2022-10-29
*/
@Mapper
public interface OrderGoodsProdDao {
List<OrderGoodsProdDetailBO> getProductInfoByMallId(@Param("orderId") Long orderId);
List<MallOrderSimpleDO> listOrderGoodsProdBaseInfo(List<Long> mallOrderIds);
List<OrderGoodsProdDetailDO> listPMallOrderProdList(Long orderId);
}
package com.mmc.oms.dao.mall;
import com.mmc.oms.entity.mall.MallIndstShopCarDO;
import com.mmc.oms.entity.mall.MallProdShopCarDO;
import com.mmc.oms.model.qo.mall.MallShopCarQO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Set;
/**
* author:zhenjie
* Date:2022/10/11
* time:10:30
*/
@Mapper
public interface ShoppingTrolleyDao {
List<MallProdShopCarDO> listMallProdShopCar(MallShopCarQO mallShopCarQO);
void insertMallProdShopCar(MallProdShopCarDO mallProdShopCarDO);
void batchInsertMallProdShopCarDetail(Integer mallProdShopCarId, Set<Integer> mallSkuSpecIds);
void batchRemoveProd(Integer userAccountId, List<Integer> carIds);
MallProdShopCarDO getMallProdShopCar(MallProdShopCarDO prodShopCarDO);
void updateMallProdShopCar(MallProdShopCarDO mallProdShopCarDO1);
List<MallIndstShopCarDO> listMallIndstShopCar(MallShopCarQO mallShopCarQO);
void insertMallIndstShopCar(MallIndstShopCarDO mallIndstShopCarDO);
void batchInsertMallIndstShopCarDetail(Integer mallIndstShopCarId, Set<Integer> mallSkuSpecIds);
void batchRemoveIndst(Integer userAccountId, List<Integer> carIds);
MallIndstShopCarDO getMallIndstShopCar(MallIndstShopCarDO mallIndstShopCarDO);
void updateMallIndstShopCar(MallIndstShopCarDO mallIndstShopCarDO1);
int countProdListPage(Integer userAccountId);
List<MallProdShopCarDO> prodListPage(Integer pageNo, Integer pageSize, Integer userAccountId);
int countIndstListPage(Integer userAccountId);
List<MallIndstShopCarDO> indstListPage(Integer pageNo, Integer pageSize, Integer userAccountId);
void updateProductShopCarStatus(List<MallProdShopCarDO> mallProdShopCarDOS);
void updateIndustryShopCarStatus(List<MallIndstShopCarDO> mallIndstShopCarDOS);
void addProdShopCarBuyNum(Integer id, Integer buyNum);
void addIndstShopCarBuyNum(Integer id, Integer buyNum);
}
...@@ -63,7 +63,7 @@ public class GoodsInfoDO implements Serializable { ...@@ -63,7 +63,7 @@ public class GoodsInfoDO implements Serializable {
// private GoodsTypeDO goodsMasterType; // private GoodsTypeDO goodsMasterType;
// private GoodsTypeDO goodsSlaveType; // private GoodsTypeDO goodsSlaveType;
private String remark;// 底部备注 private String remark;// 底部备注
private Integer sortTypeId; private Integer directoryId;
private List<CategoryParamAndValueVO> paramAndValue; private List<CategoryParamAndValueVO> paramAndValue;
// private GoodsConfigExportDO goodsConfigExport;// 功能清单 // private GoodsConfigExportDO goodsConfigExport;// 功能清单
private Integer buyNum;// 购买数量 private Integer buyNum;// 购买数量
...@@ -91,7 +91,7 @@ public class GoodsInfoDO implements Serializable { ...@@ -91,7 +91,7 @@ public class GoodsInfoDO implements Serializable {
this.shelfStatus = goodsAddVO.getShelfStatus(); this.shelfStatus = goodsAddVO.getShelfStatus();
this.masterTypeId = goodsAddVO.getMasterTypeId(); this.masterTypeId = goodsAddVO.getMasterTypeId();
this.slaveTypeId = goodsAddVO.getSlaveTypeId(); this.slaveTypeId = goodsAddVO.getSlaveTypeId();
this.sortTypeId = goodsAddVO.getSortTypeId(); this.directoryId = goodsAddVO.getDirectoryId();
this.repoId = goodsAddVO.getRepoId(); this.repoId = goodsAddVO.getRepoId();
this.shareFlyServiceId = goodsAddVO.getShareFlyServiceId(); this.shareFlyServiceId = goodsAddVO.getShareFlyServiceId();
this.tag = goodsAddVO.getTag(); this.tag = goodsAddVO.getTag();
...@@ -103,7 +103,7 @@ public class GoodsInfoDO implements Serializable { ...@@ -103,7 +103,7 @@ public class GoodsInfoDO implements Serializable {
.status(this.shelfStatus) .status(this.shelfStatus)
.createTime(this.createTime) .createTime(this.createTime)
.imgUrl(this.mainImg) .imgUrl(this.mainImg)
.directoryId(this.sortTypeId) .directoryId(this.directoryId)
.directoryName(this.directoryName) .directoryName(this.directoryName)
.build(); .build();
} }
......
package com.mmc.oms.entity.mall;
import com.mmc.oms.model.dto.mall.MallGoodsShopCarDTO;
import com.mmc.oms.model.vo.mall.MallShopCarVO;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author: zj
* @Date: 2023/6/3 20:14
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("购物车-行业商品")
public class MallIndstShopCarDO implements Serializable {
private static final long serialVersionUID = -6119563034611575618L;
private Integer id;
private Integer userAccountId;
private Integer goodsInfoId;
private Integer buyNum;
private Integer saleStatus;
private Integer recMallUserId;
private String remark;
private Integer deleted;
private Date createTime;
private Date updateTime;
private List<MallIndstShopCarDetailDO> shopCarDetailDOS;
public MallIndstShopCarDO(MallShopCarVO param) {
this.userAccountId = param.getUserAccountId();
this.goodsInfoId = param.getGoodsInfoId();
this.buyNum = param.getBuyNum();
this.recMallUserId = param.getRecMallUserId();
this.remark = param.getRemark();
}
public MallGoodsShopCarDTO buildMallGoodsShopCarDTO(){
return MallGoodsShopCarDTO.builder().id(this.id).userAccountId(this.userAccountId).goodsInfoId(this.goodsInfoId).buyNum(this.buyNum).directoryId(2)
.saleStatus(this.saleStatus).recMallUserId(this.recMallUserId).remark(this.remark).deleted(this.deleted).createTime(this.createTime)
.skuList(this.shopCarDetailDOS.stream().map(d->{ return d.buildMallSkuInfoSpecDTO();}).collect(Collectors.toList()))
.build();
}
}
package com.mmc.oms.entity.mall;
import com.mmc.oms.model.dto.mall.MallSkuInfoSpecDTO;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author: zj
* @Date: 2023/6/3 20:14
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("购物车商品-行业商品规格")
public class MallIndstShopCarDetailDO implements Serializable {
private static final long serialVersionUID = -5146125854076395759L;
private Integer id;
private Integer mallIndstShopCarId;
private Integer mallIndstSkuInfoSpecId;
public MallSkuInfoSpecDTO buildMallSkuInfoSpecDTO(){
return MallSkuInfoSpecDTO.builder().id(this.id).mallSkuInfoSpecId(this.mallIndstSkuInfoSpecId).build();
}
}
package com.mmc.oms.entity.mall;
import com.mmc.oms.model.dto.order.OrderCouponDTO;
import com.mmc.oms.model.vo.coupon.CouponUserVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @author: zj
* @Date: 2023/6/2 20:50
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MallOrderCouponDO implements Serializable {
private static final long serialVersionUID = 6061360771588791673L;
private Integer id;
private Long orderId;
private Integer couponUserId;
private Integer couponType;
private Integer useType;
private BigDecimal useAmount;
private Date createTime;
public OrderCouponDTO buildOrderCouponDTO(){
return OrderCouponDTO.builder().id(this.id).orderId(this.orderId).couponUserId(this.couponUserId).couponType(this.couponType).useType(this.useType).useAmount(this.useAmount)
.createTime(this.createTime).couponName(buildCouponName(this.useType, this.couponType)).build();
}
private String buildCouponName(Integer useType, Integer couponType){
if (useType == 1){
return "VIP";
}else if (useType == 2){
if (couponType == 1){
return "打折";
} else if (couponType == 2) {
return "减免";
} else if (couponType == 3) {
return "无门槛";
}
}
return "";
}
public MallOrderCouponDO(CouponUserVO couponUserVO){
this.orderId = couponUserVO.getCid();
this.couponUserId = couponUserVO.getId();
this.couponType = couponUserVO.getCouponType();
this.useType = couponUserVO.getUseType();
this.useAmount = couponUserVO.getUseAmount();
}
}
package com.mmc.oms.entity.mall;
import com.mmc.oms.model.dto.mall.MallOrderDTO;
import com.mmc.oms.model.dto.mall.MallOrderFinishDTO;
import com.mmc.oms.model.dto.mall.MallOrderPageDTO;
import com.mmc.oms.model.dto.mall.UserAddressDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @author: zj
* @Date: 2023/6/2 20:50
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("商城订单")
public class MallOrderDO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("id")
private Long id;
@ApiModelProperty("pid")
private Integer pid;
@ApiModelProperty("订单编号")
private String orderNo;
@ApiModelProperty("状态码")
private Integer statusCode;
@ApiModelProperty("user_account_id")
private Integer userAccountId;
@ApiModelProperty("买家uid")
private String uid;
@ApiModelProperty("买家姓名")
private String userName;
@ApiModelProperty("买家手机号")
private String phoneNum;
@ApiModelProperty("0全款购买 1分期付款")
private Integer payMethod;
@ApiModelProperty("订单关闭原因")
private String shutReason;
@ApiModelProperty("update_time")
private Date updateTime;
@ApiModelProperty("create_time")
private Date createTime;
@ApiModelProperty("推荐人id")
private Integer recMallUserId;
@ApiModelProperty("推荐人")
private String recMallUserName;
@ApiModelProperty("推荐人订单金额")
private BigDecimal rcdOrderAmount;
@ApiModelProperty("用户收货地址id")
private Integer userAddressId;
@ApiModelProperty("订单交期")
private Date deliveryTime;
@ApiModelProperty("订单期限")
private Date creditPeriod;
@ApiModelProperty("订单金额")
private BigDecimal orderAmount;
@ApiModelProperty("运营id")
private Integer operationId;
@ApiModelProperty("合同编号")
private String contractNo;
@ApiModelProperty(value = "收货信息")
private UserAddressDTO userAddress;
@ApiModelProperty("合同状态状态:状态:(0:等待用户签署、1:用户签署失败、2:等待甲方签署(用户签署成功) 3:用户签署失败、4:甲方签署成功、5:已完成")
private Integer signStatus;
@ApiModelProperty(value = "合同签署方式,1:线上,0:线下")
private Integer contractSignedWay;
@ApiModelProperty(value = "付款期限-天数")
private Integer creditPeriodDays;
@ApiModelProperty(value = "运营人员")
private String operationName;
@ApiModelProperty(value = "标品的备注,字符不超过600")
private String remark;
@ApiModelProperty(value = "管理员专用备注")
private String mRemark;
@ApiModelProperty(value = "销售名称")
private String saleName;
@ApiModelProperty(value = "销售id")
private Integer saleId;
@ApiModelProperty("减免金额")
private BigDecimal deductAmount;
@ApiModelProperty("优惠金额")
private BigDecimal discountAmount;
@ApiModelProperty("实付金额")
private BigDecimal realityAmount;
@ApiModelProperty("优惠券折扣金额")
private BigDecimal couponDiscountAmount;
@ApiModelProperty("手填折扣金额")
private BigDecimal manualDiscountAmount;
@ApiModelProperty(value = "共享人id")
private Integer shareId;
@ApiModelProperty(value = "共享状态 0是起始状态 100接受共享中 200已共享 300其他状态")
private Integer shareStatus;
@ApiModelProperty(value = "订单分成状态,0未分成,1已分成")
private Integer divide;
public MallOrderDTO buildMallOrderDTO() {
return MallOrderDTO.builder().id(id).orderNo(orderNo).statusCode(statusCode).createTime(createTime).uid(uid).userAccountId(userAccountId)
.userName(userName).phoneNum(phoneNum).shutReason(shutReason).payMethod(payMethod).recMallUserName(recMallUserName).
deliveryTime(deliveryTime).creditPeriod(creditPeriod).orderAmount(orderAmount).userAddress(userAddress).contractNo(contractNo)
.operationId(operationId).signStatus(signStatus).deliveryTime(deliveryTime).userAddressId(userAddressId).
contractSignedWay(contractSignedWay).operationName(operationName).remark(remark).mRemark(mRemark)
.deductAmount(deductAmount).discountAmount(discountAmount).realityAmount(realityAmount).shareStatus(shareStatus).shareId(shareId).couponDiscountAmount(this.couponDiscountAmount)
.manualDiscountAmount(this.manualDiscountAmount).build();
}
public MallOrderPageDTO buildMallOrderPageDTO() {
return MallOrderPageDTO.builder().id(id).orderNo(orderNo).statusCode(statusCode).createTime(createTime).userAccountId(this.userAccountId).uid(uid).userName(userName)
.phoneNum(phoneNum).payMethod(payMethod).recMallUserName(recMallUserName).deliveryTime(deliveryTime).orderAmount(orderAmount).contractNo(contractNo)
.contractSignedWay(contractSignedWay).operationId(this.operationId).signStatus(signStatus).deliveryTime(deliveryTime).operationName(operationName)
.remark(this.remark).creditPeriod(creditPeriod).mRemark(mRemark).saleId(saleId).saleName(saleName).shareId(shareId).shareStatus(shareStatus)
.deductAmount(deductAmount).discountAmount(discountAmount).realityAmount(realityAmount).shutReason(this.shutReason).build();
}
public MallOrderFinishDTO buildMallOrderFinishDTO(){
return MallOrderFinishDTO.builder().orderId(this.id).orderNo(this.orderNo).realityAmount(this.getRealityAmount()).divide(this.divide).userAccountId(this.userAccountId).uid(this.uid)
.userName(this.userName).build();
}
}
package com.mmc.oms.entity.mall;
import com.mmc.oms.model.dto.mall.MallOrderExpressDTO;
import com.mmc.oms.model.dto.mall.UserAddressDTO;
import com.mmc.oms.model.vo.mall.MallOrderExpressVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
* @author: zj
* @Date: 2023/6/2 20:29
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MallOrderExpressDO implements Serializable {
private static final long serialVersionUID = 1L;
private Integer id;
private Long orderId;
private String sendExpNo;
private String sendExpCode;
private String takeName;
private String takePhone;
private String takeRegion;
private String takeAddress;
private Date receiveTime;
private Integer receive;
private Date updateTime;
private Date createTime;
public MallOrderExpressDO(MallOrderExpressVO param) {
this.orderId=param.getOrderId();
this.sendExpCode=param.getSendExpCode();
this.sendExpNo=param.getSendExpNo();
this.takeName = param.getTakeName();
this.takePhone = param.getTakePhone();
this.takeRegion = param.getTakeRegion();
this.takeAddress = param.getTakeAddress();
this.receiveTime = param.getReceiveTime();
this.receive = param.getReceive();
}
public MallOrderExpressDO(UserAddressDTO param) {
this.takeName = param.getTakeName();
this.takePhone = param.getTakePhone();
this.takeRegion = param.getTakeRegion();
this.takeAddress = param.getTakeAddress();
}
public MallOrderExpressDTO buildOrderExpressDTO() {
return MallOrderExpressDTO.builder().orderId(orderId).sendExpNo(sendExpNo).sendExpCode(sendExpCode)
.takeName(takeName).takePhone(takePhone).takeRegion(takeRegion).takeAddress(takeAddress).build();
}
}
package com.mmc.oms.entity.mall;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
* author:zhenjie
* Date:2022/11/25
* time:11:11
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("商城订单simple信息")
public class MallOrderSimpleDO implements Serializable {
private static final long serialVersionUID = 7783643628653457384L;
private Long id;
private Integer userAccountId;
private BigDecimal orderAmount;
private List<OrderGoodsCommonDO> orderGoodsCommonDOS;
private List<OGSkuSpecDO> ogSkuSpecDOList;
}
package com.mmc.oms.entity.mall;
import com.mmc.oms.model.dto.mall.MallStatusDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author: zj
* @Date: 2023/6/3 21:01
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MallOrderStatusDO implements Serializable {
private static final long serialVersionUID = -2929491793889096032L;
private Integer id;
private String status;
private Integer code;
private Integer nextCode;
public MallStatusDTO buildMallOrderStatusDTO() {
return MallStatusDTO.builder().status(status).code(code).nextCode(nextCode).build();
}
}
package com.mmc.oms.entity.mall;
import com.mmc.oms.model.dto.mall.MallGoodsShopCarDTO;
import com.mmc.oms.model.vo.mall.MallShopCarVO;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author: zj
* @Date: 2023/6/3 20:11
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("购物车-产品商品")
public class MallProdShopCarDO implements Serializable {
private static final long serialVersionUID = -5568801124097141578L;
private Integer id;
private Integer userAccountId;
private Integer goodsInfoId;
private Integer buyNum;
private Integer saleStatus;
private Integer recMallUserId;
private String remark;
private Integer deleted;
private Date createTime;
private Date updateTime;
private List<MallProdShopCarDetailDO> shopCarDetailDOS;
public MallProdShopCarDO(MallShopCarVO param){
this.userAccountId = param.getUserAccountId();
this.goodsInfoId = param.getGoodsInfoId();
this.buyNum = param.getBuyNum();
this.recMallUserId = param.getRecMallUserId();
this.remark = param.getRemark();
}
public MallProdShopCarDO(Integer mallShopCarId, Integer buyNum) {
this.id = mallShopCarId;
this.buyNum = buyNum;
}
public MallGoodsShopCarDTO buildMallGoodsShopCarDTO(){
return MallGoodsShopCarDTO.builder().id(this.id).userAccountId(this.userAccountId).goodsInfoId(this.goodsInfoId).buyNum(this.buyNum)
.saleStatus(this.saleStatus).recMallUserId(this.recMallUserId).remark(this.remark).deleted(this.deleted).createTime(this.createTime)
.directoryId(1).skuList(this.shopCarDetailDOS.stream().map(d->{ return d.buildMallSkuInfoSpecDTO();}).collect(Collectors.toList()))
.build();
}
}
package com.mmc.oms.entity.mall;
import com.mmc.oms.model.dto.mall.MallSkuInfoSpecDTO;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author: zj
* @Date: 2023/6/3 20:11
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("购物车商品-产品商品规格")
public class MallProdShopCarDetailDO implements Serializable {
private static final long serialVersionUID = -5696013841678019344L;
private Integer id;
private Integer mallProdShopCarId;
private Integer mallProdSkuInfoSpecId;
public MallSkuInfoSpecDTO buildMallSkuInfoSpecDTO(){
return MallSkuInfoSpecDTO.builder().id(this.id).mallSkuInfoSpecId(this.mallProdSkuInfoSpecId).build();
}
}
package com.mmc.oms.entity.mall;
import com.mmc.oms.model.dto.mall.OGSkuSpecDTO;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* author:zhenjie
* Date:2022/11/28
* time:14:31
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("下单时所选规格")
public class OGSkuSpecDO implements Serializable {
private static final long serialVersionUID = 7582475134715887443L;
private Integer id;
private Integer directoryId;
private Integer shopCarId;
private String skuSpecName;
public OGSkuSpecDTO buildOGSkuSpecDTO(){
return OGSkuSpecDTO.builder().id(this.id).directoryId(this.directoryId).shopCarId(this.shopCarId).skuSpecName(this.skuSpecName).build();
}
}
package com.mmc.oms.entity.mall;
import com.mmc.oms.model.dto.order.OrderCouponDTO;
import com.mmc.oms.model.vo.coupon.CouponUserVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* author:zhenjie
* Date:2023/4/4
* time:11:14
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class OrderCouponDO implements Serializable {
private static final long serialVersionUID = 4085601241082643413L;
private Integer id;
private Long orderId;
private Integer couponUserId;
private Integer couponType;
private Integer useType;
private BigDecimal useAmount;
private Date createTime;
public OrderCouponDTO buildOrderCouponDTO(){
return OrderCouponDTO.builder().id(this.id).orderId(this.orderId).couponUserId(this.couponUserId).couponType(this.couponType).useType(this.useType).useAmount(this.useAmount)
.createTime(this.createTime).couponName(buildCouponName(this.useType, this.couponType)).build();
}
private String buildCouponName(Integer useType, Integer couponType){
if (useType == 1){
return "VIP";
}else if (useType == 2){
if (couponType == 1){
return "打折";
} else if (couponType == 2) {
return "减免";
} else if (couponType == 3) {
return "无门槛";
}
}
return "";
}
public OrderCouponDO(CouponUserVO couponUserVO){
this.orderId = couponUserVO.getCid();
this.couponUserId = couponUserVO.getId();
this.couponType = couponUserVO.getCouponType();
this.useType = couponUserVO.getUseType();
this.useAmount = couponUserVO.getUseAmount();
}
}
package com.mmc.oms.entity.mall;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* author:zhenjie
* Date:2022/11/25
* time:11:24
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("公用的产品和行业基本订单信息")
public class OrderGoodsCommonDO implements Serializable {
private static final long serialVersionUID = -1984274780148138222L;
private Integer id;
private Long orderId;
private String orderNo;
private Integer directoryId;
private Integer buyNum;
private String goodsName;
private String mainImg;
}
package com.mmc.oms.entity.mall;
import com.mmc.oms.model.dto.mall.OrderGoodsIndstDTO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* author:zhenjie
* Date:2022/10/21
* time:16:32
*/
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class OrderGoodsIndstDO implements Serializable {
private static final long serialVersionUID = -3279631619974911234L;
private Integer id;
private Long orderId;
private Integer mallIndstShopCarId;
private Integer goodsInfoId;
private Integer directoryId;
private BigDecimal goodsAmount;
private String goodsNo;
private String goodsName;
private String mainImg;
private Integer buyNum;
private Date createTime;
private Date updateTime;
private List<OrderGoodsIndstDetailDO> orderGoodsIndstDetailDOS;
public OrderGoodsIndstDTO buildOrderGoodsIndstDTO(){
return OrderGoodsIndstDTO.builder().id(this.id).orderId(this.orderId).mallIndstShopCarId(this.mallIndstShopCarId).goodsInfoId(this.goodsInfoId).directoryId(this.directoryId)
.goodsAmount(this.goodsAmount).goodsNo(this.goodsNo).goodsName(this.goodsName).mainImg(this.mainImg).buyNum(this.buyNum).build();
}
public OrderGoodsIndstDO(OrderGoodsIndstDTO orderGoodsIndstDTO){
this.id = orderGoodsIndstDTO.getId();
this.orderId = orderGoodsIndstDTO.getOrderId();
this.mallIndstShopCarId = orderGoodsIndstDTO.getMallIndstShopCarId();
this.goodsInfoId = orderGoodsIndstDTO.getGoodsInfoId();
this.directoryId = orderGoodsIndstDTO.getDirectoryId();
this.goodsAmount = orderGoodsIndstDTO.getGoodsAmount();
this.goodsNo = orderGoodsIndstDTO.getGoodsNo();
this.goodsName = orderGoodsIndstDTO.getGoodsName();
this.mainImg = orderGoodsIndstDTO.getMainImg();
this.buyNum = orderGoodsIndstDTO.getBuyNum();
}
}
package com.mmc.oms.entity.mall;
import com.mmc.oms.model.dto.mall.OrderGoodsIndstDetailDTO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* author:zhenjie
* Date:2022/10/21
* time:16:32
*/
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class OrderGoodsIndstDetailDO implements Serializable {
private static final long serialVersionUID = 138856551730423056L;
private Integer id;
private Integer orderGoodsIndstId;
private Integer mallIndstShopCarDetailId;
private Integer mallIndstSkuInfoSpecId;
private Integer industrySpecId;
private String industrySkuSpecName;
private String industrySkuSpecImage;
private Integer buyNum;
private BigDecimal unitPrice;
private BigDecimal skuSpecAmount;
private Date createTime;
private Date updateTime;
private String unitName;
private List<OrderGoodsIndstProdListDO> orderGoodsIndstProdListDOS;
public OrderGoodsIndstDetailDO(OrderGoodsIndstDetailDTO orderGoodsIndstDetailDTO){
this.id = orderGoodsIndstDetailDTO.getId();
this.orderGoodsIndstId = orderGoodsIndstDetailDTO.getOrderGoodsIndstId();
this.mallIndstShopCarDetailId = orderGoodsIndstDetailDTO.getMallIndstShopCarDetailId();
this.mallIndstSkuInfoSpecId = orderGoodsIndstDetailDTO.getMallIndstSkuInfoSpecId();
this.industrySpecId = orderGoodsIndstDetailDTO.getIndustrySpecId();
this.industrySkuSpecName = orderGoodsIndstDetailDTO.getIndustrySkuSpecName();
this.industrySkuSpecImage = orderGoodsIndstDetailDTO.getIndustrySkuSpecImage();
this.buyNum = orderGoodsIndstDetailDTO.getBuyNum();
this.unitPrice = orderGoodsIndstDetailDTO.getUnitPrice();
this.skuSpecAmount = orderGoodsIndstDetailDTO.getSkuSpecAmount();
this.unitName = orderGoodsIndstDetailDTO.getUnitName();
}
}
package com.mmc.oms.entity.mall;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class OrderGoodsIndstProdListBO implements Serializable {
private static final long serialVersionUID = 8484209497772442916L;
private Integer id;
private Integer orderGoodsIndstDetailId;
private String goodsTypeName;
private String productName;
private String model;
private String productBrand;
private Integer productSpecId;
private String prodSkuSpecName;
private String prodSkuSpecImage;
private String partNo;
private String versionDesc;
private Integer buyNum;
private Date createTime;
private Date updateTime;
// 关联字段
private BigDecimal goodsAmount;
private String goodsNo;
private Integer mallIndstShopCarId;
private Integer goodsInfoId;
}
package com.mmc.oms.entity.mall;
import com.mmc.oms.model.dto.mall.MallGoodsInfoDTO;
import com.mmc.oms.model.dto.mall.MallOrderProdListDTO;
import com.mmc.oms.model.dto.mall.OrderGoodsIndstProdListDTO;
import com.mmc.oms.model.excel.OrderItem;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* author:zhenjie
* Date:2022/10/21
* time:16:33
*/
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class OrderGoodsIndstProdListDO implements Serializable {
private static final long serialVersionUID = 8484209497772442916L;
private Integer id;
private Integer goodsInfoId;
private Integer orderGoodsIndstDetailId;
private String goodsTypeName;
private String productName;
private String model;
private String productBrand;
private Integer productSpecId;
private String prodSkuSpecName;
private String prodSkuSpecImage;
private String partNo;
private String versionDesc;
private Integer buyNum;
private Date createTime;
private Date updateTime;
private String unitName;
private BigDecimal unitPrice;
public OrderGoodsIndstProdListDTO buildOrderGoodsIndstProdListDTO(){
return OrderGoodsIndstProdListDTO.builder().id(this.id).orderGoodsIndstDetailId(this.orderGoodsIndstDetailId).goodsTypeName(this.goodsTypeName).productName(this.productName)
.model(this.model).productBrand(this.productBrand).productSpecId(this.productSpecId).prodSkuSpecName(this.prodSkuSpecName).prodSkuSpecImage(this.prodSkuSpecImage).partNo(this.partNo)
.versionDesc(this.versionDesc).buyNum(this.buyNum).createTime(this.createTime).updateTime(this.updateTime).unitName(this.unitName).build();
}
public MallOrderProdListDTO buildMallOrderProdListDTO(){
return MallOrderProdListDTO.builder().id(this.id).goodsInfoId(this.goodsInfoId).prodSkuSpecName(this.prodSkuSpecName).prodSkuSpecImage(this.prodSkuSpecImage).partNo(this.partNo)
.versionDesc(this.versionDesc).buyNum(this.buyNum).model(this.model).build();
}
public OrderItem buildMallOrderItemLis(){
return OrderItem.builder().productName(this.prodSkuSpecName).liaoNo(this.partNo).versionDesc(this.versionDesc).quantity(this.buyNum).model(this.model).build();
}
public MallGoodsInfoDTO buildMallGoodsInfoDTO(){
return MallGoodsInfoDTO.builder().productName(this.prodSkuSpecName).count(this.buyNum).unitPrice(this.unitPrice).build();
}
public OrderGoodsIndstProdListDO(OrderGoodsIndstProdListDTO orderGoodsIndstProdListDTO){
this.id = orderGoodsIndstProdListDTO.getId();
this.orderGoodsIndstDetailId = orderGoodsIndstProdListDTO.getOrderGoodsIndstDetailId();
this.goodsTypeName = orderGoodsIndstProdListDTO.getGoodsTypeName();
this.productName = orderGoodsIndstProdListDTO.getProductName();
this.model = orderGoodsIndstProdListDTO.getModel();
this.productBrand = orderGoodsIndstProdListDTO.getProductBrand();
this.productSpecId = orderGoodsIndstProdListDTO.getProductSpecId();
this.prodSkuSpecName = orderGoodsIndstProdListDTO.getProdSkuSpecName();
this.prodSkuSpecImage = orderGoodsIndstProdListDTO.getProdSkuSpecImage();
this.partNo = orderGoodsIndstProdListDTO.getPartNo();
this.versionDesc = orderGoodsIndstProdListDTO.getVersionDesc();
this.buyNum = orderGoodsIndstProdListDTO.getBuyNum();
this.unitName = orderGoodsIndstProdListDTO.getUnitName();
}
}
package com.mmc.oms.entity.mall;
import com.mmc.oms.model.dto.mall.OrderGoodsProdDTO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author: zj
* @Date: 2023/6/2 20:29
*/
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class OrderGoodsProdDO implements Serializable {
private static final long serialVersionUID = 698431955075119489L;
private Integer id;
private Long orderId;
private Integer mallProdShopCarId;
private Integer goodsInfoId;
private Integer directoryId;
private BigDecimal goodsAmount;
private BigDecimal prodActualPrice;
private String goodsNo;
private String goodsName;
private String mainImg;
private Integer buyNum;
private Date createTime;
private Date updateTime;
private List<OrderGoodsProdDetailDO> orderGoodsProdDetailDOList;
public OrderGoodsProdDTO buildOrderGoodsProdDTO(){
return OrderGoodsProdDTO.builder().id(this.id).orderId(this.orderId).mallProdShopCarId(this.mallProdShopCarId).goodsInfoId(this.goodsInfoId).directoryId(this.directoryId).goodsAmount(this.goodsAmount).goodsNo(this.goodsNo)
.goodsName(this.goodsName).mainImg(this.mainImg).createTime(this.createTime).updateTime(this.updateTime).buyNum(this.buyNum)
.orderGoodsProdDetailDTOS(this.orderGoodsProdDetailDOList.stream().map(OrderGoodsProdDetailDO::buildOrderGoodsProdDetailDTO).collect(Collectors.toList()))
.build();
}
public OrderGoodsProdDO(OrderGoodsProdDTO orderGoodsProdDTO){
this.id = orderGoodsProdDTO.getId();
this.orderId = orderGoodsProdDTO.getOrderId();
this.goodsInfoId = orderGoodsProdDTO.getGoodsInfoId();
this.directoryId = orderGoodsProdDTO.getDirectoryId();
this.goodsAmount = orderGoodsProdDTO.getGoodsAmount();
this.goodsNo = orderGoodsProdDTO.getGoodsNo();
this.goodsName = orderGoodsProdDTO.getGoodsName();
this.mainImg = orderGoodsProdDTO.getMainImg();
this.buyNum = orderGoodsProdDTO.getBuyNum();
}
}
\ No newline at end of file
package com.mmc.oms.entity.mall;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @author: zj
* @Date: 2023/6/2 20:29
*/
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="com.mmc.csf.morder.entity.OrderGoodsProdDetailBO", description="")
@NoArgsConstructor
@AllArgsConstructor
public class OrderGoodsProdDetailBO implements Serializable {
private static final long serialVersionUID = 1L;
private Integer id;
private Integer orderGoodsProdId;
private Integer mallProdShopCarDetailId;
private Integer mallProdSkuInfoSpecId;
@ApiModelProperty(value = "商品sku的id")
private Integer mallProdSkuInfoId;
@ApiModelProperty(value = "产品类型名称")
private String goodsTypeName;
@ApiModelProperty(value = "产品名称")
private String productName;
@ApiModelProperty(value = "型号")
private String model;
@ApiModelProperty(value = "产品品牌")
private String productBrand;
@ApiModelProperty(value = "产品规格id")
private Integer productSpecId;
@ApiModelProperty(value = "规格名称-快照")
private String prodSkuSpecName;
@ApiModelProperty(value = "规格图片-快照")
private String prodSkuSpecImage;
@ApiModelProperty(value = "料号-快照")
private String partNo;
@ApiModelProperty(value = "版本描述-快照")
private String versionDesc;
@ApiModelProperty(value = "购买数量")
private Integer buyNum;
@ApiModelProperty(value = "单价")
private BigDecimal unitPrice;
@ApiModelProperty(value = "总价")
private BigDecimal skuSpecAmount;
private Date createTime;
private Date updateTime;
// 关联字段
private BigDecimal goodsAmount;
private String goodsNo;
private Integer goodsInfoId;
}
package com.mmc.oms.entity.mall;
import com.mmc.oms.model.dto.mall.MallGoodsInfoDTO;
import com.mmc.oms.model.dto.mall.MallOrderProdListDTO;
import com.mmc.oms.model.dto.mall.OrderGoodsProdDetailDTO;
import com.mmc.oms.model.excel.OrderItem;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @author: zj
* @Date: 2023/6/2 20:29
*/
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class OrderGoodsProdDetailDO implements Serializable {
private static final long serialVersionUID = -4284152753668273560L;
private Integer id;
private Integer goodsInfoId;
private Integer orderGoodsProdId;
private Integer mallProdShopCarDetailId;
private Integer mallProdSkuInfoSpecId;
private Integer mallProdSkuInfoId;
private String goodsTypeName;
private String productName;
private String model;
private String productBrand;
private Integer brandInfoId;
private Integer productSpecId;
private String specName;
private String prodSkuSpecImage;
private String partNo;
private String versionDesc;
private Integer buyNum;
private BigDecimal unitPrice;
private BigDecimal skuSpecAmount;
private BigDecimal detailDiscountPrice;
private BigDecimal afterDiscountPrice;
private String unitName;
private Date createTime;
private Date updateTime;
public OrderGoodsProdDetailDTO buildOrderGoodsProdDetailDTO(){
return OrderGoodsProdDetailDTO.builder().id(this.id).orderGoodsProdId(this.orderGoodsProdId).mallProdShopCarDetailId(this.mallProdShopCarDetailId).mallProdSkuInfoSpecId(this.mallProdSkuInfoSpecId).mallProdSkuInfoId(this.mallProdSkuInfoId)
.specName(this.specName).prodSkuSpecImage(this.prodSkuSpecImage).partNo(this.partNo).versionDesc(this.versionDesc).buyNum(this.buyNum).unitPrice(this.unitPrice)
.skuSpecAmount(this.unitPrice.multiply(BigDecimal.valueOf(this.buyNum))).goodsTypeName(this.goodsTypeName).productName(this.productName).model(this.model).productBrand(this.productBrand).brandInfoId(this.brandInfoId)
.productSpecId(this.productSpecId).createTime(this.createTime).updateTime(this.updateTime).unitName(this.unitName).build();
}
public MallOrderProdListDTO buildMallOrderProdListDTO(){
return MallOrderProdListDTO.builder().id(this.id).goodsInfoId(this.goodsInfoId).prodSkuSpecName(this.specName).prodSkuSpecImage(this.prodSkuSpecImage).partNo(this.partNo)
.versionDesc(this.versionDesc).buyNum(this.buyNum).unitPrice(this.unitPrice).skuSpecAmount(this.skuSpecAmount).productName(this.productName).model(this.model).build();
}
public OrderItem buildMallOrderItemLis(){
return OrderItem.builder().productName(this.specName).liaoNo(this.partNo).quantity(this.buyNum).versionDesc(this.versionDesc).model(this.model).build();
}
public MallGoodsInfoDTO buildMallGoodsInfoDTO(){
return MallGoodsInfoDTO.builder().productName(this.specName).count(this.buyNum).unitPrice(this.unitPrice).build();
}
// public OGSkuSpecDTO buildOGSkuSpecDTO(){
// return OGSkuSpecDTO.builder().id(this.id).skuSpecName(this.specName).build();
// }
public OrderGoodsProdDetailDO(OrderGoodsProdDetailDTO orderGoodsProdDetailDTO){
this.id = orderGoodsProdDetailDTO.getId();
this.orderGoodsProdId = orderGoodsProdDetailDTO.getOrderGoodsProdId();
this.mallProdSkuInfoSpecId = orderGoodsProdDetailDTO.getMallProdSkuInfoSpecId();
this.mallProdSkuInfoId = orderGoodsProdDetailDTO.getMallProdSkuInfoId();
this.goodsTypeName = orderGoodsProdDetailDTO.getGoodsTypeName();
this.productName = orderGoodsProdDetailDTO.getProductName();
this.model = orderGoodsProdDetailDTO.getModel();
this.productBrand = orderGoodsProdDetailDTO.getProductBrand();
this.brandInfoId = orderGoodsProdDetailDTO.getBrandInfoId();
this.productSpecId = orderGoodsProdDetailDTO.getProductSpecId();
this.specName = orderGoodsProdDetailDTO.getSpecName();
this.prodSkuSpecImage = orderGoodsProdDetailDTO.getProdSkuSpecImage();
this.partNo = orderGoodsProdDetailDTO.getPartNo();
this.versionDesc = orderGoodsProdDetailDTO.getVersionDesc();
this.buyNum = orderGoodsProdDetailDTO.getBuyNum();
this.unitPrice = orderGoodsProdDetailDTO.getUnitPrice();
this.skuSpecAmount = orderGoodsProdDetailDTO.getSkuSpecAmount();
this.unitName = orderGoodsProdDetailDTO.getUnitName();
}
}
package com.mmc.oms.entity.mall;
import com.mmc.oms.model.dto.mall.OrderPayDTO;
import com.mmc.oms.model.vo.mall.OrderPayVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Date;
/**
* @author 作者 geDuo
* @version 创建时间:2022年3月22日 下午1:33:55
* @explain 类说明
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class OrderPayDO implements Serializable {
private static final long serialVersionUID = -2577204623479240233L;
private Integer id;
private Long orderId;
private Integer userAccountId;
private Integer payType;
private Integer payStatus;
private String vouchr;
private String payRemark;
private String refuseReason;
private Date updateTime;
private Date createTime;
public OrderPayDO(OrderPayVO param, Integer userAccountId) {
this.orderId = param.getOrderId();
this.vouchr = String.join(",", param.getVouchr());
this.payRemark = param.getPayRemark();
this.userAccountId = userAccountId;
}
public OrderPayDTO buildOrderPayDTO() {
return OrderPayDTO.builder().orderId(orderId).vouchr(Arrays.asList(this.vouchr.split(","))).payRemark(payRemark)
.payType(payType).refuseReason(refuseReason).build();
}
}
package com.mmc.oms.entity.mall;
import com.mmc.oms.model.dto.mall.GoodsServiceDTO;
import com.mmc.oms.model.dto.mall.OrderServiceDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
* @author 作者 geDuo
* @version 创建时间:2022年3月24日 下午2:01:24
* @explain 类说明
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class OrderServiceDO implements Serializable {
private static final long serialVersionUID = -2938941346648852627L;
private Integer id;
private Long orderId;
private Integer goodsInfoId;
private String serviceName;
private String remark;
private Date createTime;
public OrderServiceDO(GoodsServiceDTO d, Long orderId) {
this.orderId = orderId;
this.goodsInfoId = d.getGoodsInfoId();
this.serviceName = d.getServiceName();
this.remark = d.getRemark();
}
public OrderServiceDTO buildOrderServiceDTO() {
return OrderServiceDTO.builder().goodsInfoId(goodsInfoId).orderId(orderId).serviceName(serviceName)
.remark(remark).build();
}
}
package com.mmc.oms.entity.mall;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
* @author 作者 geDuo
* @version 创建时间:2021年10月22日 下午4:03:14
* @explain 类说明
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ScheduleLogDO implements Serializable {
private static final long serialVersionUID = -955231247576951750L;
private Integer id;
private String scheduleName;
private String code;
private String resultDesc;
private Date createTime;
@ApiModelProperty(value = "参数")
private String param;
}
package com.mmc.oms.entity.mall;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* <p>
* 用户地址表
* </p>
*
* @author dahang
* @since 2022-08-31
*/
@Data
@ApiModel(value="UserAddressDO", description="用户地址表")
@AllArgsConstructor
@NoArgsConstructor
public class UserAddressDO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "唯一标识")
private Integer id;
@ApiModelProperty(value = "用户id")
private Integer userAccountId;
@ApiModelProperty(value = "收货人姓名")
private String takeName;
@ApiModelProperty(value = "收货人电话")
private String takePhone;
@ApiModelProperty(value = "收货地址")
private String takeRegion;
@ApiModelProperty(value = "收货详细地址")
private String takeAddress;
@ApiModelProperty(value = "使用类型;0默认,1普通")
private Integer type;
@ApiModelProperty(value = "创建时间")
private Date createdTime;
@ApiModelProperty(value = "更新时间")
private Date updatedTime;
@ApiModelProperty(value = "逻辑删除;1代表删除,0代表未删除")
private Integer isDeleted;
@ApiModelProperty(value = "逻辑删除")
private List<Integer> isDeleteds;
public UserAddressDO(Integer userAccountId, Integer type) {
this.userAccountId = userAccountId;
this.type = type;
}
}
package com.mmc.oms.enums;
/**
* author:zhenjie
* Date:2023/4/27
* time:17:06
*/
public enum BonusObjCodeEnum {
OPERATOR(100, "相关运营"),
SALE(200, "相关销售"),
CHANNEL(300, "相关渠道用户"),
RCD(400, "上级推荐人");
private Integer code;
private String objName;
BonusObjCodeEnum(Integer code, String objName) {
this.code = code;
this.objName = objName;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getObjName() {
return objName;
}
public void setObjName(String objName) {
this.objName = objName;
}
}
package com.mmc.oms.enums;
/**
* @author 作者 geDuo
* @version 创建时间:2022年3月21日 上午12:37:59
* @explain 类说明
*/
public enum OrderStatus {
PENDING_ASSIGNMENT(50,"待分配运营"), PLACE_ORDER(100, "待确认订单"),
CONFIRM_ORDER(200, "待上传凭证"),
SIGN_STATUS_ZERO(0,"待用户签署合同"),SIGN_STATUS_ONE(1,"用户签署失败"),
SIGN_STATUS_TWO(2,"待平台签署合同"),SIGN_STATUS_THREE(3,"平台签署失败"),
SIGN_STATUS_FOUR(4,"平台签署成功"),
ORDER_PAY(300, "已上传付款凭证"), ERROR_PAY(350, "审核不通过"),
//CONFIRM_INVENTORY(500, "待配送"), SEND_ORDER_GOODS(600, "配送中"),
WAITING_FOR_AFTER_PAY(650, "待上传尾款凭证"),
AFTER_PAY(660, "已上传尾款凭证"), REFUSE_AFTER_PAY(670, "尾款凭证不通过"),
CONFIRM_INVENTORY(710, "待配送"), SEND_ORDER_GOODS(720, "配送中"),
FINISH(800, "订单完成"), CLOSE(999, "订单关闭");
private Integer code;
private String name;
OrderStatus(Integer code, String name) {
this.code = code;
this.name = name;
}
public void setCode(Integer code) {
this.code = code;
}
public Integer getCode() {
return this.code;
}
public void setName(String name) {
this.name = name;
}
public String getName() {
return this.name;
}
}
package com.mmc.oms.enums;
/**
* @author 作者 geDuo
* @version 创建时间:2022年4月1日 下午5:41:41
* @explain 类说明
*/
public enum PayMethod {
ALL(0, "全款"), DIVIDE(1, "分期付款");
private Integer code;
private String name;
PayMethod(Integer code, String name) {
this.code = code;
this.name = name;
}
public void setCode(Integer code) {
this.code = code;
}
public Integer getCode() {
return this.code;
}
public void setName(String name) {
this.name = name;
}
public String getName() {
return this.name;
}
}
package com.mmc.oms.enums;
/**
* @author 作者 geDuo
* @version 创建时间:2022年4月1日 下午6:02:49
* @explain 类说明
*/
public enum PayStatus {
INIT(0, "待审核"), ACCESS(1, "通过"), REFUSE(2, "不通过");
private Integer code;
private String name;
PayStatus(Integer code, String name) {
this.code = code;
this.name = name;
}
public void setCode(Integer code) {
this.code = code;
}
public Integer getCode() {
return this.code;
}
public void setName(String name) {
this.name = name;
}
public String getName() {
return this.name;
}
}
package com.mmc.oms.enums;
/**
* @author 作者 geDuo
* @version 创建时间:2022年4月1日 下午5:53:50
* @explain 类说明
*/
public enum PayType {
ALL_PAY(0, "全款凭证"), AD_PAY(1, "预付款凭证"), AF_PAY(2, "尾款凭证"),CA_PAY(3,"验收单");
private Integer code;
private String name;
PayType(Integer code, String name) {
this.code = code;
this.name = name;
}
public void setCode(Integer code) {
this.code = code;
}
public Integer getCode() {
return this.code;
}
public void setName(String name) {
this.name = name;
}
public String getName() {
return this.name;
}
}
package com.mmc.oms.enums;
/**
* @author 作者 geDuo
* @version 创建时间:2022年3月19日 上午9:41:54
* @explain 类说明
*/
public enum SaleStatus {
PENDING(0, "待下单"), DOING(1, "已下单");
private Integer code;
private String name;
SaleStatus(Integer code, String name) {
this.code = code;
this.name = name;
}
public void setCode(Integer code) {
this.code = code;
}
public Integer getCode() {
return this.code;
}
public void setName(String name) {
this.name = name;
}
public String getName() {
return this.name;
}
}
package com.mmc.oms.feign;
import com.mmc.oms.feign.hystrix.PayAppApiHystrix;
/**
* @author: zj
* @Date: 2023/6/5 15:26
*/
//@FeignClient(url = "${payment.url}", name = "payment-svc", fallback = PayAppApiHystrix.class)
public interface PayAppApi {
}
package com.mmc.oms.feign;
import com.mmc.oms.model.dto.mall.*;
import com.mmc.oms.model.qo.mall.MallOrderGoodsInfoQO;
import com.mmc.oms.model.qo.mall.ProductSpecPriceQO;
//import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* @author: zj
* @Date: 2023/6/5 15:18
*/
//@FeignClient(url = "${pms.url}", name = "pms-svc", fallback = PmsAppApiHystrix.class)
public interface PmsAppApi {
@PostMapping("/pms/goods/fillGoodsInfo")
List<MallGoodsShopCarDTO> fillGoodsInfo(@RequestBody List<MallGoodsShopCarDTO> param, @RequestHeader("token") String token);
@PostMapping("/pms/goods/feignListProdGoodsSkuInfo")
List<OrderGoodsProdDTO> feignListProdGoodsSkuInfo(@RequestBody MallOrderGoodsInfoQO mallOrderGoodsInfoQO, @RequestHeader("token") String token);
@PostMapping("/pms/goods/feignListIndstGoodsSkuInfo")
List<OrderGoodsIndstDTO> feignListIndstGoodsSkuInfo(@RequestBody MallOrderGoodsInfoQO mallOrderGoodsInfoQO, @RequestHeader("token") String token);
@PostMapping("/pms/goods/feignListProductSpecPrice")
List<MallProductSpecPriceDTO> feignListProductSpecPrice(@RequestBody ProductSpecPriceQO productSpecPriceQO, @RequestHeader("token") String token);
@GetMapping("/pms/goods/feignGetUnitPriceByTag")
public ProductSpecPriceDTO feignGetUnitPriceByTag(@RequestParam(value = "specId")Integer specId,
@RequestParam(value = "tagId")Integer tagId, @RequestHeader("token") String token);
}
package com.mmc.oms.feign;
import com.mmc.oms.model.dto.mall.CooperationTagDTO;
import com.mmc.oms.model.dto.user.UserAccountSimpleDTO;
import com.mmc.oms.model.qo.mall.BUserAccountQO;
//import io.swagger.annotations.ApiParam;
//import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* @author: zj
* @Date: 2023/5/18 17:06
*/
//@FeignClient(url = "${userapp.url}", name = "cms-svc", fallback = UserAppApiHystrix.class)
public interface UserAppApi {
/**
* 根据用户id获取基本信息
* @param userAccountId
* @return
*/
@RequestMapping(value = "user-account/feignGetUserSimpleInfo", method = RequestMethod.GET)
public UserAccountSimpleDTO feignGetUserSimpleInfo(@RequestParam Integer userAccountId, @RequestHeader("token") String token);
/**
* 根据地区信息查询用户id
* @param provinceCode
* @param cityCode
* @param districtCode
* @return
*/
@GetMapping("user-account/feignListUserAccountIds")
List<Integer> feignListUserAccountIds(@RequestParam Integer provinceCode, @RequestParam(required = false) Integer cityCode,
@RequestParam(required = false) Integer districtCode, @RequestHeader(value = "token", required = false) String token);
/**
* 获取用户集合列表页面
*
* @param bUserAccountQO 问:b用户帐户
* @return {@link List}<{@link UserAccountSimpleDTO}>
*/
@PostMapping("back-user/feignListBAccountPage")
List<UserAccountSimpleDTO> feignListBAccountPage( @RequestBody BUserAccountQO bUserAccountQO, @RequestHeader("token") String token);
/**
* 根据用户id查询用户信息
* @param ids
* @param token
* @return
*/
@PostMapping("user-account/feignListUserAccountByIds")
List<UserAccountSimpleDTO> feignListUserAccountByIds(@RequestBody List<Integer> ids, @RequestHeader("token") String token);
/**
* 查询推荐人信息
* @param userIds
* @return
*/
@PostMapping("user-account/feignListRcdUserInfo")
List<UserAccountSimpleDTO> feignListRcdUserInfo(@RequestBody List<Integer> userIds);
/**
* 查询上级id
* @param userAccountId
* @return
*/
@GetMapping("user-account/feignGetSuperiorRef")
Integer feignGetSuperiorRef(@RequestParam Integer userAccountId);
/**
* 查询上级推荐人信息
* @param userAccountId
* @return
*/
@GetMapping("user-account/feignGetUserRcdInfo")
UserAccountSimpleDTO feignGetUserRcdInfo(@RequestParam Integer userAccountId);
/**
* 用户合作标签
* @return
*/
@GetMapping("cooperation/feignListCooperationTag")
List<CooperationTagDTO> feignListCooperationTag();
}
package com.mmc.oms.feign.config;
//import com.mmc.oms.feign.hystrix.UserAppApiHystrix;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.ComponentScan;
//import org.springframework.context.annotation.Configuration;
//
///**
// * @author: zj
// * @Date: 2023/5/18 18:21
// */
//@ComponentScan(basePackages = "com.mmc.oms.feign")
//@Configuration
//public class FeignConfiguration {
//
// @Bean(name = "userAppApiHystrix")
// public UserAppApiHystrix userAppApi(){
// return new UserAppApiHystrix();
// }
//}
package com.mmc.oms.feign.hystrix;
import com.mmc.oms.feign.PayAppApi;
import lombok.extern.slf4j.Slf4j;
/**
* @author: zj
* @Date: 2023/6/5 15:27
*/
@Slf4j
public class PayAppApiHystrix implements PayAppApi {
}
package com.mmc.oms.feign.hystrix;
import com.alibaba.fastjson.JSONObject;
import com.mmc.oms.feign.PmsAppApi;
import com.mmc.oms.model.dto.mall.*;
import com.mmc.oms.model.qo.mall.MallOrderGoodsInfoQO;
import com.mmc.oms.model.qo.mall.ProductSpecPriceQO;
import lombok.extern.slf4j.Slf4j;
import java.util.List;
/**
* @author: zj
* @Date: 2023/6/5 15:19
*/
@Slf4j
public class PmsAppApiHystrix implements PmsAppApi {
@Override
public List<MallGoodsShopCarDTO> fillGoodsInfo(List<MallGoodsShopCarDTO> param, String token) {
log.info("熔断:MallGoodsClientHystrix.fillGoodsInfo==error==>param:{}", JSONObject.toJSONString(param));
return null;
}
@Override
public List<OrderGoodsProdDTO> feignListProdGoodsSkuInfo(MallOrderGoodsInfoQO mallOrderGoodsInfoQO, String token) {
log.info("熔断:MallGoodsClientHystrix.feignListProdGoodsSkuInfo==error==>param:{}", JSONObject.toJSONString(mallOrderGoodsInfoQO));
return null;
}
@Override
public List<OrderGoodsIndstDTO> feignListIndstGoodsSkuInfo(MallOrderGoodsInfoQO mallOrderGoodsInfoQO, String token) {
log.info("熔断:MallGoodsClientHystrix.feignListIndstGoodsSkuInfo==error==>param:{}", JSONObject.toJSONString(mallOrderGoodsInfoQO));
return null;
}
@Override
public List<MallProductSpecPriceDTO> feignListProductSpecPrice(ProductSpecPriceQO productSpecPriceQO, String token) {
log.info("熔断:MallGoodsClientHystrix.feignListProductSpecPrice==error==>param:{}", JSONObject.toJSONString(productSpecPriceQO));
return null;
}
@Override
public ProductSpecPriceDTO feignGetUnitPriceByTag(Integer specId, Integer tagId, String token) {
log.info("熔断:MallGoodsClientHystrix.feignGetUnitPriceByTag==error==>param:{}",specId,tagId);
return null;
}
}
package com.mmc.oms.feign.hystrix;
import com.mmc.oms.feign.UserAppApi;
import com.mmc.oms.model.dto.mall.CooperationTagDTO;
import com.mmc.oms.model.dto.user.UserAccountSimpleDTO;
import com.mmc.oms.model.qo.mall.BUserAccountQO;
import lombok.extern.slf4j.Slf4j;
import java.util.List;
/**
* @author: zj
* @Date: 2023/5/18 17:08
*/
@Slf4j
public class UserAppApiHystrix implements UserAppApi {
@Override
public UserAccountSimpleDTO feignGetUserSimpleInfo(Integer userAccountId, String token) {
log.error("熔断:feignGetUserSimpleInfo:{}", userAccountId);
return null;
}
@Override
public List<Integer> feignListUserAccountIds(Integer provinceCode, Integer cityCode, Integer districtCode, String token) {
log.error("熔断:feignListUserAccountIds:{}, {}, {}", provinceCode, cityCode, districtCode);
return null;
}
@Override
public List<UserAccountSimpleDTO> feignListBAccountPage(BUserAccountQO bUserAccountQO, String token) {
log.error("熔断:feignListBAccountPage:{}", bUserAccountQO);
return null;
}
@Override
public List<UserAccountSimpleDTO> feignListUserAccountByIds(List<Integer> ids, String token) {
log.error("熔断:feignListUserAccountByIds:{}", ids);
return null;
}
@Override
public List<UserAccountSimpleDTO> feignListRcdUserInfo(List<Integer> userIds) {
log.error("熔断:feignListRcdUserInfo:{}", userIds);
return null;
}
@Override
public Integer feignGetSuperiorRef(Integer userAccountId) {
log.error("熔断:feignGetSuperiorRef:{}", userAccountId);
return null;
}
@Override
public UserAccountSimpleDTO feignGetUserRcdInfo(Integer userAccountId) {
log.error("熔断:feignGetUserRcdInfo:{}", userAccountId);
return null;
}
@Override
public List<CooperationTagDTO> feignListCooperationTag() {
log.error("熔断:feignListCooperationTag:{}");
return null;
}
}
package com.mmc.oms.model.dto.mall;
import com.mmc.oms.model.dto.coupon.CouponUserOrderDTO;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
* author:zhenjie
* Date:2022/11/4
* time:14:39
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "com.mmc.csf.mall.vo.ConfirmGoodsInfoDTO",description = "确认意向产品清单DTO")
public class ConfirmGoodsInfoDTO implements Serializable {
private static final long serialVersionUID = -4972310061064207010L;
private Integer directoryId;
private List<OrderGoodsProdDetailDTO> orderGoodsProdDetailDTOS;
private List<OrderGoodsIndstProdListDTO> orderGoodsIndstProdListDTOS;
private BigDecimal orderAmount;
private List<CouponUserOrderDTO> usableCoupon;
private List<CouponUserOrderDTO> disableCoupon;
}
package com.mmc.oms.model.dto.mall;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
* @author: zj
* @Date: 2023/5/17 21:27
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CooperationTagDTO implements Serializable {
private static final long serialVersionUID = 8884567706797525506L;
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "合作标签名称")
private String tagName;
@ApiModelProperty(value = "合作标签img")
private String tagImg;
@ApiModelProperty(value = "合作标签描述")
private String tagDescription;
@ApiModelProperty(value = "创建时间")
private Date createTime;
}
package com.mmc.oms.model.dto.mall;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author: zj
* @Date: 2023/6/3 15:53
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CountShowTypeDTO implements Serializable {
private static final long serialVersionUID = -5226139246318294813L;
private Integer showType0;
private Integer showType1;
private Integer showType2;
private Integer showType3;
private Integer showType4;
}
package com.mmc.oms.model.dto.mall;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author 作者 geDuo
* @version 创建时间:2022年3月24日 下午2:38:44
* @explain 类说明
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "com.mmc.csf.mall.dto.GoodsServiceDTO", description = "商品服务DTO")
public class GoodsServiceDTO implements Serializable {
private static final long serialVersionUID = -3178549723714411915L;
private Integer id;
private Integer saleServiceId;
private Integer goodsInfoId;
private String serviceName;
private String remark;
}
package com.mmc.oms.model.dto.mall;
import com.mmc.oms.model.vo.coupon.CouponUserVO;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
* author:zhenjie
* Date:2023/4/4
* time:10:51
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "com.mmc.csf.mall.dto.MallDiscountInfoDTO", description = "小程序DTO")
public class MallDiscountInfoDTO implements Serializable {
private static final long serialVersionUID = -2030828665864337497L;
private BigDecimal allDiscount;
private List<CouponUserVO> couponUserVOS;
}
package com.mmc.oms.model.dto.mall;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @Author LW
* @date 2022/12/21 17:32
* 概要:
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ExcelTarget("mallGoodsInfo")
public class MallGoodsInfoDTO implements Serializable {
private static final long serialVersionUID = -3066818201671524986L;
@Excel(name = "产品名称",width = 25)
private String productName;
@Excel(name = "数量",width = 25)
private Integer count;
@Excel(name = "单价(元/件)",width = 25)
private BigDecimal unitPrice;
@Excel(name = "推荐人采购优惠单价(元/件)",width = 25)
private BigDecimal recPrice;
}
package com.mmc.oms.model.dto.mall;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* @author: zj
* @Date: 2023/6/3 16:19
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MallGoodsShopCarDTO implements Serializable {
private static final long serialVersionUID = 766856809957374985L;
@ApiModelProperty("id")
private Integer id;
@ApiModelProperty("用户id")
private Integer userAccountId;
@ApiModelProperty("商品id")
private Integer goodsInfoId;
@ApiModelProperty("购买数量")
private Integer buyNum;
@ApiModelProperty("0:待下单 1:已下单")
private Integer saleStatus;
@ApiModelProperty("推荐人id")
private Integer recMallUserId;
@ApiModelProperty("备注")
private String remark;
@ApiModelProperty("是否删除")
private Integer deleted;
@ApiModelProperty("生成时间")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
//区分产品或者行业
@ApiModelProperty("区分产品或者行业")
private Integer directoryId;
@ApiModelProperty("商品名称")
private String goodsName;
@ApiModelProperty("商品主图")
private String mainImg;
@ApiModelProperty("状态:0:下架 1:上架")
private Integer shelfStatus;
@ApiModelProperty("商品产品规格信息")
private List<MallSkuInfoSpecDTO> skuList;
}
package com.mmc.oms.model.dto.mall;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mmc.oms.model.dto.kdn.KdnExpDTO;
import com.mmc.oms.model.dto.order.OrderCouponDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* @author 作者 geDuo
* @version 创建时间:2022年3月21日 下午11:35:47
* @explain 类说明
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "com.mmc.csf.mall.dto.MallOrderDTO", description = "小程序DTO")
public class MallOrderDTO implements Serializable {
private static final long serialVersionUID = -5495994390870097181L;
@ApiModelProperty("id")
private Long id;
@ApiModelProperty("订单编号")
private String orderNo;
@ApiModelProperty("状态码")
private Integer statusCode;
@ApiModelProperty("user_account_id")
private Integer userAccountId;
@ApiModelProperty("买家uid")
private String uid;
@ApiModelProperty(value = "渠道等级id")
private Integer cooperationTagId;
@ApiModelProperty(value = "认证企业")
private String companyName;
@ApiModelProperty(value = "渠道合作标签")
private String tagName;
@ApiModelProperty("买家姓名")
private String userName;
@ApiModelProperty("买家昵称")
private String nickName;
@ApiModelProperty("买家手机号")
private String phoneNum;
@ApiModelProperty("0全款购买 1分期付款")
private Integer payMethod;
@ApiModelProperty("订单关闭原因")
private String shutReason;
@ApiModelProperty("下单时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone ="GMT+8")
private Date createTime;
@ApiModelProperty(value = "收发货信息")
private MallOrderExpressDTO exp;
@ApiModelProperty(value = "物流动态信息")
private KdnExpDTO kdn;
@ApiModelProperty(value = "凭证审核不通过的原因")
private String payErrInfo;
@ApiModelProperty(value = "推荐人")
private String recMallUserName;
@ApiModelProperty(value = "收货信息")
private UserAddressDTO userAddress;
@ApiModelProperty("用户收货地址id")
private Integer userAddressId;
@ApiModelProperty("订单交期")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone ="GMT+8")
private Date deliveryTime;
@ApiModelProperty("订单期限")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone ="GMT+8")
private Date creditPeriod;
@ApiModelProperty("订单金额")
private BigDecimal orderAmount;
@ApiModelProperty("购物车的商品总金额")
private BigDecimal shopCarAmount;
@ApiModelProperty(value = "订单商品的服务列表集合")
private List<String> serviceNames;
@ApiModelProperty(value = "运营人员")
private String operationName;
@ApiModelProperty("运营id")
private Integer operationId;
@ApiModelProperty("合同编号")
private String contractNo;
@ApiModelProperty("合同状态状态:状态:(0:等待用户签署、1:用户签署失败、2:等待甲方签署(用户签署成功) 3:用户签署失败、4:甲方签署成功、5:已完成")
private Integer signStatus;
@ApiModelProperty("合同归档日期")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone ="GMT+8")
private Date archiveDate;
@ApiModelProperty(value = "合同签署方式,1:线上,0:线下")
private Integer contractSignedWay;
@ApiModelProperty(value = "标品的备注,字符不超过600")
private String remark;
@ApiModelProperty(value = "订单清单")
private List<MallOrderProdListDTO> mallOrderProdListDTOList;
@ApiModelProperty(value = "订单名称")
private String orderName;
@ApiModelProperty(value = "订单商品的数量")
private Integer goodsNum;
@ApiModelProperty(value = "所选规格")
private List<OGSkuSpecDTO> ogSkuSpecDTOList;
@ApiModelProperty(value = "管理员专用备注")
private String mRemark;
@ApiModelProperty("减免金额")
private BigDecimal deductAmount;
@ApiModelProperty("优惠金额")
private BigDecimal discountAmount;
@ApiModelProperty("实付金额(订单价格-优惠券金额-手动折扣)0406")
private BigDecimal realityAmount;
@ApiModelProperty("分享状态")
private Integer shareStatus;
@ApiModelProperty("分享人id")
private Integer shareId;
@ApiModelProperty("订单使用的优惠券")
private List<OrderCouponDTO> orderCouponDTOS;
@ApiModelProperty("优惠券折扣金额")
private BigDecimal couponDiscountAmount;
@ApiModelProperty("手填折扣金额")
private BigDecimal manualDiscountAmount;
}
package com.mmc.oms.model.dto.mall;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author: zj
* @Date: 2023/6/2 20:57
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MallOrderExpressDTO implements Serializable {
private static final long serialVersionUID = 6804508364845777867L;
@ApiModelProperty(value = "orderId")
private Long orderId;
@ApiModelProperty(value = "发货-快递公司编码")
private String sendExpNo;
@ApiModelProperty(value = "发货-快递单号")
private String sendExpCode;
@ApiModelProperty(value = "发货-收货人名字")
private String takeName;
@ApiModelProperty(value = "发货-收货人手机号")
private String takePhone;
@ApiModelProperty(value = "发货-收货地区")
private String takeRegion;
@ApiModelProperty(value = "发货-收货详细地址")
private String takeAddress;
}
package com.mmc.oms.model.dto.mall;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* author:zhenjie
* Date:2023/4/26
* time:14:32
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "com.mmc.csf.mall.dto.MallOrderFinishDTO", description = "无人机城完成状态的订单")
public class MallOrderFinishDTO implements Serializable {
private static final long serialVersionUID = 4577011678089794859L;
@ApiModelProperty("订单id")
private Long orderId;
@ApiModelProperty("订单编号")
private String orderNo;
@ApiModelProperty("订单名称")
private String orderName;
@ApiModelProperty("实付金额(订单价格-优惠券金额-手动折扣)0406")
private BigDecimal realityAmount;
@ApiModelProperty("是否已分成")
private Integer divide;
@ApiModelProperty("用户id")
private Integer userAccountId;
@ApiModelProperty("买家uid")
private String uid;
@ApiModelProperty("买家姓名")
private String userName;
@ApiModelProperty("买家昵称")
private String nickName;
@ApiModelProperty(value = "认证企业")
private String entName;
}
package com.mmc.oms.model.dto.mall;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* author:zhenjie
* Date:2022/11/23
* time:16:10
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "com.mmc.csf.mall.dto.MallOrderPageDTO", description = "无人机城PC订单列表DTO")
public class MallOrderPageDTO implements Serializable {
private static final long serialVersionUID = 56353980620113181L;
@ApiModelProperty("id")
private Long id;
@ApiModelProperty("订单编号")
private String orderNo;
@ApiModelProperty("订单图片-第一个商品的主图")
private String orderMainImg;
@ApiModelProperty("订单名称-第一个商品的名称")
private String orderName;
@ApiModelProperty("商品总数量")
private Integer totalBuyNum;
@ApiModelProperty("订单金额")
private BigDecimal orderAmount;
@ApiModelProperty("订单状态码")
private Integer statusCode;
@ApiModelProperty("合同状态状态:状态:(0:等待用户签署、1:用户签署失败、2:等待甲方签署(用户签署成功) 3:用户签署失败、4:甲方签署成功、5:已完成")
private Integer signStatus;
@ApiModelProperty(value = "运营人员")
private String operationName;
@ApiModelProperty("运营id")
private Integer operationId;
@ApiModelProperty("订单交期")
@JsonFormat(pattern = "yyyy-MM-dd",timezone ="GMT+8")
private Date deliveryTime;
@ApiModelProperty("合同编号")
private String contractNo;
@ApiModelProperty("userAccountId")
private Integer userAccountId;
@ApiModelProperty("买家uid")
private String uid;
@ApiModelProperty("买家姓名")
private String userName;
@ApiModelProperty("买家手机号")
private String phoneNum;
@ApiModelProperty("0全款购买 1分期付款")
private Integer payMethod;
@ApiModelProperty(value = "合同签署方式,1:线上,0:线下")
private Integer contractSignedWay;
@ApiModelProperty("下单时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone ="GMT+8")
private Date createTime;
@ApiModelProperty(value = "推荐人")
private String recMallUserName;
@ApiModelProperty(value = "所选规格")
private List<OGSkuSpecDTO> ogSkuSpecDTOList;
@ApiModelProperty(value = "订单备注,字符不超过600")
private String remark;
@ApiModelProperty(value = "管理员专用备注")
private String mRemark;
@ApiModelProperty(value = "付款期限")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone ="GMT+8")
private Date creditPeriod;
@ApiModelProperty(value = "买家认证企业")
private String entName;
@ApiModelProperty(value = "销售id")
private Integer saleId;
@ApiModelProperty(value = "销售名称")
private String saleName;
@ApiModelProperty(value = "分销商等级")
private String tagName;
@ApiModelProperty(value = "是否完成实名认证和法人认证")
private Integer realNameAuth;
@ApiModelProperty(value = "实际付款")
private BigDecimal realPayAmount;
@ApiModelProperty(value = "补贴金额")
private BigDecimal subAmount;
@ApiModelProperty(value = "共享人id")
private Integer shareId;
@ApiModelProperty(value = "共享状态 0是起始状态 100接受共享中 200已共享 300其他状态")
private Integer shareStatus;
@ApiModelProperty("减免金额")
private BigDecimal deductAmount;
@ApiModelProperty("优惠金额")
private BigDecimal discountAmount;
@ApiModelProperty("实付金额")
private BigDecimal realityAmount;
@ApiModelProperty("订单关闭原因")
private String shutReason;
@ApiModelProperty("产品清单")
private List<MallOrderProdListDTO> mallOrderProdListDTOList;
}
package com.mmc.oms.model.dto.mall;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* author:zhenjie
* Date:2022/11/25
* time:20:59
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "com.mmc.csf.mall.dto.MallOrderProdListDTO", description = "无人机城PC订单产品列表")
public class MallOrderProdListDTO implements Serializable {
private static final long serialVersionUID = 2825582287124124679L;
private Integer id;
private Integer goodsInfoId;
@ApiModelProperty("产品名称")
private String productName;
@ApiModelProperty("产品型号")
private String model;
@ApiModelProperty("产品sku规格名称")
private String prodSkuSpecName;
private String prodSkuSpecImage;
@ApiModelProperty("料号")
private String partNo;
@ApiModelProperty("版本号")
private String versionDesc;
@ApiModelProperty("购买数量")
private Integer buyNum;
@ApiModelProperty("规格单价")
private BigDecimal unitPrice;
@ApiModelProperty("规格总价格")
private BigDecimal skuSpecAmount;
}
package com.mmc.oms.model.dto.mall;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* author:zhenjie
* Date:2022/11/9
* time:17:17
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "com.mmc.csf.mall.dto.MallProductSpecPriceDTO", description = "产品对应价格")
public class MallProductSpecPriceDTO implements Serializable {
private static final long serialVersionUID = 4717398210156973205L;
@ApiModelProperty(value = "产品规格id")
private Integer productSpecId;
@ApiModelProperty(value = "合作价格")
private BigDecimal opPrice;
@ApiModelProperty(value = "市场价格")
private BigDecimal mkPrice;
}
package com.mmc.oms.model.dto.mall;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* @Author LW
* @date 2022/3/24 18:27
* 概要:
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "com.mmc.csf.mall.dto.MallSkuDTO", description = "商品规格DTO")
public class MallSkuDTO implements Serializable {
private static final long serialVersionUID = 7691622398702487199L;
@ApiModelProperty(value = "id")
private Long id;
@ApiModelProperty(value = "pid")
private Integer pid;
@ApiModelProperty(value = "sku名称")
private String specName;
@ApiModelProperty(value = "sku描述")
private String specDesc;
@ApiModelProperty(value = "模板id")
private Integer skuTemplateId;
@ApiModelProperty(value = "类型id")
private Integer skuTypeId;
@ApiModelProperty(value = "图片")
private String specPicture;
@ApiModelProperty(value = "spu")
private String spu;
@ApiModelProperty(value = "产品id")
private List<Integer> productId;
}
package com.mmc.oms.model.dto.mall;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
* @author: zj
* @Date: 2023/6/3 16:20
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MallSkuInfoSpecDTO implements Serializable {
private static final long serialVersionUID = 4214771967767248990L;
@ApiModelProperty("id")
private Integer id;
@ApiModelProperty("商品最小规格id")
private Integer mallSkuInfoSpecId;
private Integer deleted;
private Boolean valid;
private Date createTime;
@ApiModelProperty("产品或者行业规格名称")
private String specName;
}
package com.mmc.oms.model.dto.mall;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author 作者 geDuo
* @version 创建时间:2022年3月22日 下午9:05:38
* @explain 类说明
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "com.mmc.csf.mall.dto.MallStatusDTO", description = "订单状态字典DTO")
public class MallStatusDTO implements Serializable {
private static final long serialVersionUID = 267324213944203674L;
@ApiModelProperty("状态")
private String status;
@ApiModelProperty("状态码")
private Integer code;
@ApiModelProperty("正常流程的下一个状态码")
private Integer nextCode;
}
package com.mmc.oms.model.dto.mall;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* author:zhenjie
* Date:2022/11/28
* time:14:54
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "com.mmc.csf.mall.dto.OGSkuSpecDTO", description = "下单时所选规格")
public class OGSkuSpecDTO implements Serializable {
private static final long serialVersionUID = -6135270464499137225L;
private Integer id;
private Integer directoryId;
private Integer shopCarId;
private String skuSpecName;
}
package com.mmc.oms.model.dto.mall;
import cn.afterturn.easypoi.excel.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* @Author LW
* @date 2023/5/4 10:17
* 概要:
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Accessors(chain = true)
public class OrderBaseDTO implements Serializable {
private static final long serialVersionUID = -6909778331393779181L;
private Long id;
private String orderNo;
private Date orderDate;
private BigDecimal orderAmount;
@ApiModelProperty(value = "实际付款")
private BigDecimal actualPayment;
@ApiModelProperty(value = "抵扣优惠券金额")
private BigDecimal deductionAmount;
@ApiModelProperty(value = "折扣金额")
private BigDecimal discountAmount;
@ApiModelProperty(value = "合同签署方式,1:线上,0:线下")
private Integer contractSignedWay;
private String remark;
@ApiModelProperty("下单用户id")
private Integer userAccountId;
@ApiModelProperty("买家uid")
private String uid;
@ApiModelProperty("买家姓名")
private String userName;
@ApiModelProperty("买家昵称")
private String userNickname;
@ApiModelProperty(value = "买家认证企业")
private String entName;
@ApiModelProperty(value = "是否完成实名认证和法人认证")
private Integer realNameAuth;
@ApiModelProperty(value = "分销商等级")
private String tagName;
@ApiModelProperty(value = "推荐人")
private String recMallUserName;
@ApiModelProperty(value = "推荐人uid")
private String recMallUid;
@ApiModelProperty(value = "销售名称")
private String saleName;
@ApiModelProperty(value = "销售uid")
private String saleUid;
@ApiModelProperty(value = "运营人员名称")
private String operationName;
@ApiModelProperty(value = "运营人员uid")
private String operationUid;
@ApiModelProperty(value = "商品清单")
List<MallGoodsInfoDTO> mallGoodsInfoDTOS;
@Excel(name = "推荐人采购优惠总价(元)", orderNum = "14", width = 25, needMerge = true)
private BigDecimal recDiscountTotalPrice;
@Excel(name = "推荐人利润(元)", orderNum = "15", width = 25, needMerge = true)
private BigDecimal recProfit;
}
package com.mmc.oms.model.dto.mall;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* @author: zj
* @Date: 2023/6/3 20:21
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "com.mmc.csf.mall.dto.OrderGoodsIndstDTO", description = "行业订单DTO")
public class OrderGoodsIndstDTO implements Serializable {
private static final long serialVersionUID = -1809741999941834440L;
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "订单id")
private Long orderId;
@ApiModelProperty(value = "购物车id")
private Integer mallIndstShopCarId;
@ApiModelProperty(value = "商品id")
private Integer goodsInfoId;
@ApiModelProperty(value = "商品所属类型id")
private Integer directoryId;
@ApiModelProperty(value = "商品所有规格金额")
private BigDecimal goodsAmount;
@ApiModelProperty(value = "商品编号")
private String goodsNo;
@ApiModelProperty(value = "商品名称")
private String goodsName;
@ApiModelProperty(value = "商品主图")
private String mainImg;
@ApiModelProperty(value = "购买数量")
private Integer buyNum;
@ApiModelProperty(value = "生成时间")
private Date createTime;
@ApiModelProperty(value = "更新时间")
private Date updateTime;
@ApiModelProperty(value = "是否有效")
private Boolean valid;
@ApiModelProperty(value = "行业订单规格")
private List<OrderGoodsIndstDetailDTO> orderGoodsIndstDetailDTOS;
@ApiModelProperty("商品服务列表")
private List<GoodsServiceDTO> services;
}
\ No newline at end of file
package com.mmc.oms.model.dto.mall;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* @author: zj
* @Date: 2023/6/3 20:21
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class OrderGoodsIndstDetailDTO {
private static final long serialVersionUID = 3716298704318911013L;
@ApiModelProperty(value = "行业订单规格id")
private Integer id;
@ApiModelProperty(value = "行业订单id")
private Integer orderGoodsIndstId;
@ApiModelProperty(value = "购物车详情id")
private Integer mallIndstShopCarDetailId;
@ApiModelProperty(value = "商品行业规格id")
private Integer mallIndstSkuInfoSpecId;
@ApiModelProperty(value = "行业规格id")
private Integer industrySpecId;
@ApiModelProperty(value = "行业规格名称")
private String industrySkuSpecName;
@ApiModelProperty(value = "行业规格图片")
private String industrySkuSpecImage;
@ApiModelProperty(value = "购买数量")
private Integer buyNum;
@ApiModelProperty(value = "行业规格单价")
private BigDecimal unitPrice;
@ApiModelProperty(value = "行业所有规格总额")
private BigDecimal skuSpecAmount;
@ApiModelProperty(value = "生成时间")
private Date createTime;
@ApiModelProperty(value = "更新时间")
private Date updateTime;
@ApiModelProperty(value = "是否有效")
private Boolean valid;
@ApiModelProperty(value = "产品单位名称")
private String unitName;
private List<OrderGoodsIndstProdListDTO> orderGoodsIndstProdListDTOS;
}
package com.mmc.oms.model.dto.mall;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
* @author: zj
* @Date: 2023/6/3 20:22
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "com.mmc.csf.mall.dto.OrderGoodsIndstProdListDTO", description = "行业规格对应产品清单DTO")
public class OrderGoodsIndstProdListDTO implements Serializable {
private static final long serialVersionUID = -1838976151472371521L;
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "行业订单规格id")
private Integer orderGoodsIndstDetailId;
@ApiModelProperty(value = "产品类型名称")
private String goodsTypeName;
@ApiModelProperty(value = "产品名称")
private String productName;
@ApiModelProperty(value = "型号")
private String model;
@ApiModelProperty(value = "品牌")
private String productBrand;
@ApiModelProperty(value = "产品规格id")
private Integer productSpecId;
@ApiModelProperty(value = "产品规格名称")
private String prodSkuSpecName;
@ApiModelProperty(value = "产品规格图片")
private String prodSkuSpecImage;
@ApiModelProperty(value = "料号")
private String partNo;
@ApiModelProperty(value = "版本描述")
private String versionDesc;
@ApiModelProperty(value = "购买数量")
private Integer buyNum;
@ApiModelProperty(value = "生成时间")
private Date createTime;
@ApiModelProperty(value = "更新时间")
private Date updateTime;
@ApiModelProperty(value = "单位名称-产品规格")
private String unitName;
}
\ No newline at end of file
package com.mmc.oms.model.dto.mall;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* @author: zj
* @Date: 2023/6/2 20:57
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "com.mmc.iuav.mall.dto.OrderGoodsProdDTO", description = "订单商品sku信息DTO")
public class OrderGoodsProdDTO implements Serializable {
private static final long serialVersionUID = 2066849435828937057L;
@ApiModelProperty(value = "orderGoodsProdId")
private Integer id;
@ApiModelProperty(value = "订单id")
private Long orderId;
@ApiModelProperty(value = "产品购物车id")
private Integer mallProdShopCarId;
@ApiModelProperty(value = "商品id")
private Integer goodsInfoId;
@ApiModelProperty(value = "商品所属类型")
private Integer directoryId;
@ApiModelProperty(value = "全部sku金额")
private BigDecimal goodsAmount;
@ApiModelProperty(value = "商品编号")
private String goodsNo;
@ApiModelProperty(value = "商品名称")
private String goodsName;
@ApiModelProperty(value = "商品主图")
private String mainImg;
@ApiModelProperty(value = "购买数量")
private Integer buyNum;
@ApiModelProperty(value = "生成时间")
private Date createTime;
@ApiModelProperty(value = "更新时间")
private Date updateTime;
@ApiModelProperty(value = "是否有效")
private Boolean valid;
@ApiModelProperty(value = "是否上架")
private Integer shelfStatus;
@ApiModelProperty(value = "是否删除")
private Integer deleted;
@ApiModelProperty("商品服务列表")
private List<GoodsServiceDTO> services;
@ApiModelProperty(value = "订单详情")
private List<OrderGoodsProdDetailDTO> orderGoodsProdDetailDTOS;
}
package com.mmc.oms.model.dto.mall;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* author:zhenjie
* Date:2022/10/19
* time:15:27
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "com.mmc.csf.mall.dto.OrderGoodsProdDetailDTO", description = "订单最小sku信息")
public class OrderGoodsProdDetailDTO implements Serializable {
private static final long serialVersionUID = 2079521148328016486L;
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "二级订单的id")
private Integer orderGoodsProdId;
@ApiModelProperty(value = "购物车详情id")
private Integer mallProdShopCarDetailId;
@ApiModelProperty(value = "商品skuId")
private Integer mallProdSkuInfoId;
@ApiModelProperty(value = "商品sku详情id")
private Integer mallProdSkuInfoSpecId;
@ApiModelProperty(value = "产品规格id")
private Integer productSpecId;
@ApiModelProperty(value = "产品规格名称")
private String specName;
@ApiModelProperty(value = "产品规格图片")
private String prodSkuSpecImage;
@ApiModelProperty(value = "料号")
private String partNo;
@ApiModelProperty(value = "版本描述")
private String versionDesc;
@ApiModelProperty(value = "购买数量")
private Integer buyNum;
@ApiModelProperty(value = "单价")
private BigDecimal unitPrice;
@ApiModelProperty(value = "总价格")
private BigDecimal skuSpecAmount;
@ApiModelProperty(value = "商品产品类型名称")
private String goodsTypeName;
@ApiModelProperty(value = "产品名称")
private String productName;
@ApiModelProperty(value = "型号")
private String model;
@ApiModelProperty(value = "品牌")
private String productBrand;
@ApiModelProperty(value = "品牌Id")
private Integer brandInfoId;
@ApiModelProperty(value = "生成时间")
private Date createTime;
@ApiModelProperty(value = "更新时间")
private Date updateTime;
@ApiModelProperty(value = "是否有效")
private Boolean valid;
@ApiModelProperty(value = "是否删除")
private Integer skuInfoDeleted;
@ApiModelProperty(value = "是否删除")
private Integer skuSpecDeleted;
@ApiModelProperty(value = "是否删除")
private Integer specDeleted;
@ApiModelProperty(value = "单位名称")
private String unitName;
}
package com.mmc.oms.model.dto.mall;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* @author 作者 geDuo
* @version 创建时间:2022年3月25日 上午10:02:58
* @explain 类说明
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "com.mmc.csf.mall.dto.OrderPayDTO", description = "订单商品信息DTO")
public class OrderPayDTO implements Serializable {
private static final long serialVersionUID = -3966470399037847912L;
@ApiModelProperty(value = "orderId")
private Long orderId;
@ApiModelProperty(value = "凭证类型:0全款 1预付款 2尾款")
private Integer payType;
@ApiModelProperty(value = "支付备注")
private String payRemark;
@ApiModelProperty(value = "审核不通过原因")
private String refuseReason;
@ApiModelProperty(value = "支付凭证")
private List<String> vouchr;
}
package com.mmc.oms.model.dto.mall;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author 作者 geDuo
* @version 创建时间:2022年3月24日 下午2:04:53
* @explain 类说明
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "com.mmc.csf.mall.dto.OrderServiceDTO", description = "订单商品信息DTO")
public class OrderServiceDTO implements Serializable {
private static final long serialVersionUID = 3384622935297961674L;
private Long orderId;
private Integer goodsInfoId;
@ApiModelProperty(value = "服务名")
private String serviceName;
@ApiModelProperty(value = "服务备注/说明")
private String remark;
}
package com.mmc.oms.model.dto.mall;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @Author LW
* @date 2022/10/8 10:22
* 概要:
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class ProductSpecPriceDTO implements Serializable {
private static final long serialVersionUID = 3860131437107977368L;
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "规格id")
private Integer productSpecId;
@ApiModelProperty(value = "等级标签id")
private Integer tagInfoId;
@ApiModelProperty(value = "价格")
private BigDecimal price;
@ApiModelProperty(value = "创建时间")
private Date createTime;
}
package com.mmc.oms.model.dto.mall;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UavContractInfoDTO implements Serializable {
private static final long serialVersionUID = 8595958456591915448L;
private Integer id;
private Integer userAccountId;
private Long mallOrderId;
private String contractTitle;
@ApiModelProperty(value = "状态:(0:等待用户签署、1:用户签署失败、2:等待甲方签署(用户签署成功) 3:用户签署失败、4:甲方签署成功、5:已完成")
private Integer signStatus;
@ApiModelProperty(value = "签署完成日期")
private Date singerTime;
private String contractNo;
private Date createTime;
private Date updateTime;
private Integer deleted;
@ApiModelProperty(value = "买家签署失败备注信息")
private String aRemark;
@ApiModelProperty(value = "科比特签署失败备注信息")
private String bRemark;
@ApiModelProperty(value = "买家签署交易号")
private String aTransactionId;
@ApiModelProperty(value = "科比特签署交易号")
private String bTransactionId;
@ApiModelProperty(value = "归档日期")
private Date archiveDate;
}
package com.mmc.oms.model.dto.mall;
import com.mmc.oms.common.publicinterface.Update;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @author: zj
* @Date: 2023/6/2 20:59
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class UserAddressDTO implements Serializable {
private static final long serialVersionUID = -4644500806706169486L;
@ApiModelProperty(value = "唯一标识")
@NotNull(message = "id不能为空",groups = {Update.class})
private Integer id;
@ApiModelProperty(value = "收货人姓名")
private String takeName;
@ApiModelProperty(value = "收货人电话")
private String takePhone;
@ApiModelProperty(value = "收货地址")
private String takeRegion;
@ApiModelProperty(value = "收货详细地址")
private String takeAddress;
@ApiModelProperty(value = "使用类型;0默认,1普通")
private Integer type;
}
...@@ -49,4 +49,8 @@ public class UserAccountSimpleDTO implements Serializable { ...@@ -49,4 +49,8 @@ public class UserAccountSimpleDTO implements Serializable {
private String accountNo; private String accountNo;
@ApiModelProperty(value = "渠道等级id") @ApiModelProperty(value = "渠道等级id")
private Integer cooperationTagId; private Integer cooperationTagId;
@ApiModelProperty(value = "认证企业")
private String companyName;
@ApiModelProperty(value = "合作标签")
private String tagName;
} }
package com.mmc.oms.model.excel;
import lombok.SneakyThrows;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.poifs.filesystem.FileMagic;
import org.apache.poi.ss.usermodel.PrintSetup;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
/**
* @author LW
* @Description
*/
public class ExcelTool {
/**
* 克隆sheet
* 注意传入的文件流在执行本方法后将关闭
* @param excelIns excel文件流
* @param tplSheetIndex 需要克隆的模板索引
* @param newSheetNames 所需要生成的excel最终的sheet名
* @return 新的InputStream
*/
@SneakyThrows
public static InputStream cloneSheet(InputStream excelIns, int tplSheetIndex, String... newSheetNames){
Workbook workbook = ExcelTool.isXlsx(excelIns) ? new XSSFWorkbook(excelIns) : new HSSFWorkbook(excelIns);
//模板sheet
Sheet tplSheet = workbook.getSheetAt(tplSheetIndex);
for (int i = 0; i < newSheetNames.length; i++) {
String sheetName = newSheetNames[i];
//第一个,直接改名即可
if(0 == i){
workbook.setSheetName(0,sheetName);
}else{
Sheet newSheet = workbook.cloneSheet(0);
//同时复制打印设置
PrintSetup tplPrintSetup = tplSheet.getPrintSetup();
PrintSetup newPrintSetup = newSheet.getPrintSetup();
//打印方向,true:横向,false:纵向(默认)
newPrintSetup.setLandscape(tplPrintSetup.getLandscape());
//纸张类型
newPrintSetup.setPaperSize(tplPrintSetup.getPaperSize());
int sheetIndex = workbook.getSheetIndex(newSheet);
workbook.setSheetName(sheetIndex,sheetName);
}
}
try(ByteArrayOutputStream bos = new ByteArrayOutputStream()){
workbook.write(bos);
byte[] bytes = bos.toByteArray();
return new ByteArrayInputStream(bytes);
} finally {
excelIns.close();
}
}
/**
* 判断是否excel的07格式
* @param ins
* @return
*/
@SneakyThrows
public static boolean isXlsx(InputStream ins){
return FileMagic.valueOf(ins) == FileMagic.OOXML;
}
/**
* 根据url下载文件流
* @param urlStr
* @return
*/
public static InputStream getInputStreamFromUrl(String urlStr) {
InputStream inputStream=null;
try {
//url解码
URL url = new URL(java.net.URLDecoder.decode(urlStr, "UTF-8"));
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
//设置超时间为3秒
conn.setConnectTimeout(3 * 1000);
//防止屏蔽程序抓取而返回403错误
conn.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)");
//得到输入流
inputStream = conn.getInputStream();
} catch (IOException e) {
}
return inputStream;
}
}
\ No newline at end of file
package com.mmc.oms.model.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import com.mmc.oms.model.dto.mall.MallOrderPageDTO;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
@Data
@NoArgsConstructor
@ExcelTarget("mallOrderExcel")
public class MallOrderExcel implements Serializable {
private static final long serialVersionUID = 1L;
@Excel(name = "订单编号", orderNum = "1", width = 25)
private String orderNo;
@Excel(name = "订单名称", orderNum = "2", width = 25)
private String goodsName;
@Excel(name = "商品总数", orderNum = "3", width = 25)
private Integer buyNums;
@Excel(name = "状态", orderNum = "4", width = 25)
private String statusName;
@Excel(name = "运营人员", orderNum = "5", width = 25)
private String operationName;
@Excel(name = "订单交期", orderNum = "6", width = 25, databaseFormat = "yyyyMMdd", format = "yyyy-MM-dd", isImportField = "true_st", timezone = "Asia/Shanghai")
private Date deliveryTime;
@Excel(name = "合同编号", orderNum = "7", width = 25)
private String contractNo;
@Excel(name = "创建时间", orderNum = "5", width = 25, databaseFormat = "yyyyMMdd", format = "yyyy-MM-dd HH:mm:ss", isImportField = "true_st", timezone = "Asia/Shanghai")
private Date createdTime;
@Excel(name = "买家账号", orderNum = "6", width = 25)
private String userName;
@Excel(name = "推荐人", orderNum = "7", width = 25)
private String recMallUserName;
public MallOrderExcel(String orderNo, String goodsName, Integer buyNums, String statusName, String operationName, Date deliveryTime, String contractNo, Date createdTime, String userName, String recMallUserName) {
this.orderNo = orderNo;
this.goodsName = goodsName;
this.buyNums = buyNums;
this.statusName = statusName;
this.operationName = operationName;
this.deliveryTime = deliveryTime;
this.contractNo = contractNo;
this.createdTime = createdTime;
this.userName = userName;
this.recMallUserName = recMallUserName;
}
public MallOrderExcel(MallOrderPageDTO d) {
this.orderNo = d.getOrderNo();
this.goodsName = d.getOrderName();
this.buyNums = d.getTotalBuyNum();
this.operationName = d.getOperationName();
this.deliveryTime = d.getDeliveryTime();
this.contractNo = d.getContractNo();
this.createdTime = d.getCreateTime();
this.userName = d.getUserName();
this.recMallUserName = d.getRecMallUserName();
}
}
package com.mmc.oms.model.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import com.mmc.oms.model.dto.mall.MallGoodsInfoDTO;
import com.mmc.oms.model.dto.mall.MallOrderPageDTO;
import com.mmc.oms.model.dto.mall.OrderBaseDTO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* @author 23214
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@ExcelTarget("operationalDataExcel")
@Builder
public class OperationalDataExcel implements Serializable {
private static final long serialVersionUID = 1L;
@Excel(name = "订单编号", orderNum = "1", width = 25, needMerge = true)
private String orderNo;
@Excel(name = "下单时间", orderNum = "2", width = 25, databaseFormat = "yyyyMMdd", format = "yyyy-MM-dd HH:mm:ss", isImportField = "true_st", timezone = "Asia/Shanghai", needMerge = true)
private Date orderTime;
@Excel(name = "买家用户", orderNum = "3", width = 25, needMerge = true)
private String userInfo;
@Excel(name = "公司名称", orderNum = "4", width = 25, needMerge = true)
private String corporateName;
@Excel(name = "分销商等级", orderNum = "5", width = 25, needMerge = true)
private String goodsName;
@Excel(name = "上级分销商(推荐人)", orderNum = "6", width = 25, needMerge = true)
private String recMallUserName;
@Excel(name = "订单金额", orderNum = "7", width = 25, needMerge = true)
private BigDecimal orderAmount;
@Excel(name = "实际付款金额", orderNum = "8", width = 25, needMerge = true)
private BigDecimal realPayAmount;
@Excel(name = "抵扣优惠券金额", orderNum = "9", width = 25, needMerge = true)
private BigDecimal subAmount;
@Excel(name = "折扣金额", orderNum = "10", width = 25, needMerge = true)
private BigDecimal discountAmount;
@Excel(name = "签单模式(线上or线下)", orderNum = "11", width = 25, needMerge = true, replace = {"线下_0", "线上_1", "无_2"})
private Integer signBillModel;
@Excel(name = "是否完成实名和法人认证", orderNum = "12", width = 25, needMerge = true, replace = {"否_0", "是_1"})
private Integer realNameAuth;
@ExcelCollection(name = "产品清单", orderNum = "13")
private List<MallGoodsInfoDTO> productInventory;
@Excel(name = "推荐人采购优惠总价(元)", orderNum = "14", width = 25, needMerge = true)
private BigDecimal recDiscountTotalPrice;
@Excel(name = "推荐人利润(元)", orderNum = "15", width = 25, needMerge = true)
private BigDecimal recProfit;
@Excel(name = "销售", orderNum = "16", width = 25, needMerge = true)
private String saleName;
@Excel(name = "运营操作人员", orderNum = "17", width = 25, needMerge = true)
private String operationName;
@Excel(name = "备注", orderNum = "18", width = 25, needMerge = true)
private String memo;
public OperationalDataExcel(MallOrderPageDTO d) {
this.orderTime = d.getCreateTime();
this.orderNo = d.getEntName();
this.goodsName = d.getTagName();
this.recMallUserName = d.getRecMallUserName();
this.orderAmount = d.getOrderAmount();
this.realPayAmount = d.getRealPayAmount();
this.subAmount = d.getSubAmount();
this.signBillModel = d.getContractSignedWay() == null ? 2 : d.getContractSignedWay();
this.realNameAuth = d.getRealNameAuth() == null ? 0 : d.getRealNameAuth();
this.saleName = d.getSaleName();
this.operationName = d.getOperationName();
this.memo = d.getRemark();
}
public OperationalDataExcel(OrderBaseDTO d) {
this.orderTime = d.getOrderDate();
this.orderNo = d.getOrderNo();
this.userInfo = d.getUserName() == null ? d.getUserNickname() + "(" + d.getUid() + ")" : d.getUserName() + "(" + d.getUid() + ")";
this.corporateName = d.getEntName();
this.goodsName = d.getTagName();
this.recMallUserName = d.getRecMallUserName()==null? null : d.getRecMallUserName() + "(" + d.getRecMallUid() + ")";
this.orderAmount = d.getOrderAmount();
this.realPayAmount = d.getActualPayment();
this.subAmount = d.getDeductionAmount();
this.discountAmount = d.getDiscountAmount();
this.signBillModel = d.getContractSignedWay() == null ? 2 : d.getContractSignedWay();
this.realNameAuth = d.getRealNameAuth() == null ? 0 : d.getRealNameAuth();
this.saleName = d.getSaleName() == null ? "" : d.getSaleName() + "(" + d.getSaleUid() + ")";
this.operationName = d.getOperationName() == null ? "" : d.getOperationName() + "(" + d.getOperationUid() + ")";
this.memo = d.getRemark();
this.recDiscountTotalPrice =d.getRecDiscountTotalPrice();
this.recProfit = d.getRecProfit();
this.productInventory = d.getMallGoodsInfoDTOS();
}
}
package com.mmc.oms.model.excel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* @Author LW
* @date 2022/12/16 17:03
* 概要:
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class OrderExportDTO implements Serializable {
private static final long serialVersionUID = -2885680868396036739L;
private String buyerAccount;
private String authCompany;
private String saleOwner;
private String orderCode;
private List<OrderItem> itemList;
}
package com.mmc.oms.model.excel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Author LW
* @date 2022/12/16 17:04
* 概要:
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class OrderItem implements Serializable {
private static final long serialVersionUID = -1597697501589128816L;
private String productName;
private String liaoNo;
private String versionDesc;
private Integer quantity;
private String model;
private String memo;
}
package com.mmc.oms.model.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* author:zhenjie
* Date:2022/11/9
* time:16:21
*/
@Data
@NoArgsConstructor
@ExcelTarget("shoppingTrolleyProdExcel")
public class ShoppingTrolleyProdExcel implements Serializable {
private static final long serialVersionUID = 7448834330533651658L;
private Integer productSpecId;
@Excel(name = "产品名称", orderNum = "1", width = 25)
private String productName;
@Excel(name = "所选规格", orderNum = "2", width = 25)
private String productSpecName;
@Excel(name = "数量", orderNum = "3", width = 25)
private Integer buyNum;
@Excel(name = "单位", orderNum = "4", width = 25)
private String unit;
@Excel(name = "产品图片", orderNum = "5", width = 15, height = 30, type = 2)
private String productSpecImg;
@Excel(name = "合作价格", orderNum = "6", width = 25, numFormat = "¥#,##0.00;¥-#,##0.00")
private BigDecimal opPrice;
@Excel(name = "市场指导价格", orderNum = "7", width = 25, numFormat = "¥#,##0.00;¥-#,##0.00")
private BigDecimal mkPrice;
}
package com.mmc.oms.model.qo.mall;
import com.mmc.oms.common.publicinterface.Page;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
/**
* @author: zj
* @Date: 2023/5/25 13:32
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BUserAccountQO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "关键字", required = false)
private String keyword;
@ApiModelProperty(value = "地区", required = false)
private String area;
@ApiModelProperty(value = "省份编码", required = false)
private Integer provinceCode;
@ApiModelProperty(value = "城市编码", required = false)
private Integer cityCode;
@ApiModelProperty(value = "县区编码", required = false)
private Integer districtCode;
@ApiModelProperty(value = "角色id", required = false)
private Integer roleId;
@ApiModelProperty(value = "账号状态:0禁用 1可用")
private Integer accountStatus;
@ApiModelProperty(value = "账号状态:0合伙人 1员工")
private Integer userType;
@ApiModelProperty(value = "用户id集合")
private List<Integer> userIds;
@ApiModelProperty(value = "推荐单位id")
private Integer rcdCompanyId;
@ApiModelProperty(value="单位集合", hidden = true)
private List<Integer> companys;
@ApiModelProperty(value = "页码", required = true)
@NotNull(message = "页码不能为空", groups = Page.class)
@Min(value = 1, groups = Page.class)
private Integer pageNo;
@ApiModelProperty(value = "每页显示数", required = true)
@NotNull(message = "每页显示数不能为空", groups = Page.class)
@Min(value = 1, groups = Page.class)
private Integer pageSize;
public void buildCurrentPage() {
this.pageNo = (pageNo - 1) * pageSize;
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论