增加firstorder字段
This commit is contained in:
@@ -17,8 +17,7 @@
|
|||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<select id="selectByShopId" resultType="com.cool.store.dto.openPreparation.FirstOrderDTO">
|
<select id="selectByShopId" resultType="com.cool.store.dto.openPreparation.FirstOrderDTO">
|
||||||
select id, total_order_deposit as totalOrderDeposit, latest_payment_date as latestPaymentDate ,
|
select *
|
||||||
estimated_cost as estimatedCost ,fruits_cost as fruitsCost
|
|
||||||
from xfsg_first_order
|
from xfsg_first_order
|
||||||
where shop_id = #{shopId}
|
where shop_id = #{shopId}
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -32,7 +32,12 @@ public class FirstOrderDTO {
|
|||||||
|
|
||||||
@ApiModelProperty("创建人")
|
@ApiModelProperty("创建人")
|
||||||
private String createUserId;
|
private String createUserId;
|
||||||
|
@ApiModelProperty("加盟商")
|
||||||
|
private String partnerName;
|
||||||
|
@ApiModelProperty("创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
@ApiModelProperty("更新时间")
|
||||||
|
private Date updateTime;
|
||||||
@ApiModelProperty("更新人")
|
@ApiModelProperty("更新人")
|
||||||
private String updateUserId;
|
private String updateUserId;
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.cool.store.constants.CommonConstants;
|
import com.cool.store.constants.CommonConstants;
|
||||||
import com.cool.store.context.CurrentUserHolder;
|
import com.cool.store.context.CurrentUserHolder;
|
||||||
import com.cool.store.context.LoginUserInfo;
|
import com.cool.store.context.LoginUserInfo;
|
||||||
|
import com.cool.store.dao.EnterpriseUserDAO;
|
||||||
import com.cool.store.dao.FirstOrderDAO;
|
import com.cool.store.dao.FirstOrderDAO;
|
||||||
import com.cool.store.dao.ShopStageInfoDAO;
|
import com.cool.store.dao.ShopStageInfoDAO;
|
||||||
import com.cool.store.dto.openPreparation.FirstOrderDTO;
|
import com.cool.store.dto.openPreparation.FirstOrderDTO;
|
||||||
@@ -50,7 +51,8 @@ public class FirstOrderServiceImp implements FirstOrderService {
|
|||||||
private ShopStageInfoDAO shopStageInfoDAO;
|
private ShopStageInfoDAO shopStageInfoDAO;
|
||||||
@Resource
|
@Resource
|
||||||
private CoolStoreStartFlowService coolStoreStartFlowService;
|
private CoolStoreStartFlowService coolStoreStartFlowService;
|
||||||
|
@Resource
|
||||||
|
private EnterpriseUserDAO enterpriseUserDAO;
|
||||||
@Override
|
@Override
|
||||||
public Integer saveOrder(FirstOrderRequest request, LoginUserInfo user) {
|
public Integer saveOrder(FirstOrderRequest request, LoginUserInfo user) {
|
||||||
log.info("save order:{}", JSONObject.toJSONString(request));
|
log.info("save order:{}", JSONObject.toJSONString(request));
|
||||||
@@ -116,11 +118,17 @@ public class FirstOrderServiceImp implements FirstOrderService {
|
|||||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_15);
|
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_15);
|
||||||
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus()))
|
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus()))
|
||||||
{
|
{
|
||||||
|
|
||||||
|
String userName = enterpriseUserDAO.getUserName(order.getCreateUserId());
|
||||||
|
order.setPartnerName(userName);
|
||||||
order.setFirstOrderSubStage( ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151.getShopSubStageStatus());
|
order.setFirstOrderSubStage( ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151.getShopSubStageStatus());
|
||||||
return order;
|
return order;
|
||||||
}
|
}
|
||||||
if (Objects.nonNull(order)) {
|
if (Objects.nonNull(order)) {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
String userName = enterpriseUserDAO.getUserName(order.getCreateUserId());
|
||||||
|
order.setPartnerName(userName);
|
||||||
ShopInfoDO shopInfo = shopService.getShopInfo(order.getShopId());
|
ShopInfoDO shopInfo = shopService.getShopInfo(order.getShopId());
|
||||||
String storeNum = shopInfo.getStoreNum();
|
String storeNum = shopInfo.getStoreNum();
|
||||||
Boolean flag = coolStoreStartFlowService.getFirstOrder(storeNum);
|
Boolean flag = coolStoreStartFlowService.getFirstOrder(storeNum);
|
||||||
|
|||||||
Reference in New Issue
Block a user