记得上下班打卡 | git大法好,push需谨慎

Commit 519b836c authored by 胡佳晨's avatar 胡佳晨

快递相关接口 提交

parent 5d5d54a6
......@@ -113,6 +113,8 @@ public class GoblinRedisConst {
public static final String REDIS_GOBLIN_BACK_ORDER_ID = PREFIX.concat("order:backIds:");//用户订单下的退款订单id key:$orderId
public static final String REDIS_CAN_BUY = PREFIX.concat("canBuy:");//可以购买的用户 key:$skuId:$mobile
public static final String REDIS_ZZ_MUSIC_TAG = PREFIX.concat("music:tag:ZZ:");//根据场次音乐人标签搜索列表 key:$musicTag:$performanceId
public static final String REDIS_GOBLIN_MAIL = PREFIX.concat("mail:orderId:");//快递 $key:$orderId
/* ----------------------------------------------------------------- */
/**
* SKU剩余库存
......
package com.liquidnet.service.goblin.dto.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
@ApiModel
public class GoblinMailVo implements Serializable, Cloneable {
@ApiModelProperty(value = " 快递单号")
private String mailId;
@ApiModelProperty(value = " 订单id")
private String orderId;
@ApiModelProperty(value = " 快递单号")
private String mailNo;
@ApiModelProperty(value = " 发货时间")
private String deliveryTime;
@ApiModelProperty(value = " 物流公司姓名")
private String logisticsCompany;
@ApiModelProperty(value = " 物流公司code[物流公司id]")
private String logisticsCode;
@ApiModelProperty(value = "orderSkuId")
private List<String> orderSkuVoIds;
@ApiModelProperty(value = "orderSkuVo")
private List<GoblinOrderSkuVo> orderSkuVos;
private static final GoblinMailVo obj = new GoblinMailVo();
public static GoblinMailVo getNew() {
try {
return (GoblinMailVo) obj.clone();
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
return new GoblinMailVo();
}
}
......@@ -39,12 +39,13 @@ public class GoblinStoreOrderListVo implements Cloneable {
private String payTime;
@ApiModelProperty(value = " 物流公司姓名")
private String logisticsCompany;
@ApiModelProperty(value = " 物流相关")
private List<GoblinMailVo> goblinMailVoList;
//todo hujiachen 缺发货时间
@ApiModelProperty(value = " sku相关")
private List<GoblinStoreOrderListSkuVo> storeOrderListSkuVoList;
private static final GoblinStoreOrderListVo obj = new GoblinStoreOrderListVo();
public static GoblinStoreOrderListVo getNew() {
......
......@@ -90,13 +90,13 @@ public class GoblinStoreOrderVo implements Serializable, Cloneable {
private String writeOffCode;
@ApiModelProperty(value = " 订单过期时间(分钟)")
private Integer payCountdownMinute;
@ApiModelProperty(value = " 快递单号")
@ApiModelProperty(value = " 快递单号[废弃]")
private String mailNo;
@ApiModelProperty(value = " 发货时间")
@ApiModelProperty(value = " 发货时间[废弃]")
private String deliveryTime;
@ApiModelProperty(value = " 物流公司姓名")
@ApiModelProperty(value = " 物流公司姓名[废弃]")
private String logisticsCompany;
@ApiModelProperty(value = " 物流公司code[物流公司id]")
@ApiModelProperty(value = " 物流公司code[物流公司id][废弃]")
private String logisticsCode;
@ApiModelProperty(value = " ip")
private String ipAddress;
......
......@@ -2,13 +2,16 @@ package com.liquidnet.service.goblin.service;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.dto.manage.GoblinOrderParam;
import com.liquidnet.service.goblin.dto.vo.GoblinMailVo;
import com.liquidnet.service.goblin.dto.vo.GoblinPayInnerResultVo;
import com.liquidnet.service.goblin.param.PayAgainParam;
import com.liquidnet.service.goblin.param.SyncOrderParam;
import java.util.List;
public interface IGoblinOrderService {
ResponseDto<GoblinPayInnerResultVo> checkOrder(GoblinOrderParam param,String uid);
ResponseDto<GoblinPayInnerResultVo> checkOrder(GoblinOrderParam param, String uid);
ResponseDto<GoblinPayInnerResultVo> payAgain(PayAgainParam param);
......@@ -18,4 +21,6 @@ public interface IGoblinOrderService {
ResponseDto<Integer> checkOrderResultMaterCode(String materCode);
ResponseDto<List<GoblinMailVo>> getMail(String orderId,String mailId);
}
......@@ -32,7 +32,9 @@ public interface IGoblinStoreOrderService {
ResponseDto<Boolean> refundOrderSku(String orderId, String orderSkuId, BigDecimal price);
ResponseDto<Boolean> express(String orderId, String mailNo);
ResponseDto<Boolean> express(String orderId, String orderSkuIds,String mailNo);
ResponseDto<Boolean> changeExpressMailNo(String orderId, String mailId,String mailNo);
String refundSyncOrder(RefundCallbackParam refundCallbackParam);
}
......@@ -949,6 +949,24 @@ create table goblin_store_market_purchasing
KEY `store_market_relation_del_flag_index` (`del_flag`)
) engine = InnoDB comment '营销秒杀表[活动]';
drop table if exists goblin_mail;
create table goblin_mail
(
mid bigint unsigned auto_increment primary key,
mail_id varchar(64) default '' comment '快递id',
order_id varchar(64) default '' comment '订单id',
mail_no varchar(64) default '' comment '快递单号',
delivery_time datetime default null comment '发送时间',
logistics_company varchar(64) default '' comment '快递公司名称',
logistics_code varchar(64) default '' comment '快递公司编号',
order_sku_ids text default null comment '发送子订单',
created_at datetime,
updated_at datetime,
comment text,
KEY `goblin_mail_mail_id_index` (`mail_id`),
KEY `goblin_mail_order_id_index` (`order_id`)
) engine = InnoDB comment '订单快递表';
alter table goblin_order_sku add spu_name varchar(255) default '' comment 'spu名称';
alter table goblin_order_sku add spu_pic varchar(255) default '' comment 'spu图片';
......
......@@ -127,4 +127,16 @@ public class GoblinAppZhengzaiController {
@RequestParam("uid") @Valid String uid) {
return goblinAppZhengzaiService.orderBind(uid, masterCode);
}
@PostMapping("mailData")
@ApiOperation("快递详情")
@ApiResponse(code = 200, message = "接口返回对象参数")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "orderId", value = "orderId", example = "1"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "mailId", value = "mailId", example = "1"),
})
public ResponseDto<List<GoblinMailVo>> getMail(@RequestParam("orderId") @Valid String orderId,
@RequestParam("mailId") @Valid String mailId) {
return goblinOrderService.getMail(orderId,mailId);
}
}
......@@ -3,13 +3,12 @@ package com.liquidnet.service.goblin.controller.manage;
import com.github.pagehelper.PageInfo;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.dto.vo.GoblinMailVo;
import com.liquidnet.service.goblin.dto.vo.GoblinStoreOrderListVo;
import com.liquidnet.service.goblin.param.RefundCallbackParam;
import com.liquidnet.service.goblin.service.IGoblinOrderService;
import com.liquidnet.service.goblin.service.manage.IGoblinStoreOrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
......@@ -17,6 +16,7 @@ import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.math.BigDecimal;
import java.util.List;
@ApiSupport(order = 149101)
@Api(tags = "店铺-订单")
......@@ -27,6 +27,8 @@ import java.math.BigDecimal;
public class GoblinStoreOrderController {
@Autowired
IGoblinStoreOrderService goblinStoreOrderService;
@Autowired
IGoblinOrderService goblinOrderService;
@ApiOperation(value = "订单列表")
@ApiImplicitParams({
......@@ -131,11 +133,38 @@ public class GoblinStoreOrderController {
@ApiOperation(value = "发货")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "orderId", value = "订单id"),
@ApiImplicitParam(type = "form", required = false, dataType = "String", name = "orderSkuIds", value = "逗号隔开orderSkuId"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "mailNo", value = "快递单号"),
})
@GetMapping(value = "express")
public ResponseDto<Boolean> express(@RequestParam(value = "orderId", required = true) @Valid String orderId,
@RequestParam(value = "orderSkuIds", required = false) @Valid String orderSkuIds,
@RequestParam(value = "mailNo", required = true) @Valid String mailNo) {
return goblinStoreOrderService.express(orderId, orderSkuIds, mailNo);
}
@ApiOperation(value = "修改快递单号")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "orderId", value = "订单id"),
@ApiImplicitParam(type = "form", required = false, dataType = "String", name = "mailId", value = "快递id"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "mailNo", value = "快递单号"),
})
@GetMapping(value = "express/change")
public ResponseDto<Boolean> changeExpressMailNo(@RequestParam(value = "orderId", required = true) @Valid String orderId,
@RequestParam(value = "mailId", required = false) @Valid String mailId,
@RequestParam(value = "mailNo", required = true) @Valid String mailNo) {
return ResponseDto.success();
return goblinStoreOrderService.changeExpressMailNo(orderId, mailId, mailNo);
}
@PostMapping("mailData")
@ApiOperation("快递详情")
@ApiResponse(code = 200, message = "接口返回对象参数")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "orderId", value = "orderId", example = "1"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "mailId", value = "mailId", example = "1"),
})
public ResponseDto<List<GoblinMailVo>> getMail(@RequestParam("orderId") @Valid String orderId,
@RequestParam("mailId") @Valid String mailId) {
return goblinOrderService.getMail(orderId, mailId);
}
}
......@@ -807,6 +807,22 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
}
}
@Override
public ResponseDto<List<GoblinMailVo>> getMail(String orderId, String mailId) {
List<GoblinMailVo> voList = redisUtils.getGoblinMail(orderId);
for (GoblinMailVo vo : voList) {
if (mailId.equals(vo.getMailId())) {
List<GoblinOrderSkuVo> orderSkuVos = ObjectUtil.getGoblinOrderSkuVoArrayList();
for (String orderSkuId : vo.getOrderSkuVoIds()) {
GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(orderSkuId);
orderSkuVos.add(orderSkuVo);
}
vo.setOrderSkuVos(orderSkuVos);
}
}
return ResponseDto.success(voList);
}
private boolean noZhengzaiOrder(String uid) {
return !uid.equals("zhengzai");
}
......
......@@ -36,10 +36,7 @@ import java.math.BigDecimal;
import java.text.DateFormat;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.*;
@Service
@Slf4j
......@@ -123,7 +120,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
vo.setStatus(orderVo.getStatus());
vo.setPayTime(orderVo.getPayTime());
vo.setPriceExpress(orderVo.getPriceExpress());
vo.setLogisticsCompany(orderVo.getLogisticsCompany());
vo.setGoblinMailVoList(redisUtils.getGoblinMail(orderId));
List<GoblinStoreOrderListSkuVo> orderListSkuVos = ObjectUtil.getGoblinStoreOrderListSkuVoArrayList();
for (String skuId : orderVo.getOrderSkuVoIds()) {
GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(skuId);
......@@ -240,7 +237,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
}
@Override
public ResponseDto<Boolean> changeAddress(String orderId, String expressAddressDetail, String expressContacts, String expressPhone) {
public ResponseDto<Boolean> changeAddress(String orderId, String expressContacts, String expressPhone, String expressAddressDetail) {
String uid = CurrentUtil.getCurrentUid();
LocalDateTime now = LocalDateTime.now();
GoblinStoreInfoVo storeInfoVo = redisUtils.getStoreInfoVoByUid(uid);
......@@ -410,7 +407,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
}
//redis
redisUtils.setBackOrderVo(backOrderVo.getBackOrderId(), backOrderVo);
redisUtils.addBackOrderByOrderId(orderVo.getOrderId(),backOrderVo.getBackOrderId());
redisUtils.addBackOrderByOrderId(orderVo.getOrderId(), backOrderVo.getBackOrderId());
//mongo
mongoUtils.insertGoblinBackOrderVo(backOrderVo);
//添加退款
......@@ -439,15 +436,17 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
}
@Override
public ResponseDto<Boolean> express(String orderId, String mailNo) {
public ResponseDto<Boolean> express(String orderId, String orderSkuIds, String mailNo) {
String uid = CurrentUtil.getCurrentUid();
LocalDateTime now = LocalDateTime.now();
String nowStr = DateUtil.getNowTime();
LinkedList<String> sqls = CollectionUtil.linkedListString();
LinkedList<Object[]> sqlsOrder = CollectionUtil.linkedListObjectArr();
LinkedList<Object[]> sqlsOrderSku = CollectionUtil.linkedListObjectArr();
LinkedList<Object[]> sqlsMail = CollectionUtil.linkedListObjectArr();
sqls.add(SqlMapping.get("goblin_order.store.express"));
sqls.add(SqlMapping.get("goblin_order.store.orderSkuStatus"));
sqls.add(SqlMapping.get("goblin_order.mail"));
GoblinStoreInfoVo storeInfoVo = redisUtils.getStoreInfoVoByUid(uid);
if (storeInfoVo == null) {
return ResponseDto.failure("无法查看");
......@@ -459,11 +458,32 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
if (orderVo.getStatus() != GoblinStatusConst.Status.ORDER_STATUS_2.getValue()) {
return ResponseDto.failure("无法发货");
}
orderVo.setMailNo(mailNo);
orderVo.setDeliveryTime(nowStr);
orderVo.setLogisticsCompany("松鼠德邦");
List<String> skuIds;
if (orderSkuIds == null) {
skuIds = orderVo.getOrderSkuVoIds();
} else {
skuIds = Arrays.asList(orderSkuIds.split(","));
}
GoblinMailVo mailVo = GoblinMailVo.getNew();
mailVo.setMailId(IDGenerator.nextTimeId2());
mailVo.setOrderId(orderVo.getOrderId());
mailVo.setMailNo(mailNo);
mailVo.setDeliveryTime(nowStr);
mailVo.setLogisticsCompany("松鼠德邦");
mailVo.setOrderSkuVoIds(skuIds);
//redis
redisUtils.addGoblinMail(orderId, mailVo);
//mongo
mongoUtils.insertGoblinMailVo(mailVo);
//mysql
sqlsMail.add(new Object[]{
mailVo.getMailId(), mailVo.getOrderId(), mailVo.getMailNo(), mailVo.getDeliveryTime(),
mailVo.getLogisticsCompany(), mailVo.getOrderSkuVoIds(), now
});
orderVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_3.getValue());
for (String orderSkuId : orderVo.getOrderSkuVoIds()) {
for (String orderSkuId : skuIds) {
GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(orderSkuId);
orderSkuVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_3.getValue());
//redis
......@@ -478,7 +498,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
}
GoblinOrderOperationLog log = initLog(orderId, uid, now);
log.setType(GoblinStatusConst.Status.ORDER_LOG_STATUS_13.getValue());
log.setRemark("发货:orderId=[" + orderId + "],mailNo=[" + mailNo + "]");
log.setRemark("发货:orderId=[" + orderId + "],orderSkuId=[" + orderSkuIds + "],mailNo=[" + mailNo + "]");
//redis
redisUtils.setGoblinOrder(orderId, orderVo);
......@@ -486,7 +506,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
mongoUtils.updateGoblinStoreOrderVo(orderId, orderVo);
//mysql
sqlsOrder.add(new Object[]{
orderVo.getMailNo(), orderVo.getDeliveryTime(), orderVo.getLogisticsCompany(), orderVo.getStatus(), now, orderId, now, now
orderVo.getStatus(), now, orderId, now, now
});
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_STORE_ORDER_OPERA.getKey(),
SqlMapping.gets(sqls, sqlsOrder, sqlsOrderSku));
......@@ -500,6 +520,33 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
return ResponseDto.success();
}
@Override
public ResponseDto<Boolean> changeExpressMailNo(String orderId, String mailId, String mailNo) {
String uid = CurrentUtil.getCurrentUid();
GoblinStoreInfoVo storeInfoVo = redisUtils.getStoreInfoVoByUid(uid);
if (storeInfoVo == null) {
return ResponseDto.failure("无法查看");
}
GoblinStoreOrderVo orderVo = redisUtils.getGoblinOrder(orderId);
if (orderVo == null || !orderVo.getStoreId().equals(storeInfoVo.getStoreId())) {
return ResponseDto.failure("无法查看");
}
GoblinMailVo vo = GoblinMailVo.getNew();
vo.setMailNo(mailNo);
vo.setMailId(mailId);
vo.setOrderId(orderId);
redisUtils.changeGoblinMail(orderId,vo);
mongoUtils.updateGoblinMailVo(mailId,vo);
//添加日志
queueUtils.sendMsgByRedis(
MQConst.GoblinQueue.GOBLIN_STORE_ORDER_OPERA.getKey(),
SqlMapping.get("goblin_order.mail.update",
vo.getMailNo(),LocalDateTime.now(),vo.getMailId()
)
);
return ResponseDto.success();
}
@Override
public String refundSyncOrder(RefundCallbackParam refundCallbackParam) {
LocalDateTime now = LocalDateTime.now();
......@@ -540,7 +587,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
List<GoblinOrderSkuVo> skuVoList = ObjectUtil.getGoblinOrderSkuVoArrayList();
for (GoblinBackOrderSkuVo backOrderSkuVo : backOrderSkuVos) {
GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(backOrderSkuVo.getOrderSkuId());
orderSkuVo.setPriceRefund(orderSkuVo.getPriceRefund()==null?BigDecimal.ZERO:orderSkuVo.getPriceRefund().add(price));
orderSkuVo.setPriceRefund(orderSkuVo.getPriceRefund() == null ? BigDecimal.ZERO : orderSkuVo.getPriceRefund().add(price));
if (orderSkuVo.getPriceRefund().compareTo(orderSkuVo.getSkuPriceActual()) == 0) {
orderSkuVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_6.getValue());
String pre = GoblinStatusConst.MarketPreStatus.getPre(orderSkuVo.getSkuId());
......
......@@ -718,6 +718,18 @@ public class GoblinMongoUtils {
object);
}
//添加 订单SkuVo全量
public GoblinMailVo insertGoblinMailVo(GoblinMailVo vo) {
return mongoTemplate.insert(vo, GoblinMailVo.class.getSimpleName());
}
public UpdateResult updateGoblinMailVo(String mailId, GoblinMailVo data) {
BasicDBObject object = ObjectUtil.cloneBasicDBObject().append("$set", mongoConverter.convertToMongoType(data));
return mongoTemplate.getCollection(GoblinMailVo.class.getSimpleName()).updateOne(
Query.query(Criteria.where("mailId").is(mailId)).getQueryObject(),
object);
}
//添加 操作日志
public GoblinOrderLogVo insertGoblinOrderLogVo(GoblinOrderLogVo vo) {
return mongoTemplate.insert(vo, GoblinOrderLogVo.class.getSimpleName());
......
......@@ -719,6 +719,39 @@ public class GoblinRedisUtils {
redisUtil.set(redisKey, vo);
}
// 赋值 快递vo
public void addGoblinMail(String orderId, GoblinMailVo vo) {
String redisKey = GoblinRedisConst.REDIS_GOBLIN_MAIL.concat(orderId);
List<GoblinMailVo> list = getGoblinMail(orderId);
list.add(vo);
redisUtil.set(redisKey, list);
}
// 修改 快递vo
public void changeGoblinMail(String orderId, GoblinMailVo vo) {
String redisKey = GoblinRedisConst.REDIS_GOBLIN_MAIL.concat(orderId);
List<GoblinMailVo> list = getGoblinMail(orderId);
for (GoblinMailVo item : list) {
if (item.getMailId().equals(vo.getMailId())) {
item.setMailNo(vo.getMailNo());
break;
}
}
redisUtil.set(redisKey, list);
}
// 获取 快递vo
public List<GoblinMailVo> getGoblinMail(String orderId) {
String redisKey = GoblinRedisConst.REDIS_GOBLIN_MAIL.concat(orderId);
Object obj = redisUtil.get(redisKey);
if (obj == null) {
return ObjectUtil.goblinMailVo();
} else {
return (List<GoblinMailVo>) obj;
}
}
// 获取 订单相关vo
public GoblinStoreOrderVo getGoblinOrder(String orderId) {
String redisKey = GoblinRedisConst.REDIS_GOBLIN_ORDER.concat(orderId);
......
......@@ -76,6 +76,7 @@ public class ObjectUtil {
private static final ArrayList<GoblinStoreMgtCouponListVoExcel> goblinStoreMgtCouponListVoExcelArrayList = new ArrayList<>();
private static final ArrayList<GoblinUserCouponVo> goblinUserCouponVo = new ArrayList<>();
private static final ArrayList<BackCouponParam> backCouponParam = new ArrayList<>();
private static final ArrayList<GoblinMailVo> goblinMailVo = new ArrayList<>();
private static final BasicDBObject basicDBObject = new BasicDBObject();
......@@ -93,6 +94,10 @@ public class ObjectUtil {
return goblinStoreMgtCouponListVoPagedResult.clone();
}
public static ArrayList<GoblinMailVo> goblinMailVo() {
return (ArrayList<GoblinMailVo>) goblinMailVo.clone();
}
public static ArrayList<BackCouponParam> getBackCouponParam() {
return (ArrayList<BackCouponParam>) backCouponParam.clone();
}
......
......@@ -5,7 +5,6 @@ goblin_store_info.update_by_cert2=UPDATE goblin_store_info SET store_name=?,logo
goblin_store_info.update_by_del=UPDATE goblin_store_info SET del_flg=1,updated_by=?,updated_at=? WHERE store_id=?
goblin_store_info.update_by_edit=UPDATE goblin_store_info SET store_name=?,logo_pic=?,background_pic=?,introduce=?,updated_by=?,updated_at=? WHERE store_id=?
goblin_store_info.update_by_setting=UPDATE goblin_store_info SET status=?,updated_by=?,updated_at=? WHERE store_id=? AND del_flg='0'
goblin_store_certification.insert_by_cert=INSERT INTO goblin_store_certification (store_id,person_cert_type,person_name,person_cert_code,person_cert_validity,person_cert_lasting,person_cert_fpic,person_cert_bpic,person_cert_spic,province_id,province_name,city_id,city_name,county_id,county_name,bus_address,bus_name,bus_cert_code,bus_cert_validity,bus_cert_lasting,bus_cert_pic,bus_quality_pic,created_by,created_at) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
goblin_store_certification.update_by_cert=UPDATE goblin_store_certification SET person_cert_type=?,person_name=?,person_cert_code=?,person_cert_validity=?,person_cert_lasting=?,person_cert_fpic=?,person_cert_bpic=?,person_cert_spic=?,province_id=?,province_name=?,city_id=?,city_name=?,county_id=?,county_name=?,bus_address=?,bus_name=?,bus_cert_code=?,bus_cert_validity=?,bus_cert_lasting=?,bus_cert_pic=?,bus_quality_pic=?,updated_by=?,updated_at=? WHERE store_id=?
goblin_store_certification.update_by_del=UPDATE goblin_store_certification SET del_flg=1,updated_by=?,updated_at=? WHERE store_id=?
......@@ -14,7 +13,6 @@ goblin_store_config.update=UPDATE goblin_store_config SET config_val=?,updated_b
#---- 店铺公告信息
goblin_store_notice.insert=INSERT INTO goblin_store_notice (notice_id,store_id,content,release_time,long_lasting,cancell_time,status,created_by,created_at)VALUES(?,?,?,?,?,?,?,?,?)
goblin_store_notice.update=UPDATE goblin_store_notice SET content=?,release_time=?,long_lasting=?,cancell_time=?,status=?,updated_by=?,updated_at=? WHERE notice_id=?
goblin_store_notice.release=UPDATE goblin_store_notice SET release_time=?,status='1',updated_by=?,updated_at=? WHERE store_id=? AND notice_id=?
goblin_store_notice.remove=UPDATE goblin_store_notice SET del_flg='1',updated_by=?,updated_at=? WHERE store_id=? AND notice_id=?
#---- 店铺商品分类信息
......@@ -44,7 +42,6 @@ goblin_goods.update_by_edit_sku=UPDATE goblin_goods SET price_ge=?,price_le=?,up
goblin_goods.update_by_del_sku=UPDATE goblin_goods SET price_ge=?,price_le=?,updated_by=?,updated_at=? WHERE spu_id=? AND del_flg='0'
goblin_goods.update_by_del_store=UPDATE goblin_goods SET del_flg='1',updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE store_id=?
goblin_goods.update_by_del=UPDATE goblin_goods SET del_flg='1',updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE spu_id=? AND store_id=?
goblin_goods_sku.insert=INSERT INTO goblin_goods_sku (sku_id,spu_id,sku_no,name,subtitle, sell_price,sku_pic,sku_isbn,stock,sku_stock, warning_stock,price,price_member,weight,buy_factor, buy_roster,buy_limit,store_id,sku_validity,virtual_flg, status,shelves_status,sku_appear,shelves_at,created_by, created_at,logistics_template)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
goblin_goods_sku.update_by_edit_for_market=UPDATE goblin_goods_sku SET name=?,sku_pic=?,sell_price=?,weight=?,stock=?,warning_stock=?,sku_appear=?,sku_isbn=?,sku_validity=?,updated_by=?,updated_at=? WHERE sku_id=? AND del_flg='0'
goblin_goods_sku.update_by_edit=UPDATE goblin_goods_sku SET name=?,sku_pic=?,sell_price=?,price=?,price_member=?,weight=?,stock=?,sku_stock=?,warning_stock=?,sku_appear=?,sku_isbn=?,buy_factor=?,buy_roster=?,buy_limit=?,sku_validity=?,updated_by=?,updated_at=? WHERE sku_id=? AND del_flg='0'
......@@ -52,7 +49,6 @@ goblin_goods_sku.update_by_edit_spu=UPDATE goblin_goods_sku SET sku_no=?,virtual
goblin_goods_sku.update_by_shelves=UPDATE goblin_goods_sku SET shelves_status=?,shelves_at=?,updated_by=?,updated_at=? WHERE spu_id=? AND store_id=? AND sku_appear='0'
goblin_goods_sku.update_by_del_store=UPDATE goblin_goods_sku SET del_flg='1',updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE store_id=?
goblin_goods_sku.update_by_del=UPDATE goblin_goods_sku SET del_flg='1',updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE spu_id=? AND store_id=?
goblin_goods_image.insert=INSERT INTO goblin_goods_image (spu_id,url)VALUES(?,?)
goblin_goods_tag.insert=INSERT INTO goblin_goods_tag (spu_id,tag_id,sort,tag_belong)VALUES(?,?,?,?)
goblin_goods_tag.delete=UPDATE goblin_goods_tag SET del_flg='1' WHERE spu_id=? AND tag_belong=? AND del_flg='0'
......@@ -83,12 +79,15 @@ goblin_order.zhengzai.push=UPDATE goblin_store_order SET zhengzai_status = ? ,up
#---- 商铺订单操作
goblin_order.store.cancel=UPDATE goblin_store_order SET mail_no = ? ,delivery_time = ? , logistics_company = ? , status = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.orderSkuStatus=UPDATE goblin_order_sku SET status = ? , updated_at = ? WHERE order_sku_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.express=UPDATE goblin_store_order SET status = ? ,cancel_time = ? , cancel_reason = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.express=UPDATE goblin_store_order SET status = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.mail=INSERT INTO goblin_mail (`mail_id`,`order_id`,`mail_no`,`delivery_time`,`logistics_company`,`order_sku_ids`,`created_at`) VALUES (?,?,?,?,?,?,?)
goblin_order.mail.update=UPDATE goblin_mail SET mail_no = ? , updated_at = ? WHERE mail_id = ?
goblin_order.store.address=UPDATE goblin_order_attr SET express_contacts = ? ,express_address_detail = ? , express_phone = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.orderPrice=UPDATE goblin_store_order SET price_modify = ? ,price_voucher = ? , price_actual = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.orderSkuPrice=UPDATE goblin_order_sku SET price_modify = ? ,price_voucher = ? , sku_price_actual = ? , updated_at = ? WHERE order_sku_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.log = INSERT INTO goblin_order_operation_log (`order_log_id`,`order_id`,`type`,`remark`,`operation_name`,`created_at`) VALUES(?,?,?,?,?,?)
goblin_order.store.refundLog = INSERT INTO goblin_back_order_log (`back_order_log_id`,`back_order_id`,`operation_type`,`message`,`operation_name`,`status`,`created_at`) VALUES(?,?,?,?,?,?,?)
goblin_order.store.log=INSERT INTO goblin_order_operation_log (`order_log_id`,`order_id`,`type`,`remark`,`operation_name`,`created_at`) VALUES(?,?,?,?,?,?)
goblin_order.store.refundLog=INSERT INTO goblin_back_order_log (`back_order_log_id`,`back_order_id`,`operation_type`,`message`,`operation_name`,`status`,`created_at`) VALUES(?,?,?,?,?,?,?)
goblin_order.store.orderExpressPrice=UPDATE goblin_store_order SET price_total =? , price_modify = ? ,price_voucher = ? , price_actual = ? ,price_express = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.backOrder=INSERT INTO goblin_back_order (`back_order_id`,`back_code`,`order_id`,`order_code`,`store_id`,`user_id`,`sku_id_nums`,`type`,`reason`,`describes`,`real_back_price`,`status`,`created_at`,`audit_at`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)
goblin_order.store.refundPrice=UPDATE goblin_store_order SET price_refund = ? ,status = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
......@@ -98,28 +97,21 @@ goblin_order.store.changeExpress=UPDATE goblin_back_order SET real_back_price =
goblin_order.store.changeSku=UPDATE goblin_back_order SET real_back_price = ? , updated_at = ? WHERE back_order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.backOrderStatus=UPDATE goblin_back_order SET status = ? , audit_at=?,updated_at = ? WHERE back_order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.orderStatus=UPDATE goblin_store_order SET status = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.applyRefund=UPDATE goblin_back_order SET status = ? ,reason=?,audit_at=?, updated_at = ? WHERE back_order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
#---- 用户订单操作
goblin_order.user.applyRefund=INSERT INTO goblin_back_order (`back_order_id`,`back_code`,`order_id`,`order_code`,`store_id`,`user_id`,`sku_id_nums`,`type`,`reason`,`describes`,`real_back_price`,`back_price_express`,`status`,`logis_company_name`,`mailNo`,`created_at`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
#---- 购物车操作
goblin_shop.cart.delete = UPDATE goblin_shopping_cart set del_tag=? where user_id=? and sku_id=?
goblin_shop.cart.insert = insert into goblin_shopping_cart (car_id, user_id, store_id,spu_id, sku_id, `number`,marketing_id, del_tag, `comment`,`type`) values (?,?,?,?,?,?,?,?,?,?)
goblin_shop.cart.update = update goblin_shopping_cart set `number` = ? where car_id=? and user_id=? and del_tag=0
goblin_shop.cart.delete=UPDATE goblin_shopping_cart set del_tag=? where user_id=? and sku_id=?
goblin_shop.cart.insert=insert into goblin_shopping_cart (car_id, user_id, store_id,spu_id, sku_id, `number`,marketing_id, del_tag, `comment`,`type`) values (?,?,?,?,?,?,?,?,?,?)
goblin_shop.cart.update=update goblin_shopping_cart set `number` = ? where car_id=? and user_id=? and del_tag=0
#---- 商铺活动:优惠券
goblin_store_coupon.insert=INSERT INTO goblin_store_coupon (store_coupon_id,store_coupon_no,store_id,title,label, notice,type,stock,triggers,val_face, discount,val_over,val_minus,deduction,receive_limit, receive_curb,use_scope,state,start_time,end_time, created_by,created_at)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
goblin_store_coupon.update=UPDATE goblin_store_coupon SET title=?,label=?,notice=?,type=?,triggers=?,val_face=?,discount=?,val_over=?,val_minus=?,deduction=?,receive_limit=?,receive_curb=?,use_scope=?,start_time=?,end_time=?,updated_by=?,updated_at=? WHERE store_coupon_id=? AND del_flg='0'
goblin_store_coupon.update_stock=UPDATE goblin_store_coupon SET stock=?,updated_by=?,updated_at=? WHERE store_coupon_id=? AND del_flg='0'
goblin_store_coupon.activity=UPDATE goblin_store_coupon SET state=?,updated_by=?,updated_at=? WHERE store_coupon_id=? AND del_flg='0'
goblin_store_coupon.delete=UPDATE goblin_store_coupon SET del_flg='1',deleted_by=?,deleted_at=? WHERE store_coupon_id=? AND del_flg='0'
goblin_store_coupon_rule.insert=INSERT INTO goblin_store_coupon_rule (store_coupon_id,spu_id,created_by,created_at)VALUES(?,?,?,?)
goblin_store_coupon_rule.update_del=UPDATE goblin_store_coupon_rule SET del_flg='1',updated_by=?,updated_at=? WHERE store_coupon_id=? AND del_flg='0'
goblin_user_coupon.insert=INSERT INTO goblin_user_coupon (ucoupon_id, store_coupon_id, uid, state, bind_at, dued_at, operator, created_at)VALUES(?,?,?,?,?,?,?,?)
goblin_user_coupon.updateState=UPDATE goblin_user_coupon SET state = ? , used_for = ? ,updated_at = ?where ucoupon_id = ?
#----
\ No newline at end of file
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