Commit e290676d authored by shiyu's avatar shiyu

个人开店

parent cfdb88f0
......@@ -255,6 +255,7 @@ public class SysIdentifyOrderServiceImpl implements SysIdentifyOrderService {
deliveryNoticeMsg.setAddress(distributionOrder.getReceiverName() + " " + distributionOrder.getReceiverPhone() + " " + distributionOrder.getReceiverAddress());
SupplierItem supplierItem = supplierItemDao.findById(distributionOrder.getItemId());
deliveryNoticeMsg.setItemName(supplierItem.getName());
deliveryNoticeMsg.setLogisticsName(LogisticsEnum.getNameByCode(dto.getOutLogisticsCode()));
deliveryNoticeMsg.setDeliveryTime(now);
//发送给买家
......
......@@ -128,6 +128,23 @@ public interface CommConsts {
*/
public final static String EXCHANGE_ORDER_PREFIX = "EX";
/**
* 申请开店订单号
*/
public final static String OPEN_SHOP_APPLY_ORDER_PREFIX = "OSA";
/**
* 开店支付订单号
*/
public final static String OPEN_SHOP_COST_ORDER_PREFIX = "OSC";
/**
* 开店质保金订单号
*/
public final static String GUARANTEE_MONEY_ORDER_PREFIX = "GM";
/**
* 平台收货地址
*/
......
package com.wwdz.ch.core.consts;
public class OpenShopApplyOrderEnum {
/**
* 申请开店订单状态
*/
public enum StateEnum {
PRE_PAY(0, "待付款"),
PRE_AUDIT(10, "待审核"),
PASSED(20, "审核通过"),
NOT_PASSED(30, "审核不通过"),
;
private int code;
private String des;
StateEnum(int code, String des) {
this.code = code;
this.des = des;
}
public static String getNameByCode(int code) {
for (OpenShopApplyOrderEnum.StateEnum stateEnum : OpenShopApplyOrderEnum.StateEnum.values()) {
if (code == stateEnum.getCode()) {
return stateEnum.getDes();
}
}
return null;
}
public int getCode() {
return code;
}
public String getDes() {
return des;
}
}
/**
* 支付费用类型
*/
public enum CostTypeEnum {
OPEN_SHOP_AMOUNT(1, "开店费"),
GUARANTEE_MONEY(2, "质保金"),
;
private int code;
private String des;
CostTypeEnum(int code, String des) {
this.code = code;
this.des = des;
}
public static String getNameByCode(int code) {
for (OpenShopApplyOrderEnum.CostTypeEnum costTypeEnum : OpenShopApplyOrderEnum.CostTypeEnum.values()) {
if (code == costTypeEnum.getCode()) {
return costTypeEnum.getDes();
}
}
return null;
}
public int getCode() {
return code;
}
public String getDes() {
return des;
}
}
}
......@@ -31,6 +31,11 @@ public class DeliveryNoticeMsg implements Entity, AbstractSubscribeMsg {
*/
private String waybill;
/**
* 快递公司
*/
private String logisticsName;
/**
* 收货地址
*/
......@@ -50,15 +55,16 @@ public class DeliveryNoticeMsg implements Entity, AbstractSubscribeMsg {
@Override
public Map<String, Object> getTempletParam() {
Map<String, Object> map = new LinkedHashMap<>();
map.put("character_string3", new HashMap(){{put("value", distributionOrderId);}});
map.put("character_string1", new HashMap(){{put("value", distributionOrderId);}});
if (itemName.length() > 20) {
itemName = itemName.substring(0, 20);
}
map.put("thing14", new HashMap(){{put("value", itemName);}});
map.put("character_string8", new HashMap(){{put("value", waybill);}});
map.put("thing12", new HashMap(){{put("value", itemName);}});
map.put("thing11", new HashMap(){{put("value", logisticsName);}});
map.put("character_string2", new HashMap(){{put("value", waybill);}});
SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss", Locale.CHINESE);
String formattedDate = sdf.format(deliveryTime);
map.put("time10", new HashMap(){{put("value", formattedDate);}});
map.put("time7", new HashMap(){{put("value", formattedDate);}});
return map;
}
......
......@@ -17,4 +17,9 @@ public class ExchangeNoticeMsg implements Entity {
private Long userId;
private String officialEstimatedPrice;
/**
* 申请人
*/
private String applicant;
}
......@@ -46,19 +46,30 @@ public class SignedNoticeMsg implements Entity, AbstractSubscribeMsg {
*/
private Integer shopState;
/**
* 发货运单号
*/
private String waybill;
/**
* 买家名称
*/
private String buyerName;
@Override
public Map<String, Object> getTempletParam() {
Map<String, Object> map = new LinkedHashMap<>();
map.put("character_string5", new HashMap(){{put("value", distributionOrderId);}});
map.put("character_string6", new HashMap(){{put("value", distributionOrderId);}});
map.put("character_string1", new HashMap(){{put("value", waybill);}});
if (itemName.length() > 20) {
itemName = itemName.substring(0, 20);
}
map.put("thing1", new HashMap(){{put("value", itemName);}});
map.put("amount2", new HashMap(){{put("value", amount);}});
map.put("thing2", new HashMap(){{put("value", itemName);}});
map.put("amount7", new HashMap(){{put("value", amount);}});
SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss", Locale.CHINESE);
String formattedDate = sdf.format(signedTime);
map.put("time4", new HashMap(){{put("value", formattedDate);}});
map.put("time5", new HashMap(){{put("value", formattedDate);}});
return map;
}
......
......@@ -7,8 +7,20 @@ public interface SendMsgService {
Result sendPayTempletMsg(String openId, PayNoticeMsg payNoticeMsg);
/**
* 发送发货提醒消息
* @param openId
* @param deliveryNoticeMsg
* @return
*/
Result sendDeliveryTempletMsg(String openId, DeliveryNoticeMsg deliveryNoticeMsg);
/**
* 买家确认收货通知卖家
* @param openId
* @param signedNoticeMsg
* @return
*/
Result sendSignedTempletMsg(String openId, SignedNoticeMsg signedNoticeMsg);
/**
......@@ -74,7 +86,7 @@ public interface SendMsgService {
/**
* 通知被关注者
* 通知卖家有新订单
* @return
*/
Result newOrderNoticeMsg(DistributionOrderNoticeMsg distributionOrderNoticeMsg);
......@@ -127,4 +139,12 @@ public interface SendMsgService {
* @return
*/
Result sendOfficialEstimatedPriceMsg(ExchangeNoticeMsg exchangeNoticeMsg);
/**
* 交换单申请通知
* @param exchangeNoticeMsg
* @return
*/
Result exchangeNoticeMsg(ExchangeNoticeMsg exchangeNoticeMsg);
}
......@@ -7,6 +7,8 @@ import java.util.List;
public interface CollectorWhiteListDao {
boolean insert(CollectorWhiteList collectorWhiteList);
boolean isExisted(long collectorId);
void upsert(CollectorWhiteList collectorWhiteList);
......
package com.wwdz.ch.db.dao.openShop;
import com.wwdz.ch.db.domain.openShop.GuaranteeMoneyRecord;
public interface GuaranteeMoneyRecordDao {
boolean insert(GuaranteeMoneyRecord guaranteeMoneyRecord);
boolean update(GuaranteeMoneyRecord guaranteeMoneyRecord);
GuaranteeMoneyRecord findByOrderId(String orderId);
/**
* 是否有效缴纳质保金
* @param userId
* @return
*/
boolean checkValidRecord(long userId);
}
package com.wwdz.ch.db.dao.openShop;
import com.wwdz.ch.db.domain.openShop.OpenShopApplyOrder;
import com.wwdz.ch.db.dto.request.openShop.OpenShopApplyOrderRequestDto;
import java.util.List;
public interface OpenShopApplyOrderDao {
boolean insert(OpenShopApplyOrder openShopApplyOrder);
List<OpenShopApplyOrder> findByPage(OpenShopApplyOrderRequestDto dto);
boolean updateState(String orderId, int state);
}
package com.wwdz.ch.db.dao.openShop;
import com.wwdz.ch.db.domain.openShop.GuaranteeMoneyRecord;
import com.wwdz.ch.db.domain.openShop.OpenShopCostRecord;
public interface OpenShopCostRecordDao {
boolean insert(OpenShopCostRecord openShopCostRecord);
boolean update(OpenShopCostRecord openShopCostRecord);
OpenShopCostRecord findByOrderId(String orderId);
/**
* 是否有效缴纳开店费
* @param userId
* @return
*/
boolean checkValidRecord(long userId);
}
package com.wwdz.ch.db.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import com.xxdxxs.entity.Entity;
import lombok.Data;
/**
* @author shiyu
* @date 2024/09/20
* @date 2024/10/29
*/
@Data
public class CollectorWhiteList implements Entity {
......@@ -30,6 +32,11 @@ public class CollectorWhiteList implements Entity {
*/
private Date createTime;
/**
* 截止有效日期
*/
private Date endValidTime;
/**
* 是否有效
*/
......@@ -50,6 +57,16 @@ public class CollectorWhiteList implements Entity {
*/
private Boolean isUploadLimit;
/**
* 身份证正面
*/
private String idCardFrontImage;
/**
* 身份证背面
*/
private String idCardBackImage;
private static final long serialVersionUID = 1L;
@Override
......@@ -62,10 +79,13 @@ public class CollectorWhiteList implements Entity {
sb.append(", collectorId=").append(collectorId);
sb.append(", channelCostRebate=").append(channelCostRebate);
sb.append(", createTime=").append(createTime);
sb.append(", endValidTime=").append(endValidTime);
sb.append(", isValid=").append(isValid);
sb.append(", deliveryAuth=").append(deliveryAuth);
sb.append(", isShow=").append(isShow);
sb.append(", isUploadLimit=").append(isUploadLimit);
sb.append(", idCardFrontImage=").append(idCardFrontImage);
sb.append(", idCardBackImage=").append(idCardBackImage);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
......@@ -87,10 +107,13 @@ public class CollectorWhiteList implements Entity {
&& (this.getCollectorId() == null ? other.getCollectorId() == null : this.getCollectorId().equals(other.getCollectorId()))
&& (this.getChannelCostRebate() == null ? other.getChannelCostRebate() == null : this.getChannelCostRebate().equals(other.getChannelCostRebate()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getEndValidTime() == null ? other.getEndValidTime() == null : this.getEndValidTime().equals(other.getEndValidTime()))
&& (this.getIsValid() == null ? other.getIsValid() == null : this.getIsValid().equals(other.getIsValid()))
&& (this.getDeliveryAuth() == null ? other.getDeliveryAuth() == null : this.getDeliveryAuth().equals(other.getDeliveryAuth()))
&& (this.getIsShow() == null ? other.getIsShow() == null : this.getIsShow().equals(other.getIsShow()))
&& (this.getIsUploadLimit() == null ? other.getIsUploadLimit() == null : this.getIsUploadLimit().equals(other.getIsUploadLimit()));
&& (this.getIsUploadLimit() == null ? other.getIsUploadLimit() == null : this.getIsUploadLimit().equals(other.getIsUploadLimit()))
&& (this.getIdCardFrontImage() == null ? other.getIdCardFrontImage() == null : this.getIdCardFrontImage().equals(other.getIdCardFrontImage()))
&& (this.getIdCardBackImage() == null ? other.getIdCardBackImage() == null : this.getIdCardBackImage().equals(other.getIdCardBackImage()));
}
@Override
......@@ -101,10 +124,13 @@ public class CollectorWhiteList implements Entity {
result = prime * result + ((getCollectorId() == null) ? 0 : getCollectorId().hashCode());
result = prime * result + ((getChannelCostRebate() == null) ? 0 : getChannelCostRebate().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getEndValidTime() == null) ? 0 : getEndValidTime().hashCode());
result = prime * result + ((getIsValid() == null) ? 0 : getIsValid().hashCode());
result = prime * result + ((getDeliveryAuth() == null) ? 0 : getDeliveryAuth().hashCode());
result = prime * result + ((getIsShow() == null) ? 0 : getIsShow().hashCode());
result = prime * result + ((getIsUploadLimit() == null) ? 0 : getIsUploadLimit().hashCode());
result = prime * result + ((getIdCardFrontImage() == null) ? 0 : getIdCardFrontImage().hashCode());
result = prime * result + ((getIdCardBackImage() == null) ? 0 : getIdCardBackImage().hashCode());
return result;
}
......@@ -120,10 +146,13 @@ public class CollectorWhiteList implements Entity {
collectorId("collector_id", "collectorId", "BIGINT", false),
channelCostRebate("channel_cost_rebate", "channelCostRebate", "DECIMAL", false),
createTime("create_time", "createTime", "TIMESTAMP", false),
endValidTime("end_valid_time", "endValidTime", "TIMESTAMP", false),
isValid("is_valid", "isValid", "BIT", false),
deliveryAuth("delivery_auth", "deliveryAuth", "INTEGER", false),
isShow("is_show", "isShow", "BIT", false),
isUploadLimit("is_upload_limit", "isUploadLimit", "BIT", false);
isUploadLimit("is_upload_limit", "isUploadLimit", "BIT", false),
idCardFrontImage("id_card_front_image", "idCardFrontImage", "VARCHAR", false),
idCardBackImage("id_card_back_image", "idCardBackImage", "VARCHAR", false);
/**
* This field was generated by MyBatis Generator.
......
......@@ -22,10 +22,15 @@ public class UserBankCardRequestDto extends BaseRequestDto implements Entity {
private String cardId;
/**
* 名称
* 持卡人名称
*/
private String name;
/**
* 开户行名称
*/
private String bankName;
/**
* 创建时间
*/
......
package com.wwdz.ch.db.dto.request.openShop;
import com.xxdxxs.entity.Entity;
import lombok.Data;
@Data
public class GuaranteeMoneyRecordRequestDto implements Entity {
private Long id;
/**
* 缴纳保证金的单号
*/
private String guaranteeMoneyOrderId;
/**
* 预支付id
*/
private String prepayId;
/**
* 微信支付订单号
*/
private String transactionId;
/**
* 用户id
*/
private Long userId;
/**
* 微信openid
*/
private String userOpenId;
/**
* 支付金额,单位元
*/
private String amount;
}
......@@ -17,6 +17,12 @@ public class CollectorWhiteListDaoImpl implements CollectorWhiteListDao {
@Autowired
CollectorWhiteListMapper collectorWhiteListMapper;
@Override
public boolean insert(CollectorWhiteList collectorWhiteList) {
return collectorWhiteListMapper.insert(collectorWhiteList) > 0;
}
@Override
public boolean isExisted(long collectorId) {
CollectorWhiteListExample example = new CollectorWhiteListExample();
......@@ -36,7 +42,7 @@ public class CollectorWhiteListDaoImpl implements CollectorWhiteListDao {
if (count > 0) {
collectorWhiteListMapper.updateByExampleSelective(collectorWhiteList, example);
} else {
collectorWhiteList.setChannelCostRebate(new BigDecimal("15"));
collectorWhiteList.setChannelCostRebate(new BigDecimal("1"));
collectorWhiteListMapper.insert(collectorWhiteList);
}
}
......
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