Commit d71e4140 authored by shiyu's avatar shiyu

寄售单流程修改

parent f4af76be
...@@ -73,6 +73,21 @@ public class ConsignSaleController { ...@@ -73,6 +73,21 @@ public class ConsignSaleController {
} }
@ApiOperation(value = "用户寄售商品确认签收")
@PostMapping("/confirmReceive")
public Result confirmReceive(@RequestBody ConsignSaleRequestDto dto) {
logger.info("【请求开始】用户寄售商品确认签收,请求参数:{}", JSON.toJSONString(dto));
Validator validator = new Validator(FormHandler.ofEntity(dto));
validator.set("saleId", "寄售单号").must().string()
.end();
if (!validator.isValid()) {
return Result.failed(ResultCode.PARAM_ERROR.getCode(), validator.getErrorInfo());
}
return consignSaleService.confirmReceive(dto);
}
@ApiOperation(value = "实物鉴定") @ApiOperation(value = "实物鉴定")
@PostMapping("/identify") @PostMapping("/identify")
public Result identify(@RequestBody ConsignSaleRequestDto dto) { public Result identify(@RequestBody ConsignSaleRequestDto dto) {
...@@ -91,10 +106,11 @@ public class ConsignSaleController { ...@@ -91,10 +106,11 @@ public class ConsignSaleController {
} }
@ApiOperation(value = "完成寄售")
@PostMapping("/finish") @ApiOperation(value = "用户商品确认售出")
public Result finish(@RequestBody ConsignSaleRequestDto dto) { @PostMapping("/finishSale")
logger.info("【请求开始】完成寄售,请求参数:{}", JSON.toJSONString(dto)); public Result finishSale(@RequestBody ConsignSaleRequestDto dto) {
logger.info("【请求开始】用户商品确认售出,请求参数:{}", JSON.toJSONString(dto));
Validator validator = new Validator(FormHandler.ofEntity(dto)); Validator validator = new Validator(FormHandler.ofEntity(dto));
validator.set("saleId", "寄售单号").must().string() validator.set("saleId", "寄售单号").must().string()
.set("dealPrice", "成交价格").must().number() .set("dealPrice", "成交价格").must().number()
...@@ -105,7 +121,24 @@ public class ConsignSaleController { ...@@ -105,7 +121,24 @@ public class ConsignSaleController {
if (StringUtils.isEmpty(dto.getRemark())) { if (StringUtils.isEmpty(dto.getRemark())) {
return Result.failed("成交平台必填"); return Result.failed("成交平台必填");
} }
return consignSaleService.finish(dto); return consignSaleService.finishSale(dto);
}
@ApiOperation(value = "完成用户结款,上传凭证")
@PostMapping("/finishSettlement")
public Result finishSettlement(@RequestBody ConsignSaleRequestDto dto) {
logger.info("【请求开始】完成用户结款,请求参数:{}", JSON.toJSONString(dto));
Validator validator = new Validator(FormHandler.ofEntity(dto));
validator.set("saleId", "寄售单号").must().string()
.set("credential", "结款凭证").must().number()
.end();
if (!validator.isValid()) {
return Result.failed(ResultCode.PARAM_ERROR.getCode(), validator.getErrorInfo());
}
if (StringUtils.isEmpty(dto.getRemark())) {
return Result.failed("成交平台必填");
}
return consignSaleService.finishSettlement(dto);
} }
......
package com.wwdz.ch.admin.entity.vo; package com.wwdz.ch.admin.entity.vo;
import com.wwdz.ch.db.domain.User;
import com.wwdz.ch.db.domain.UserVo;
import com.xxdxxs.entity.Entity; import com.xxdxxs.entity.Entity;
import lombok.Data; import lombok.Data;
import java.util.List; import java.util.List;
...@@ -31,4 +33,9 @@ public class ConsignSaleDetailVo implements Entity { ...@@ -31,4 +33,9 @@ public class ConsignSaleDetailVo implements Entity {
* 寄售单信息 * 寄售单信息
*/ */
private List<ConsignSaleRecordVo> consignSaleRecordVoList; private List<ConsignSaleRecordVo> consignSaleRecordVoList;
/**
* 发布人信息
*/
private UserVo userVo;
} }
...@@ -12,13 +12,12 @@ import com.wwdz.ch.core.consts.ItemStateEnum; ...@@ -12,13 +12,12 @@ import com.wwdz.ch.core.consts.ItemStateEnum;
import com.wwdz.ch.core.entity.ConsignSaleVo; import com.wwdz.ch.core.entity.ConsignSaleVo;
import com.wwdz.ch.core.type.PageSearchResult; import com.wwdz.ch.core.type.PageSearchResult;
import com.wwdz.ch.core.type.Result; import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.core.util.CacheUtil;
import com.wwdz.ch.core.util.MediaUtil; import com.wwdz.ch.core.util.MediaUtil;
import com.wwdz.ch.db.dao.ConsignSaleDao; import com.wwdz.ch.db.dao.ConsignSaleDao;
import com.wwdz.ch.db.dao.ConsignSaleRecordDao; import com.wwdz.ch.db.dao.ConsignSaleRecordDao;
import com.wwdz.ch.db.dao.ItemDao; import com.wwdz.ch.db.dao.ItemDao;
import com.wwdz.ch.db.domain.ConsignSale; import com.wwdz.ch.db.domain.*;
import com.wwdz.ch.db.domain.ConsignSaleRecord;
import com.wwdz.ch.db.domain.Item;
import com.wwdz.ch.db.dto.request.CoinRequestDto; import com.wwdz.ch.db.dto.request.CoinRequestDto;
import com.wwdz.ch.db.dto.request.ConsignSaleRecordRequestDto; import com.wwdz.ch.db.dto.request.ConsignSaleRecordRequestDto;
import com.wwdz.ch.db.dto.request.ConsignSaleRequestDto; import com.wwdz.ch.db.dto.request.ConsignSaleRequestDto;
...@@ -28,6 +27,8 @@ import org.slf4j.Logger; ...@@ -28,6 +27,8 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
...@@ -56,6 +57,9 @@ public class ConsignSaleServiceImpl implements ConsignSaleService { ...@@ -56,6 +57,9 @@ public class ConsignSaleServiceImpl implements ConsignSaleService {
@Autowired @Autowired
ItemService itemService; ItemService itemService;
@Autowired
CacheUtil cacheUtil;
@Override @Override
public Result findList(ConsignSaleRequestDto dto) { public Result findList(ConsignSaleRequestDto dto) {
...@@ -122,6 +126,13 @@ public class ConsignSaleServiceImpl implements ConsignSaleService { ...@@ -122,6 +126,13 @@ public class ConsignSaleServiceImpl implements ConsignSaleService {
if (!itemResult.getSuccess()) { if (!itemResult.getSuccess()) {
return itemResult; return itemResult;
} }
long userId = consignSale.getUserId();
User user = cacheUtil.getAppletUsers(userId);
UserVo userVo = new UserVo();
userVo.setNickname(user.getNickname());
userVo.setPhone(userVo.getPhone());
consignSaleDetailVo.setUserVo(userVo);
consignSaleDetailVo.setConsignSaledId(dto.getSaleId()); consignSaleDetailVo.setConsignSaledId(dto.getSaleId());
consignSaleDetailVo.setSystemState(consignSale.getSystemState()); consignSaleDetailVo.setSystemState(consignSale.getSystemState());
consignSaleDetailVo.setSystemStateName(ConsignSaleEnum.SaleForSysStateEnum.getNameByCode(consignSale.getSystemState())); consignSaleDetailVo.setSystemStateName(ConsignSaleEnum.SaleForSysStateEnum.getNameByCode(consignSale.getSystemState()));
...@@ -152,12 +163,8 @@ public class ConsignSaleServiceImpl implements ConsignSaleService { ...@@ -152,12 +163,8 @@ public class ConsignSaleServiceImpl implements ConsignSaleService {
@Override @Override
public Result imgValuate(ConsignSaleRequestDto dto) { public Result imgValuate(ConsignSaleRequestDto dto) {
try { try {
ConsignSale consignSale = new ConsignSale(); //估价完状态不变等待用户确认之后变更状态
consignSale.setImgValuation(dto.getImgValuation()); //插入操作记录,图文估价
consignSale.setSaleId(dto.getSaleId());
consignSale.setSystemState(ConsignSaleEnum.SaleForSysStateEnum.IDENTIFY.getCode());
consignSaleDao.update(consignSale);
//插入操作记录
ConsignSaleRecord consignSaleRecord = new ConsignSaleRecord(); ConsignSaleRecord consignSaleRecord = new ConsignSaleRecord();
consignSaleRecord.setSaleId(dto.getSaleId()); consignSaleRecord.setSaleId(dto.getSaleId());
consignSaleRecord.setCreateTime(new Date()); consignSaleRecord.setCreateTime(new Date());
...@@ -165,6 +172,16 @@ public class ConsignSaleServiceImpl implements ConsignSaleService { ...@@ -165,6 +172,16 @@ public class ConsignSaleServiceImpl implements ConsignSaleService {
consignSaleRecord.setRemark(dto.getRemark()); consignSaleRecord.setRemark(dto.getRemark());
consignSaleRecord.setType(ConsignSaleEnum.OperateTypeEnum.VALUATE.getCode()); consignSaleRecord.setType(ConsignSaleEnum.OperateTypeEnum.VALUATE.getCode());
consignSaleRecordDao.insert(consignSaleRecord); consignSaleRecordDao.insert(consignSaleRecord);
//插入操作记录, 初步估价待用户确认
ConsignSaleRecord waitConsignSaleRecord = new ConsignSaleRecord();
waitConsignSaleRecord.setSaleId(dto.getSaleId());
waitConsignSaleRecord.setCreateTime(new Date());
waitConsignSaleRecord.setContent("等待用户确认估价,超时默认用户不满意估价,取消寄售");
waitConsignSaleRecord.setRemark(dto.getRemark());
waitConsignSaleRecord.setType(ConsignSaleEnum.OperateTypeEnum.WAIT_USER_CONFIRM_VALUATE.getCode());
consignSaleRecordDao.insert(waitConsignSaleRecord);
return Result.success(); return Result.success();
} catch (Exception e) { } catch (Exception e) {
logger.error("图文估价error:{}", e); logger.error("图文估价error:{}", e);
...@@ -172,29 +189,45 @@ public class ConsignSaleServiceImpl implements ConsignSaleService { ...@@ -172,29 +189,45 @@ public class ConsignSaleServiceImpl implements ConsignSaleService {
return Result.failed(); return Result.failed();
} }
@Override @Override
public Result identify(ConsignSaleRequestDto dto) { public Result confirmReceive(ConsignSaleRequestDto dto) {
try { try {
//平台确认签收,前端状态改为已寄出,后台为实物鉴定
ConsignSale consignSale = new ConsignSale(); ConsignSale consignSale = new ConsignSale();
consignSale.setValuation(dto.getValuation());
consignSale.setSaleId(dto.getSaleId()); consignSale.setSaleId(dto.getSaleId());
consignSale.setSystemState(ConsignSaleEnum.SaleForSysStateEnum.CONSIGN_SALEING.getCode()); consignSale.setCustomState(ConsignSaleEnum.SaleForUserStateEnum.CONSIGNED.getCode());
consignSale.setSystemState(ConsignSaleEnum.SaleForSysStateEnum.IDENTIFY.getCode());
consignSaleDao.update(consignSale); consignSaleDao.update(consignSale);
//插入操作记录 consignSaleRecordDao.insert(dto.getSaleId(), "", ConsignSaleEnum.OperateTypeEnum.CONFIRM_RECEIVE.getCode(), null);
return Result.success();
} catch (Exception e) {
logger.info("用户寄出商品 error : {}", e);
}
return Result.failed();
}
@Override
public Result identify(ConsignSaleRequestDto dto) {
try {
//鉴定完状态不变等待用户确认之后变更状态
//插入操作记录,平台鉴定并估价
ConsignSaleRecord consignSaleRecord = new ConsignSaleRecord(); ConsignSaleRecord consignSaleRecord = new ConsignSaleRecord();
consignSaleRecord.setSaleId(dto.getSaleId()); consignSaleRecord.setSaleId(dto.getSaleId());
consignSaleRecord.setCreateTime(new Date()); consignSaleRecord.setCreateTime(new Date());
consignSaleRecord.setContent("实物鉴定: " + dto.getValuation() + " 元"); consignSaleRecord.setContent("建议寄售价: " + dto.getValuation() + " 元");
consignSaleRecord.setRemark(dto.getRemark()); consignSaleRecord.setRemark(dto.getRemark());
consignSaleRecord.setType(ConsignSaleEnum.OperateTypeEnum.IDENTIFY.getCode()); consignSaleRecord.setType(ConsignSaleEnum.OperateTypeEnum.IDENTIFY.getCode());
consignSaleRecordDao.insert(consignSaleRecord); consignSaleRecordDao.insert(consignSaleRecord);
//平台寄售中 //插入操作记录, 建议寄售价待用户确认
ConsignSaleRecord saleRecord = new ConsignSaleRecord(); ConsignSaleRecord waitConsignSaleRecord = new ConsignSaleRecord();
saleRecord.setSaleId(dto.getSaleId()); waitConsignSaleRecord.setSaleId(dto.getSaleId());
saleRecord.setCreateTime(new Date()); waitConsignSaleRecord.setCreateTime(new Date());
saleRecord.setType(ConsignSaleEnum.OperateTypeEnum.SALEING.getCode()); waitConsignSaleRecord.setContent("等待用户确认价格,超时默认用户不满意价格,取消寄售");
consignSaleRecordDao.insert(saleRecord); waitConsignSaleRecord.setRemark(dto.getRemark());
waitConsignSaleRecord.setType(ConsignSaleEnum.OperateTypeEnum.WAIT_USER_CONFIRM_IDENTIFY.getCode());
consignSaleRecordDao.insert(waitConsignSaleRecord);
return Result.success(); return Result.success();
} catch (Exception e) { } catch (Exception e) {
logger.error("实物鉴定 error:{}", e); logger.error("实物鉴定 error:{}", e);
...@@ -202,8 +235,9 @@ public class ConsignSaleServiceImpl implements ConsignSaleService { ...@@ -202,8 +235,9 @@ public class ConsignSaleServiceImpl implements ConsignSaleService {
return Result.failed(); return Result.failed();
} }
@Transactional
@Override @Override
public Result finish(ConsignSaleRequestDto dto) { public Result finishSale(ConsignSaleRequestDto dto) {
try { try {
ConsignSale consignSaleInfo = consignSaleDao.findById(dto.getSaleId()); ConsignSale consignSaleInfo = consignSaleDao.findById(dto.getSaleId());
long itemId = consignSaleInfo.getItemId(); long itemId = consignSaleInfo.getItemId();
...@@ -211,27 +245,47 @@ public class ConsignSaleServiceImpl implements ConsignSaleService { ...@@ -211,27 +245,47 @@ public class ConsignSaleServiceImpl implements ConsignSaleService {
ConsignSale consignSale = new ConsignSale(); ConsignSale consignSale = new ConsignSale();
consignSale.setDealPrice(dto.getDealPrice()); consignSale.setDealPrice(dto.getDealPrice());
consignSale.setSaleId(dto.getSaleId()); consignSale.setSaleId(dto.getSaleId());
consignSale.setCustomState(ConsignSaleEnum.SaleForUserStateEnum.FINISH.getCode()); consignSale.setCustomState(ConsignSaleEnum.SaleForUserStateEnum.PRE_PAY.getCode());
consignSale.setSystemState(ConsignSaleEnum.SaleForSysStateEnum.FINISH.getCode()); consignSale.setSystemState(ConsignSaleEnum.SaleForSysStateEnum.PRE_PAY.getCode());
consignSaleDao.update(consignSale); consignSaleDao.update(consignSale);
//卖出后商品下架 //卖出后商品下架
itemDao.updateOnSale(itemId, ItemStateEnum.SALED.getCode()); itemDao.updateOnSale(itemId, ItemStateEnum.SALED.getCode());
//插入操作记录 //插入操作记录,货品售出待结款
ConsignSaleRecord consignSaleRecord = new ConsignSaleRecord(); ConsignSaleRecord consignSaleRecord = new ConsignSaleRecord();
consignSaleRecord.setSaleId(dto.getSaleId()); consignSaleRecord.setSaleId(dto.getSaleId());
consignSaleRecord.setCreateTime(new Date()); consignSaleRecord.setCreateTime(new Date());
consignSaleRecord.setContent("成交金额: " + dto.getDealPrice() + " 元"); consignSaleRecord.setContent("成交金额: " + dto.getDealPrice() + " 元");
consignSaleRecord.setRemark("成交平台: " + (dto.getRemark() == null ? "" : dto.getRemark())); consignSaleRecord.setRemark("成交平台: " + (dto.getRemark() == null ? "" : dto.getRemark()));
consignSaleRecord.setType(ConsignSaleEnum.OperateTypeEnum.FINISH.getCode()); consignSaleRecord.setType(ConsignSaleEnum.OperateTypeEnum.SALED.getCode());
consignSaleRecordDao.insert(consignSaleRecord); consignSaleRecordDao.insert(consignSaleRecord);
return Result.success(); return Result.success();
} catch (Exception e) { } catch (Exception e) {
logger.error("实物鉴定 error:{}", e); logger.error("货品确认售出 error:{}", e);
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
}
return Result.failed();
}
@Override
public Result finishSettlement(ConsignSaleRequestDto dto) {
try {
ConsignSale consignSale = new ConsignSale();
consignSale.setDealPrice(dto.getDealPrice());
consignSale.setSaleId(dto.getSaleId());
consignSale.setCustomState(ConsignSaleEnum.SaleForUserStateEnum.FINISH.getCode());
consignSale.setSystemState(ConsignSaleEnum.SaleForSysStateEnum.FINISH.getCode());
consignSaleDao.update(consignSale);
//插入操作记录,完成结款
consignSaleRecordDao.insert(dto.getSaleId(), "完成结款", ConsignSaleEnum.OperateTypeEnum.FINISH.getCode(), null);
return Result.success();
} catch (Exception e) {
logger.error("完成结款 error:{}", e);
} }
return Result.failed(); return Result.failed();
} }
@Transactional
@Override @Override
public Result cancel(ConsignSaleRecordRequestDto dto) { public Result cancel(ConsignSaleRecordRequestDto dto) {
try { try {
...@@ -256,8 +310,21 @@ public class ConsignSaleServiceImpl implements ConsignSaleService { ...@@ -256,8 +310,21 @@ public class ConsignSaleServiceImpl implements ConsignSaleService {
consignSaleRecordDao.insert(consignSaleRecord); consignSaleRecordDao.insert(consignSaleRecord);
return Result.success(); return Result.success();
} catch (Exception e) { } catch (Exception e) {
logger.error("取消寄售单error : {}", e); logger.error("平台取消寄售单 error : {}", e);
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
} }
return Result.failed(); return Result.failed();
} }
/**
* 用户确认超时默认取消寄售
* 检查处于图文鉴定和实物鉴定状态的订单,用户是否超出24小时确认的时间范围
*/
private void checkTimeOutForCancel(){
//查询图文估计待用户确认的订单
ConsignSaleRequestDto consignSaleRequestDto = new ConsignSaleRequestDto();
consignSaleRequestDto.setSystemState(ConsignSaleEnum.SaleForSysStateEnum.WAIT_IMG_VALUATE.getCode());
List<ConsignSale> list = consignSaleDao.findImgValuateConfirmOrdersByPage(consignSaleRequestDto);
}
} }
...@@ -28,6 +28,12 @@ public interface ConsignSaleService { ...@@ -28,6 +28,12 @@ public interface ConsignSaleService {
*/ */
Result imgValuate(ConsignSaleRequestDto dto); Result imgValuate(ConsignSaleRequestDto dto);
/**
* 用户寄售商品确认签收
* @param dto
* @return
*/
Result confirmReceive(ConsignSaleRequestDto dto);
/** /**
* 实物鉴定 * 实物鉴定
...@@ -37,11 +43,18 @@ public interface ConsignSaleService { ...@@ -37,11 +43,18 @@ public interface ConsignSaleService {
Result identify(ConsignSaleRequestDto dto); Result identify(ConsignSaleRequestDto dto);
/** /**
* 完成寄售 * 货品售出
* @param dto
* @return
*/
Result finishSale(ConsignSaleRequestDto dto);
/**
* 完成结款,上传凭证
* @param dto * @param dto
* @return * @return
*/ */
Result finish(ConsignSaleRequestDto dto); Result finishSettlement(ConsignSaleRequestDto dto);
/** /**
* 取消寄售 * 取消寄售
......
...@@ -132,4 +132,50 @@ public class ConsignSaleEnum { ...@@ -132,4 +132,50 @@ public class ConsignSaleEnum {
} }
public enum AppletNodeDescEnum {
CREATE_ORDER("下单成功", "", "0"),
VALUATE("平台依据图文估价", "等待平台进行初步估价,一般在2小时以内完成。", "10,15,20,23"),
SEND("送货至平台", "", "30"),
IDENTIFY("平台实物鉴定并定价", "平台签收后,会在1~3天完成货品的鉴定和估价", "40,50,53,60"),
CONSIGN_SALEING("平台寄售中", "", "70"),
PRE_PAY("货品售出,待结款", "货品售出后,平台会在20天内完成打款。如果实际的售出价低于预估价,则会在售出后由客服通知您具体情况。", "80"),
FINISH_PAT("平台完成结款", "", "90"),
CANCEL("取消寄售", "", "100,101"),
;
private String node;
private String des;
private String targetOperateType;
AppletNodeDescEnum(String node, String des, String targetOperateType) {
this.node = node;
this.des = des;
this.targetOperateType = targetOperateType;
}
public static ConsignSaleEnum.AppletNodeDescEnum getNameByCode(String targetOperateType) {
for (ConsignSaleEnum.AppletNodeDescEnum appletNodeDescEnum : ConsignSaleEnum.AppletNodeDescEnum.values()) {
if (appletNodeDescEnum.getTargetOperateType().contains(targetOperateType)) {
return appletNodeDescEnum;
}
}
return null;
}
public String getNode() {
return node;
}
public String getDes() {
return des;
}
public String getTargetOperateType() {
return targetOperateType;
}
}
} }
...@@ -21,6 +21,7 @@ dts: ...@@ -21,6 +21,7 @@ dts:
officialaccount-token: Uu6GHYOiP1xJ6GaBMyXfnITufAGJTe3Q officialaccount-token: Uu6GHYOiP1xJ6GaBMyXfnITufAGJTe3Q
officialaccount-key: noeN1amYRvzrVmE2GnC5VnsIfgPEmv6bhX54wJOARlM officialaccount-key: noeN1amYRvzrVmE2GnC5VnsIfgPEmv6bhX54wJOARlM
get-officialaccount-accesstoken-url: https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s get-officialaccount-accesstoken-url: https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s
officialaccount-templetId: WJkhzyY0_7AYqh19_ujK9yZhj4HohF8ETJvG5NYA9A8
#腾讯IM配置 #腾讯IM配置
im: im:
......
...@@ -20,6 +20,7 @@ dts: ...@@ -20,6 +20,7 @@ dts:
officialaccount-token: Uu6GHYOiP1xJ6GaBMyXfnITufAGJTe3Q officialaccount-token: Uu6GHYOiP1xJ6GaBMyXfnITufAGJTe3Q
officialaccount-key: noeN1amYRvzrVmE2GnC5VnsIfgPEmv6bhX54wJOARlM officialaccount-key: noeN1amYRvzrVmE2GnC5VnsIfgPEmv6bhX54wJOARlM
get-officialaccount-accesstoken-url: https://api.weixin.qq.com/cgi-bin/stable_token get-officialaccount-accesstoken-url: https://api.weixin.qq.com/cgi-bin/stable_token
officialaccount-templetId: WJkhzyY0_7AYqh19_ujK9yZhj4HohF8ETJvG5NYA9A8
#腾讯IM配置 #腾讯IM配置
......
...@@ -40,4 +40,21 @@ public interface ConsignSaleDao { ...@@ -40,4 +40,21 @@ public interface ConsignSaleDao {
* @return * @return
*/ */
List<ConsignSale> findByPage(ConsignSaleRequestDto dto); List<ConsignSale> findByPage(ConsignSaleRequestDto dto);
/**
* 查询图文鉴定状态待用户确认的寄售单
* @param dto
* @return
*/
List<ConsignSale> findImgValuateConfirmOrdersByPage(ConsignSaleRequestDto dto);
/**
* 查询实物鉴定状态待用户确认的寄售单
* @param dto
* @return
*/
List<ConsignSale> findValuateConfirmOrdersByPage(ConsignSaleRequestDto dto);
} }
...@@ -16,6 +16,11 @@ public interface ConsignSaleRecordDao { ...@@ -16,6 +16,11 @@ public interface ConsignSaleRecordDao {
int insert(String saleId, String content, int type, String remark);
/** /**
* 查询记录 * 查询记录
* @param saleId * @param saleId
......
...@@ -10,7 +10,7 @@ import lombok.Data; ...@@ -10,7 +10,7 @@ import lombok.Data;
/** /**
* @author shiyu * @author shiyu
* @date 2023/11/28 * @date 2023/12/18
*/ */
@Data @Data
public class ConsignSale implements Entity { public class ConsignSale implements Entity {
...@@ -66,6 +66,21 @@ public class ConsignSale implements Entity { ...@@ -66,6 +66,21 @@ public class ConsignSale implements Entity {
*/ */
private Integer systemState; private Integer systemState;
/**
* 快递公司编码
*/
private String logisticsCode;
/**
* 运单号
*/
private String waybill;
/**
* 结款凭证
*/
private String credential;
/** /**
* 创建时间 * 创建时间
*/ */
...@@ -95,6 +110,9 @@ public class ConsignSale implements Entity { ...@@ -95,6 +110,9 @@ public class ConsignSale implements Entity {
sb.append(", dealPrice=").append(dealPrice); sb.append(", dealPrice=").append(dealPrice);
sb.append(", customState=").append(customState); sb.append(", customState=").append(customState);
sb.append(", systemState=").append(systemState); sb.append(", systemState=").append(systemState);
sb.append(", logisticsCode=").append(logisticsCode);
sb.append(", waybill=").append(waybill);
sb.append(", credential=").append(credential);
sb.append(", createTime=").append(createTime); sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime); sb.append(", updateTime=").append(updateTime);
sb.append(", serialVersionUID=").append(serialVersionUID); sb.append(", serialVersionUID=").append(serialVersionUID);
...@@ -125,6 +143,9 @@ public class ConsignSale implements Entity { ...@@ -125,6 +143,9 @@ public class ConsignSale implements Entity {
&& (this.getDealPrice() == null ? other.getDealPrice() == null : this.getDealPrice().equals(other.getDealPrice())) && (this.getDealPrice() == null ? other.getDealPrice() == null : this.getDealPrice().equals(other.getDealPrice()))
&& (this.getCustomState() == null ? other.getCustomState() == null : this.getCustomState().equals(other.getCustomState())) && (this.getCustomState() == null ? other.getCustomState() == null : this.getCustomState().equals(other.getCustomState()))
&& (this.getSystemState() == null ? other.getSystemState() == null : this.getSystemState().equals(other.getSystemState())) && (this.getSystemState() == null ? other.getSystemState() == null : this.getSystemState().equals(other.getSystemState()))
&& (this.getLogisticsCode() == null ? other.getLogisticsCode() == null : this.getLogisticsCode().equals(other.getLogisticsCode()))
&& (this.getWaybill() == null ? other.getWaybill() == null : this.getWaybill().equals(other.getWaybill()))
&& (this.getCredential() == null ? other.getCredential() == null : this.getCredential().equals(other.getCredential()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())); && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
} }
...@@ -144,6 +165,9 @@ public class ConsignSale implements Entity { ...@@ -144,6 +165,9 @@ public class ConsignSale implements Entity {
result = prime * result + ((getDealPrice() == null) ? 0 : getDealPrice().hashCode()); result = prime * result + ((getDealPrice() == null) ? 0 : getDealPrice().hashCode());
result = prime * result + ((getCustomState() == null) ? 0 : getCustomState().hashCode()); result = prime * result + ((getCustomState() == null) ? 0 : getCustomState().hashCode());
result = prime * result + ((getSystemState() == null) ? 0 : getSystemState().hashCode()); result = prime * result + ((getSystemState() == null) ? 0 : getSystemState().hashCode());
result = prime * result + ((getLogisticsCode() == null) ? 0 : getLogisticsCode().hashCode());
result = prime * result + ((getWaybill() == null) ? 0 : getWaybill().hashCode());
result = prime * result + ((getCredential() == null) ? 0 : getCredential().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
return result; return result;
...@@ -168,6 +192,9 @@ public class ConsignSale implements Entity { ...@@ -168,6 +192,9 @@ public class ConsignSale implements Entity {
dealPrice("deal_price", "dealPrice", "INTEGER", false), dealPrice("deal_price", "dealPrice", "INTEGER", false),
customState("custom_state", "customState", "INTEGER", false), customState("custom_state", "customState", "INTEGER", false),
systemState("system_state", "systemState", "INTEGER", false), systemState("system_state", "systemState", "INTEGER", false),
logisticsCode("logistics_code", "logisticsCode", "VARCHAR", false),
waybill("waybill", "waybill", "VARCHAR", false),
credential("credential", "credential", "VARCHAR", false),
createTime("create_time", "createTime", "TIMESTAMP", false), createTime("create_time", "createTime", "TIMESTAMP", false),
updateTime("update_time", "updateTime", "TIMESTAMP", false); updateTime("update_time", "updateTime", "TIMESTAMP", false);
......
...@@ -1620,6 +1620,432 @@ public class ConsignSaleExample { ...@@ -1620,6 +1620,432 @@ public class ConsignSaleExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andLogisticsCodeIsNull() {
addCriterion("logistics_code is null");
return (Criteria) this;
}
public Criteria andLogisticsCodeIsNotNull() {
addCriterion("logistics_code is not null");
return (Criteria) this;
}
public Criteria andLogisticsCodeEqualTo(String value) {
addCriterion("logistics_code =", value, "logisticsCode");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andLogisticsCodeEqualToColumn(ConsignSale.Column column) {
addCriterion(new StringBuilder("logistics_code = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andLogisticsCodeNotEqualTo(String value) {
addCriterion("logistics_code <>", value, "logisticsCode");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andLogisticsCodeNotEqualToColumn(ConsignSale.Column column) {
addCriterion(new StringBuilder("logistics_code <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andLogisticsCodeGreaterThan(String value) {
addCriterion("logistics_code >", value, "logisticsCode");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andLogisticsCodeGreaterThanColumn(ConsignSale.Column column) {
addCriterion(new StringBuilder("logistics_code > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andLogisticsCodeGreaterThanOrEqualTo(String value) {
addCriterion("logistics_code >=", value, "logisticsCode");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andLogisticsCodeGreaterThanOrEqualToColumn(ConsignSale.Column column) {
addCriterion(new StringBuilder("logistics_code >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andLogisticsCodeLessThan(String value) {
addCriterion("logistics_code <", value, "logisticsCode");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andLogisticsCodeLessThanColumn(ConsignSale.Column column) {
addCriterion(new StringBuilder("logistics_code < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andLogisticsCodeLessThanOrEqualTo(String value) {
addCriterion("logistics_code <=", value, "logisticsCode");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andLogisticsCodeLessThanOrEqualToColumn(ConsignSale.Column column) {
addCriterion(new StringBuilder("logistics_code <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andLogisticsCodeLike(String value) {
addCriterion("logistics_code like", value, "logisticsCode");
return (Criteria) this;
}
public Criteria andLogisticsCodeNotLike(String value) {
addCriterion("logistics_code not like", value, "logisticsCode");
return (Criteria) this;
}
public Criteria andLogisticsCodeIn(List<String> values) {
addCriterion("logistics_code in", values, "logisticsCode");
return (Criteria) this;
}
public Criteria andLogisticsCodeNotIn(List<String> values) {
addCriterion("logistics_code not in", values, "logisticsCode");
return (Criteria) this;
}
public Criteria andLogisticsCodeBetween(String value1, String value2) {
addCriterion("logistics_code between", value1, value2, "logisticsCode");
return (Criteria) this;
}
public Criteria andLogisticsCodeNotBetween(String value1, String value2) {
addCriterion("logistics_code not between", value1, value2, "logisticsCode");
return (Criteria) this;
}
public Criteria andWaybillIsNull() {
addCriterion("waybill is null");
return (Criteria) this;
}
public Criteria andWaybillIsNotNull() {
addCriterion("waybill is not null");
return (Criteria) this;
}
public Criteria andWaybillEqualTo(String value) {
addCriterion("waybill =", value, "waybill");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andWaybillEqualToColumn(ConsignSale.Column column) {
addCriterion(new StringBuilder("waybill = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andWaybillNotEqualTo(String value) {
addCriterion("waybill <>", value, "waybill");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andWaybillNotEqualToColumn(ConsignSale.Column column) {
addCriterion(new StringBuilder("waybill <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andWaybillGreaterThan(String value) {
addCriterion("waybill >", value, "waybill");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andWaybillGreaterThanColumn(ConsignSale.Column column) {
addCriterion(new StringBuilder("waybill > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andWaybillGreaterThanOrEqualTo(String value) {
addCriterion("waybill >=", value, "waybill");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andWaybillGreaterThanOrEqualToColumn(ConsignSale.Column column) {
addCriterion(new StringBuilder("waybill >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andWaybillLessThan(String value) {
addCriterion("waybill <", value, "waybill");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andWaybillLessThanColumn(ConsignSale.Column column) {
addCriterion(new StringBuilder("waybill < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andWaybillLessThanOrEqualTo(String value) {
addCriterion("waybill <=", value, "waybill");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andWaybillLessThanOrEqualToColumn(ConsignSale.Column column) {
addCriterion(new StringBuilder("waybill <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andWaybillLike(String value) {
addCriterion("waybill like", value, "waybill");
return (Criteria) this;
}
public Criteria andWaybillNotLike(String value) {
addCriterion("waybill not like", value, "waybill");
return (Criteria) this;
}
public Criteria andWaybillIn(List<String> values) {
addCriterion("waybill in", values, "waybill");
return (Criteria) this;
}
public Criteria andWaybillNotIn(List<String> values) {
addCriterion("waybill not in", values, "waybill");
return (Criteria) this;
}
public Criteria andWaybillBetween(String value1, String value2) {
addCriterion("waybill between", value1, value2, "waybill");
return (Criteria) this;
}
public Criteria andWaybillNotBetween(String value1, String value2) {
addCriterion("waybill not between", value1, value2, "waybill");
return (Criteria) this;
}
public Criteria andCredentialIsNull() {
addCriterion("credential is null");
return (Criteria) this;
}
public Criteria andCredentialIsNotNull() {
addCriterion("credential is not null");
return (Criteria) this;
}
public Criteria andCredentialEqualTo(String value) {
addCriterion("credential =", value, "credential");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCredentialEqualToColumn(ConsignSale.Column column) {
addCriterion(new StringBuilder("credential = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCredentialNotEqualTo(String value) {
addCriterion("credential <>", value, "credential");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCredentialNotEqualToColumn(ConsignSale.Column column) {
addCriterion(new StringBuilder("credential <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCredentialGreaterThan(String value) {
addCriterion("credential >", value, "credential");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCredentialGreaterThanColumn(ConsignSale.Column column) {
addCriterion(new StringBuilder("credential > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCredentialGreaterThanOrEqualTo(String value) {
addCriterion("credential >=", value, "credential");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCredentialGreaterThanOrEqualToColumn(ConsignSale.Column column) {
addCriterion(new StringBuilder("credential >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCredentialLessThan(String value) {
addCriterion("credential <", value, "credential");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCredentialLessThanColumn(ConsignSale.Column column) {
addCriterion(new StringBuilder("credential < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCredentialLessThanOrEqualTo(String value) {
addCriterion("credential <=", value, "credential");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCredentialLessThanOrEqualToColumn(ConsignSale.Column column) {
addCriterion(new StringBuilder("credential <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCredentialLike(String value) {
addCriterion("credential like", value, "credential");
return (Criteria) this;
}
public Criteria andCredentialNotLike(String value) {
addCriterion("credential not like", value, "credential");
return (Criteria) this;
}
public Criteria andCredentialIn(List<String> values) {
addCriterion("credential in", values, "credential");
return (Criteria) this;
}
public Criteria andCredentialNotIn(List<String> values) {
addCriterion("credential not in", values, "credential");
return (Criteria) this;
}
public Criteria andCredentialBetween(String value1, String value2) {
addCriterion("credential between", value1, value2, "credential");
return (Criteria) this;
}
public Criteria andCredentialNotBetween(String value1, String value2) {
addCriterion("credential not between", value1, value2, "credential");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() { public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null"); addCriterion("create_time is null");
return (Criteria) this; return (Criteria) this;
......
package com.wwdz.ch.db.domain; package com.wwdz.ch.db.domain;
public class UserVo { import com.xxdxxs.entity.Entity;
import lombok.Data;
@Data
public class UserVo implements Entity {
private String nickname; private String nickname;
private String avatar; private String avatar;
private String phone;
public String getNickname() {
return nickname;
}
public void setNickname(String nickname) {
this.nickname = nickname;
}
public String getAvatar() {
return avatar;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
} }
...@@ -73,6 +73,11 @@ public class ConsignSaleRequestDto extends BaseRequestDto implements Entity { ...@@ -73,6 +73,11 @@ public class ConsignSaleRequestDto extends BaseRequestDto implements Entity {
*/ */
private Integer systemState; private Integer systemState;
/**
* 系统状态
*/
private List<Integer> systemStateList;
/** /**
* 创建时间 * 创建时间
*/ */
...@@ -85,4 +90,23 @@ public class ConsignSaleRequestDto extends BaseRequestDto implements Entity { ...@@ -85,4 +90,23 @@ public class ConsignSaleRequestDto extends BaseRequestDto implements Entity {
private String remark; private String remark;
/**
* 快递公司编码
*/
private String logisticsCode;
/**
* 运单号
*/
private String waybill;
/**
* 用户是否同意寄售
*/
private Boolean agree;
/**
* 结款凭证
*/
private String credential;
} }
...@@ -68,5 +68,27 @@ public class ConsignSaleDaoImpl implements ConsignSaleDao { ...@@ -68,5 +68,27 @@ public class ConsignSaleDaoImpl implements ConsignSaleDao {
} }
@Override
public List<ConsignSale> findImgValuateConfirmOrdersByPage(ConsignSaleRequestDto dto) {
ConsignSaleExample example = new ConsignSaleExample();
ConsignSaleExample.Criteria criteria = example.createCriteria();
JdbcHelper.ifPresent(dto.getUserId(), criteria::andUserIdEqualTo);
criteria.andSystemStateEqualTo(dto.getSystemState());
criteria.andImgValuationIsNotNull();
example.orderBy(" sale_time asc");
PageHelper.startPage(dto.getPage(), dto.getLimit());
return consignSaleMapper.selectByExample(example);
}
@Override
public List<ConsignSale> findValuateConfirmOrdersByPage(ConsignSaleRequestDto dto) {
ConsignSaleExample example = new ConsignSaleExample();
ConsignSaleExample.Criteria criteria = example.createCriteria();
JdbcHelper.ifPresent(dto.getUserId(), criteria::andUserIdEqualTo);
criteria.andSystemStateEqualTo(dto.getSystemState());
criteria.andImgValuationIsNotNull();
example.orderBy(" sale_time asc");
PageHelper.startPage(dto.getPage(), dto.getLimit());
return consignSaleMapper.selectByExample(example);
}
} }
...@@ -14,6 +14,7 @@ import com.xxdxxs.db.component.JdbcHelper; ...@@ -14,6 +14,7 @@ import com.xxdxxs.db.component.JdbcHelper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.Date;
import java.util.List; import java.util.List;
@Repository @Repository
...@@ -28,6 +29,16 @@ public class ConsignSaleRecordDaoImpl implements ConsignSaleRecordDao { ...@@ -28,6 +29,16 @@ public class ConsignSaleRecordDaoImpl implements ConsignSaleRecordDao {
} }
@Override
public int insert(String saleId, String content, int type, String remark) {
ConsignSaleRecord cancelConsignSaleRecord = new ConsignSaleRecord();
cancelConsignSaleRecord.setSaleId(saleId);
cancelConsignSaleRecord.setCreateTime(new Date());
cancelConsignSaleRecord.setContent(content);
cancelConsignSaleRecord.setType(type);
return consignSaleRecordMapper.insert(cancelConsignSaleRecord);
}
@Override @Override
public List<ConsignSaleRecord> find(String saleId) { public List<ConsignSaleRecord> find(String saleId) {
ConsignSaleRecordExample example = new ConsignSaleRecordExample(); ConsignSaleRecordExample example = new ConsignSaleRecordExample();
......
...@@ -13,6 +13,9 @@ ...@@ -13,6 +13,9 @@
<result column="deal_price" jdbcType="INTEGER" property="dealPrice" /> <result column="deal_price" jdbcType="INTEGER" property="dealPrice" />
<result column="custom_state" jdbcType="INTEGER" property="customState" /> <result column="custom_state" jdbcType="INTEGER" property="customState" />
<result column="system_state" jdbcType="INTEGER" property="systemState" /> <result column="system_state" jdbcType="INTEGER" property="systemState" />
<result column="logistics_code" jdbcType="VARCHAR" property="logisticsCode" />
<result column="waybill" jdbcType="VARCHAR" property="waybill" />
<result column="credential" jdbcType="VARCHAR" property="credential" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap> </resultMap>
...@@ -76,7 +79,7 @@ ...@@ -76,7 +79,7 @@
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, sale_id, item_id, user_id, sale_time, user_price, img_valuation, valuation, deal_price, id, sale_id, item_id, user_id, sale_time, user_price, img_valuation, valuation, deal_price,
custom_state, system_state, create_time, update_time custom_state, system_state, logistics_code, waybill, credential, create_time, update_time
</sql> </sql>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.ConsignSaleExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.wwdz.ch.db.domain.ConsignSaleExample" resultMap="BaseResultMap">
select select
...@@ -105,14 +108,15 @@ ...@@ -105,14 +108,15 @@
distinct distinct
</if> </if>
<choose> <choose>
<when test="selective != null and selective.length > 0"> <when test="selective != null and selective.length &gt; 0">
<foreach collection="selective" item="column" separator=","> <foreach collection="selective" item="column" separator=",">
${column.escapedColumnName} ${column.escapedColumnName}
</foreach> </foreach>
</when> </when>
<otherwise> <otherwise>
id, sale_id, item_id, user_id, sale_time, user_price, img_valuation, valuation, deal_price, id, sale_id, item_id, user_id, sale_time, user_price, img_valuation, valuation, deal_price,
custom_state, system_state, create_time, update_time custom_state, system_state, logistics_code, waybill, credential, create_time, update_time
</otherwise> </otherwise>
</choose> </choose>
from consign_sale from consign_sale
...@@ -137,14 +141,15 @@ ...@@ -137,14 +141,15 @@
--> -->
select select
<choose> <choose>
<when test="selective != null and selective.length > 0"> <when test="selective != null and selective.length &gt; 0">
<foreach collection="selective" item="column" separator=","> <foreach collection="selective" item="column" separator=",">
${column.escapedColumnName} ${column.escapedColumnName}
</foreach> </foreach>
</when> </when>
<otherwise> <otherwise>
id, sale_id, item_id, user_id, sale_time, user_price, img_valuation, valuation, deal_price, id, sale_id, item_id, user_id, sale_time, user_price, img_valuation, valuation, deal_price,
custom_state, system_state, create_time, update_time custom_state, system_state, logistics_code, waybill, credential, create_time, update_time
</otherwise> </otherwise>
</choose> </choose>
from consign_sale from consign_sale
...@@ -167,12 +172,14 @@ ...@@ -167,12 +172,14 @@
insert into consign_sale (sale_id, item_id, user_id, insert into consign_sale (sale_id, item_id, user_id,
sale_time, user_price, img_valuation, sale_time, user_price, img_valuation,
valuation, deal_price, custom_state, valuation, deal_price, custom_state,
system_state, create_time, update_time system_state, logistics_code, waybill,
credential, create_time, update_time
) )
values (#{saleId,jdbcType=VARCHAR}, #{itemId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, values (#{saleId,jdbcType=VARCHAR}, #{itemId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT},
#{saleTime,jdbcType=TIMESTAMP}, #{userPrice,jdbcType=INTEGER}, #{imgValuation,jdbcType=VARCHAR}, #{saleTime,jdbcType=TIMESTAMP}, #{userPrice,jdbcType=INTEGER}, #{imgValuation,jdbcType=VARCHAR},
#{valuation,jdbcType=INTEGER}, #{dealPrice,jdbcType=INTEGER}, #{customState,jdbcType=INTEGER}, #{valuation,jdbcType=INTEGER}, #{dealPrice,jdbcType=INTEGER}, #{customState,jdbcType=INTEGER},
#{systemState,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP} #{systemState,jdbcType=INTEGER}, #{logisticsCode,jdbcType=VARCHAR}, #{waybill,jdbcType=VARCHAR},
#{credential,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.ConsignSale"> <insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.ConsignSale">
...@@ -211,6 +218,15 @@ ...@@ -211,6 +218,15 @@
<if test="systemState != null"> <if test="systemState != null">
system_state, system_state,
</if> </if>
<if test="logisticsCode != null">
logistics_code,
</if>
<if test="waybill != null">
waybill,
</if>
<if test="credential != null">
credential,
</if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
</if> </if>
...@@ -249,6 +265,15 @@ ...@@ -249,6 +265,15 @@
<if test="systemState != null"> <if test="systemState != null">
#{systemState,jdbcType=INTEGER}, #{systemState,jdbcType=INTEGER},
</if> </if>
<if test="logisticsCode != null">
#{logisticsCode,jdbcType=VARCHAR},
</if>
<if test="waybill != null">
#{waybill,jdbcType=VARCHAR},
</if>
<if test="credential != null">
#{credential,jdbcType=VARCHAR},
</if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
...@@ -299,6 +324,15 @@ ...@@ -299,6 +324,15 @@
<if test="record.systemState != null"> <if test="record.systemState != null">
system_state = #{record.systemState,jdbcType=INTEGER}, system_state = #{record.systemState,jdbcType=INTEGER},
</if> </if>
<if test="record.logisticsCode != null">
logistics_code = #{record.logisticsCode,jdbcType=VARCHAR},
</if>
<if test="record.waybill != null">
waybill = #{record.waybill,jdbcType=VARCHAR},
</if>
<if test="record.credential != null">
credential = #{record.credential,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null"> <if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP}, create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if> </if>
...@@ -323,6 +357,9 @@ ...@@ -323,6 +357,9 @@
deal_price = #{record.dealPrice,jdbcType=INTEGER}, deal_price = #{record.dealPrice,jdbcType=INTEGER},
custom_state = #{record.customState,jdbcType=INTEGER}, custom_state = #{record.customState,jdbcType=INTEGER},
system_state = #{record.systemState,jdbcType=INTEGER}, system_state = #{record.systemState,jdbcType=INTEGER},
logistics_code = #{record.logisticsCode,jdbcType=VARCHAR},
waybill = #{record.waybill,jdbcType=VARCHAR},
credential = #{record.credential,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP}, create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP} update_time = #{record.updateTime,jdbcType=TIMESTAMP}
<if test="_parameter != null"> <if test="_parameter != null">
...@@ -362,6 +399,15 @@ ...@@ -362,6 +399,15 @@
<if test="systemState != null"> <if test="systemState != null">
system_state = #{systemState,jdbcType=INTEGER}, system_state = #{systemState,jdbcType=INTEGER},
</if> </if>
<if test="logisticsCode != null">
logistics_code = #{logisticsCode,jdbcType=VARCHAR},
</if>
<if test="waybill != null">
waybill = #{waybill,jdbcType=VARCHAR},
</if>
<if test="credential != null">
credential = #{credential,jdbcType=VARCHAR},
</if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
...@@ -383,6 +429,9 @@ ...@@ -383,6 +429,9 @@
deal_price = #{dealPrice,jdbcType=INTEGER}, deal_price = #{dealPrice,jdbcType=INTEGER},
custom_state = #{customState,jdbcType=INTEGER}, custom_state = #{customState,jdbcType=INTEGER},
system_state = #{systemState,jdbcType=INTEGER}, system_state = #{systemState,jdbcType=INTEGER},
logistics_code = #{logisticsCode,jdbcType=VARCHAR},
waybill = #{waybill,jdbcType=VARCHAR},
credential = #{credential,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
...@@ -414,14 +463,15 @@ ...@@ -414,14 +463,15 @@
select select
'true' as QUERYID, 'true' as QUERYID,
<choose> <choose>
<when test="selective != null and selective.length > 0"> <when test="selective != null and selective.length &gt; 0">
<foreach collection="selective" item="column" separator=","> <foreach collection="selective" item="column" separator=",">
${column.escapedColumnName} ${column.escapedColumnName}
</foreach> </foreach>
</when> </when>
<otherwise> <otherwise>
id, sale_id, item_id, user_id, sale_time, user_price, img_valuation, valuation, deal_price, id, sale_id, item_id, user_id, sale_time, user_price, img_valuation, valuation, deal_price,
custom_state, system_state, create_time, update_time custom_state, system_state, logistics_code, waybill, credential, create_time, update_time
</otherwise> </otherwise>
</choose> </choose>
from consign_sale from consign_sale
...@@ -433,4 +483,5 @@ ...@@ -433,4 +483,5 @@
</if> </if>
limit 1 limit 1
</select> </select>
</mapper> </mapper>
\ No newline at end of file
package com.wwdz.ch.wx.entity.vo;
import com.xxdxxs.entity.Entity;
import lombok.Data;
import java.util.Date;
/**
* 小程序展示寄售单节点时间线
*/
@Data
public class AppletStateNodeVo implements Entity {
private String node;
private String desc;
private Date time;
private Boolean passed;
}
package com.wwdz.ch.wx.entity.vo;
import com.xxdxxs.entity.Entity;
import lombok.Data;
import java.util.Date;
import java.util.List;
@Data
public class ConsignSaleAppletVo implements Entity {
/**
* 商品图片
*/
private String image;
/**
* 商品id
*/
private String itemId;
/**
* 商品名称
*/
private String name;
/**
* 寄售单号
*/
private String saleId;
/**
* 下单时间
*/
private Date saleTime;
/**
* 寄出时间
*/
private Date sendTime;
/**
* 送货方式:自行寄出
*/
private String sendType;
/**
* 物流公司
*/
private String logisticsCode;
/**
* 物流公司名称
*/
private String logisticsName;
/**
* 快递单号
*/
private String waybill;
/**
* 完成时间
*/
private Date finishTime;
/**
* 寄售单状态时间线
*/
private List<AppletStateNodeVo> nodeVoList;
}
...@@ -20,6 +20,7 @@ import com.wwdz.ch.db.domain.Item; ...@@ -20,6 +20,7 @@ import com.wwdz.ch.db.domain.Item;
import com.wwdz.ch.db.domain.User; import com.wwdz.ch.db.domain.User;
import com.wwdz.ch.db.dto.request.CoinRequestDto; import com.wwdz.ch.db.dto.request.CoinRequestDto;
import com.wwdz.ch.db.dto.request.ConsignSaleRequestDto; import com.wwdz.ch.db.dto.request.ConsignSaleRequestDto;
import com.wwdz.ch.wx.entity.vo.AppletStateNodeVo;
import com.wwdz.ch.wx.service.ConsignSaleService; import com.wwdz.ch.wx.service.ConsignSaleService;
import com.wwdz.user.api.service.user.UserReadService; import com.wwdz.user.api.service.user.UserReadService;
import com.xxdxxs.utils.EntityMapper; import com.xxdxxs.utils.EntityMapper;
...@@ -78,8 +79,8 @@ public class ConsignSaleServiceImpl implements ConsignSaleService { ...@@ -78,8 +79,8 @@ public class ConsignSaleServiceImpl implements ConsignSaleService {
consignSale.setCreateTime(now); consignSale.setCreateTime(now);
consignSale.setUpdateTime(now); consignSale.setUpdateTime(now);
//目前创建了寄售单客户显示的状态就是寄售中 //创建了寄售单客户显示的状态是待寄出
consignSale.setCustomState(ConsignSaleEnum.SaleForUserStateEnum.CONSIGN_SALEING.getCode()); consignSale.setCustomState(ConsignSaleEnum.SaleForUserStateEnum.PRE_CONSIGN.getCode());
consignSale.setSystemState(ConsignSaleEnum.SaleForSysStateEnum.WAIT_IMG_VALUATE.getCode()); consignSale.setSystemState(ConsignSaleEnum.SaleForSysStateEnum.WAIT_IMG_VALUATE.getCode());
String saleId = IdUtils.getOrderNumber(CONSIGN_SALE_ORDER_PREFIX); String saleId = IdUtils.getOrderNumber(CONSIGN_SALE_ORDER_PREFIX);
consignSale.setSaleId(saleId); consignSale.setSaleId(saleId);
...@@ -177,9 +178,115 @@ public class ConsignSaleServiceImpl implements ConsignSaleService { ...@@ -177,9 +178,115 @@ public class ConsignSaleServiceImpl implements ConsignSaleService {
@Override @Override
public Result findDetail(ConsignSaleRequestDto dto) { public Result findDetail(ConsignSaleRequestDto dto) {
String saleId = dto.getSaleId();
List<ConsignSaleRecord> consignSaleRecordList = consignSaleRecordDao.find(saleId);
consignSaleRecordList.forEach(consignSaleRecord -> {
AppletStateNodeVo appletStateNodeVo = new AppletStateNodeVo();
});
return null; return null;
} }
@Override
public Result confirmForImgValuate(ConsignSaleRequestDto dto) {
try {
//满意初步估价
if (dto.getAgree()) {
ConsignSale consignSale = new ConsignSale();
consignSale.setSaleId(dto.getSaleId());
consignSale.setCustomState(ConsignSaleEnum.SaleForUserStateEnum.PRE_CONSIGN.getCode());
consignSale.setSystemState(ConsignSaleEnum.SaleForSysStateEnum.WAIT_CONSIGN.getCode());
consignSaleDao.update(consignSale);
//插入操作记录,用户满意初步估价
consignSaleRecordDao.insert(dto.getSaleId(), "满意,继续寄售", ConsignSaleEnum.OperateTypeEnum.USER_CONFIRM_VALUATE.getCode(), null);
//插入操作记录,待用户寄出
consignSaleRecordDao.insert(dto.getSaleId(), "", ConsignSaleEnum.OperateTypeEnum.WAIT_USER_SEND.getCode(), null);
} else {
//不满意初步估价,取消寄售
ConsignSale consignSale = new ConsignSale();
consignSale.setSaleId(dto.getSaleId());
consignSale.setCustomState(ConsignSaleEnum.SaleForUserStateEnum.CANCEL.getCode());
consignSale.setSystemState(ConsignSaleEnum.SaleForSysStateEnum.CANCEL.getCode());
consignSaleDao.update(consignSale);
//商品下架
itemDao.updateOnSale(dto.getItemId(), ItemStateEnum.SHELVE.getCode());
//插入操作记录,用户不满意初步估价
consignSaleRecordDao.insert(dto.getSaleId(), "不满意,取消寄售", ConsignSaleEnum.OperateTypeEnum.USER_CONFIRM_VALUATE.getCode(), null);
//插入操作记录,用户主动取消
consignSaleRecordDao.insert(dto.getSaleId(), "用户主动取消", ConsignSaleEnum.OperateTypeEnum.CUSTOM_CANCEL.getCode(), null);
}
return Result.success();
} catch (Exception e) {
logger.info("图文鉴定后用户确认 error : {}", e);
}
return Result.failed();
}
@Override
public Result userSend(ConsignSaleRequestDto dto) {
try {
//用户寄出商品,状态改为已寄出,后台为待收货
ConsignSale consignSale = new ConsignSale();
consignSale.setSaleId(dto.getSaleId());
consignSale.setCustomState(ConsignSaleEnum.SaleForUserStateEnum.CONSIGNED.getCode());
consignSale.setSystemState(ConsignSaleEnum.SaleForSysStateEnum.WAIT_TAKE.getCode());
consignSaleDao.update(consignSale);
//插入操作记录,平台待收货
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("物流公司:");
stringBuffer.append(dto.getLogisticsCode() + "; ");
stringBuffer.append("快递单号:");
stringBuffer.append(dto.getWaybill());
consignSaleRecordDao.insert(dto.getSaleId(), stringBuffer.toString(), ConsignSaleEnum.OperateTypeEnum.USER_SEND.getCode(), null);
return Result.success();
} catch (Exception e) {
logger.info("用户寄出商品 error : {}", e);
}
return Result.failed();
}
@Override
public Result confirmForIdentify(ConsignSaleRequestDto dto) {
try {
//满意建议零售价估价
if (dto.getAgree()) {
ConsignSale consignSale = new ConsignSale();
consignSale.setSaleId(dto.getSaleId());
consignSale.setCustomState(ConsignSaleEnum.SaleForUserStateEnum.CONSIGN_SALEING.getCode());
consignSale.setSystemState(ConsignSaleEnum.SaleForSysStateEnum.CONSIGN_SALEING.getCode());
consignSaleDao.update(consignSale);
//插入操作记录,用户满意建议零售价
consignSaleRecordDao.insert(dto.getSaleId(), "满意,继续寄售", ConsignSaleEnum.OperateTypeEnum.USER_CONFIRM_IDENTIFY.getCode(), null);
//插入操作记录,待用户寄出
consignSaleRecordDao.insert(dto.getSaleId(), "", ConsignSaleEnum.OperateTypeEnum.SALEING.getCode(), null);
} else {
//不满意建议零售价,取消寄售
ConsignSale consignSale = new ConsignSale();
consignSale.setSaleId(dto.getSaleId());
consignSale.setCustomState(ConsignSaleEnum.SaleForUserStateEnum.CANCEL.getCode());
consignSale.setSystemState(ConsignSaleEnum.SaleForSysStateEnum.CANCEL.getCode());
consignSaleDao.update(consignSale);
//商品下架
itemDao.updateOnSale(dto.getItemId(), ItemStateEnum.SHELVE.getCode());
//插入操作记录,用户不满意建议零售价
consignSaleRecordDao.insert(dto.getSaleId(), "不满意,取消寄售", ConsignSaleEnum.OperateTypeEnum.USER_CONFIRM_IDENTIFY.getCode(), null);
//插入操作记录,用户主动取消
consignSaleRecordDao.insert(dto.getSaleId(), "用户主动取消", ConsignSaleEnum.OperateTypeEnum.CUSTOM_CANCEL.getCode(), null);
}
return Result.success();
} catch (Exception e) {
logger.info("图文鉴定后用户确认 error : {}", e);
}
return Result.failed();
}
@Override @Override
public Result customCancel(ConsignSaleRequestDto dto) { public Result customCancel(ConsignSaleRequestDto dto) {
try { try {
......
...@@ -37,6 +37,28 @@ public interface ConsignSaleService { ...@@ -37,6 +37,28 @@ public interface ConsignSaleService {
Result findDetail(ConsignSaleRequestDto dto); Result findDetail(ConsignSaleRequestDto dto);
/**
* 图文鉴定后用户确认
* @param dto
* @return
*/
Result confirmForImgValuate(ConsignSaleRequestDto dto);
/**
* 用户寄出商品
* @param dto
* @return
*/
Result userSend(ConsignSaleRequestDto dto);
/**
* 实物鉴定后用户确认
* @param dto
* @return
*/
Result confirmForIdentify(ConsignSaleRequestDto dto);
/** /**
* 客户取消寄售 * 客户取消寄售
* @param dto * @param dto
......
...@@ -3,27 +3,23 @@ package com.wwdz.ch.wx.web; ...@@ -3,27 +3,23 @@ package com.wwdz.ch.wx.web;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.wwdz.ch.core.consts.ResultCode; import com.wwdz.ch.core.consts.ResultCode;
import com.wwdz.ch.core.type.Result; import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.db.domain.ConsignSale;
import com.wwdz.ch.db.dto.request.AiAssistantRequestDto;
import com.wwdz.ch.db.dto.request.ConsignSaleRequestDto; import com.wwdz.ch.db.dto.request.ConsignSaleRequestDto;
import com.wwdz.ch.wx.entity.request.ItemRequestDto; import com.wwdz.ch.wx.entity.request.ItemRequestDto;
import com.wwdz.ch.wx.service.ConsignSaleService; import com.wwdz.ch.wx.service.ConsignSaleService;
import com.wwdz.ch.wx.service.ItemService; import com.wwdz.ch.wx.service.ItemService;
import com.xxdxxs.service.FormHandler; import com.xxdxxs.service.FormHandler;
import com.xxdxxs.utils.StringUtils;
import com.xxdxxs.validation.Validator; import com.xxdxxs.validation.Validator;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.Objects;
/** /**
* 寄售单 * 寄售单
...@@ -56,7 +52,7 @@ public class ConsignSaleController { ...@@ -56,7 +52,7 @@ public class ConsignSaleController {
return Result.failed("请至少上传一张图片"); return Result.failed("请至少上传一张图片");
} }
//先发布商品 //先发布商品
dto.setPrice(StringUtils.isBlank(dto.getPrice()) ? "0" : dto.getPrice()); dto.setPrice(StringUtils.isEmpty(dto.getPrice()) ? "0" : dto.getPrice());
dto.setIsOnSale(true); dto.setIsOnSale(true);
Result addItemResult = itemService.add(dto); Result addItemResult = itemService.add(dto);
if (!addItemResult.getSuccess()) { if (!addItemResult.getSuccess()) {
...@@ -108,6 +104,46 @@ public class ConsignSaleController { ...@@ -108,6 +104,46 @@ public class ConsignSaleController {
} }
@ApiOperation(value = "图文鉴定后用户确认")
@PostMapping("/confirmForImgValuate")
public Result confirmForImgValuate(@RequestBody ConsignSaleRequestDto dto) {
logger.info("【请求开始】图文鉴定后用户确认,请求参数:{}", JSON.toJSONString(dto));
if (StringUtils.isEmpty(dto.getSaleId()) || StringUtils.isEmpty(dto.getItemId()) || ObjectUtils.isEmpty(dto.getAgree())) {
return Result.failed(ResultCode.PARAM_ERROR.getMessage());
}
return consignSaleService.confirmForImgValuate(dto);
}
@ApiOperation(value = "用户寄出商品")
@PostMapping("/userSend")
public Result userSend(@RequestBody ConsignSaleRequestDto dto) {
logger.info("【请求开始】用户寄出商品,请求参数:{}", JSON.toJSONString(dto));
Validator validator = new Validator(FormHandler.ofEntity(dto));
validator.set("logisticsCode", "快递公司编码").must().string()
.set("waybill", "运单号").must().string()
.set("saleId", "寄售单号").must().string()
.end();
if (!validator.isValid()) {
return Result.failed(ResultCode.PARAM_ERROR.getCode(), validator.getErrorInfo());
}
return consignSaleService.userSend(dto);
}
@ApiOperation(value = "实物鉴定后用户确认")
@PostMapping("/confirmForIdentify")
public Result confirmForIdentify(@RequestBody ConsignSaleRequestDto dto) {
logger.info("【请求开始】实物鉴定后用户确认,请求参数:{}", JSON.toJSONString(dto));
if (StringUtils.isEmpty(dto.getSaleId()) || StringUtils.isEmpty(dto.getItemId())|| ObjectUtils.isEmpty(dto.getAgree())) {
return Result.failed(ResultCode.PARAM_ERROR.getMessage());
}
return consignSaleService.confirmForIdentify(dto);
}
@ApiOperation(value = "用户取消寄售单") @ApiOperation(value = "用户取消寄售单")
@PostMapping("/cancel") @PostMapping("/cancel")
public Result cancel(@RequestBody ConsignSaleRequestDto dto) { public Result cancel(@RequestBody ConsignSaleRequestDto dto) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment