完成订单 售后模块等

This commit is contained in:
hupeng
2023-06-29 09:28:26 +08:00
parent 31fc0da4b5
commit 7e3737b2a1
299 changed files with 16313 additions and 1130 deletions

View File

@ -0,0 +1,184 @@
/**
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.yshop.framework.common.constant;
/**
* 商城统一常量
* @author hupeng
* @since 2020-02-27
*/
public interface ShopConstants {
/**
* 订单自动取消时间(分钟)
*/
long ORDER_OUTTIME_UNPAY = 30;
/**
* 订单自动收货时间(天)
*/
long ORDER_OUTTIME_UNCONFIRM = 7;
/**
* redis订单未付款key
*/
String REDIS_ORDER_OUTTIME_UNPAY = "order:unpay:";
/**
* redis订单收货key
*/
String REDIS_ORDER_OUTTIME_UNCONFIRM = "order:unconfirm:";
/**
* redis拼团key
*/
String REDIS_PINK_CANCEL_KEY = "pink:cancel:";
/**
* 微信支付service
*/
String YSHOP_WEIXIN_PAY_SERVICE = "yshop_weixin_pay_service";
/**
* 微信支付小程序service
*/
String YSHOP_WEIXIN_MINI_PAY_SERVICE = "yshop_weixin_mini_pay_service";
/**
* 微信支付app service
*/
String YSHOP_WEIXIN_APP_PAY_SERVICE = "yshop_weixin_app_pay_service";
/**
* 微信公众号service
*/
String YSHOP_WEIXIN_MP_SERVICE = "yshop_weixin_mp_service";
/**
* 微信小程序service
*/
String YSHOP_WEIXIN_MA_SERVICE = "yshop_weixin_ma_service";
/**
* 商城默认密码
*/
String YSHOP_DEFAULT_PWD = "123456";
/**
* 商城默认注册图片
*/
String YSHOP_DEFAULT_AVATAR = "https://image.dayouqiantu.cn/5e79f6cfd33b6.png";
/**
* 腾讯地图地址解析
*/
String QQ_MAP_URL = "https://apis.map.qq.com/ws/geocoder/v1/";
/**
* redis首页键
*/
String YSHOP_REDIS_INDEX_KEY = "yshop:index_data";
/**
* 配置列表缓存
*/
String YSHOP_REDIS_CONFIG_DATAS = "yshop:config_datas";
/**
* 充值方案
*/
String YSHOP_RECHARGE_PRICE_WAYS = "yshop_recharge_price_ways";
/**
* 首页banner
*/
String YSHOP_HOME_BANNER = "yshop_home_banner";
/**
* 首页菜单
*/
String YSHOP_HOME_MENUS = "yshop_home_menus";
/**
* 首页滚动新闻
*/
String YSHOP_HOME_ROLL_NEWS = "yshop_home_roll_news";
/**
* 热门搜索
*/
String YSHOP_HOT_SEARCH = "yshop_hot_search";
/**
* 个人中心菜单
*/
String YSHOP_MY_MENUES = "yshop_my_menus";
/**
* 秒杀时间段
*/
String YSHOP_SECKILL_TIME = "yshop_seckill_time";
/**
* 签到天数
*/
String YSHOP_SIGN_DAY_NUM = "yshop_sign_day_num";
/**
* 打印机配置
*/
String YSHOP_ORDER_PRINT_COUNT = "order_print_count";
/**
* 飞蛾用户信息
*/
String YSHOP_FEI_E_USER = "fei_e_user";
/**
* 飞蛾用户密钥
*/
String YSHOP_FEI_E_UKEY= "fei_e_ukey";
/**
* 打印机配置
*/
String YSHOP_ORDER_PRINT_COUNT_DETAIL = "order_print_count_detail";
/**
* 短信验证码长度
*/
int YSHOP_SMS_SIZE = 6;
/**
* 短信缓存时间
*/
long YSHOP_SMS_REDIS_TIME = 600L;
//零标识
String YSHOP_ZERO = "0";
//业务标识标识
String YSHOP_ONE = "1";
//目前完成任务数量是3
int TASK_FINISH_COUNT = 3;
int YSHOP_ONE_NUM = 1;
String YSHOP_ORDER_CACHE_KEY = "yshop:order";
String YSHOP_ORDER_SALE_STATUS_KEY = "yshop:order:sale:status";
long YSHOP_ORDER_CACHE_TIME = 3600L;
String WECHAT_MENUS = "wechat_menus";
String YSHOP_EXPRESS_SERVICE = "yshop_express_service";
String YSHOP_REDIS_SYS_CITY_KEY = "yshop:city_list";
String YSHOP_REDIS_CITY_KEY = "yshop:city";
String YSHOP_APP_LOGIN_USER = "app-online-token:";
String YSHOP_WECHAT_PUSH_REMARK = "yshop为您服务";
String DEFAULT_UNI_H5_URL = "https://h5.yixiang.co";
String YSHOP_MINI_SESSION_KET = "yshop:session_key:";
/**公众号二维码*/
String WECHAT_FOLLOW_IMG="wechat_follow_img";
/**后台api地址*/
String ADMIN_API_URL="admin_api_url";
}

View File

@ -0,0 +1,57 @@
package co.yixiang.yshop.framework.common.constant;
public class SystemConfigConstants {
//地址配置
public final static String API="api";
public final static String API_URL="api_url";
public final static String SITE_URL="site_url";
public final static String UNI_SITE_URL="uni_site_url";
public final static String TENGXUN_MAP_KEY="tengxun_map_key";
public final static String FILE_STORE_MODE="file_store_mode";
//业务相关配置
public final static String IMAGEARR="imageArr";
public final static String INTERGRAL_FULL="integral_full";
public final static String INTERGRAL_MAX="integral_max";
public final static String INTERGRAL_RATIO="integral_ratio";
public final static String ORDER_CANCEL_JOB_TIME="order_cancel_job_time";
public final static String STORE_BROKERAGE_OPEN="store_brokerage_open";
public final static String STORE_BROKERAGE_RATIO="store_brokerage_ratio";
public final static String STORE_BROKERAGE_STATU="store_brokerage_statu";
public final static String STORE_BROKERAGE_TWO="store_brokerage_two";
public final static String STORE_FREE_POSTAGE="store_free_postage";
public final static String STORE_POSTAGE="store_postage";
public final static String STORE_SEFL_MENTION="store_self_mention";
public final static String STORE_USER_MIN_RECHARGE="store_user_min_recharge";
public final static String USER_EXTRACT_MIN_PRICE="user_extract_min_price";
public final static String YSHOP_SHOW_RECHARGE = "yshop_show_recharge";
//微信相关配置
public final static String WECHAT_APPID="wechat_appid";
public final static String WECHAT_APPSECRET="wechat_appsecret";
public final static String WECHAT_AVATAR="wechat_avatar";
public final static String WECHAT_ENCODE="wechat_encode";
public final static String WECHAT_ENCODINGAESKEY="wechat_encodingaeskey";
public final static String WECHAT_ID="wechat_id";
public final static String WECHAT_NAME="wechat_name";
public final static String WECHAT_QRCODE="wechat_qrcode";
public final static String WECHAT_SHARE_IMG="wechat_share_img";
public final static String WECHAT_SHARE_SYNOPSIS="wechat_share_synopsis";
public final static String WECHAT_SHARE_TITLE="wechat_share_title";
public final static String WECHAT_SOURCEID="wechat_sourceid";
public final static String WECHAT_TOKEN="wechat_token";
public final static String WECHAT_MA_TOKEN="wechat_ma_token";
public final static String WECHAT_MA_ENCODINGAESKEY="wechat_ma_encodingaeskey";
public final static String WECHAT_TYPE="wechat_type";
public final static String WXAPP_APPID="wxapp_appId";
public final static String WXAPP_SECRET="wxapp_secret";
public final static String WXPAY_APPID="wxpay_appId";
public final static String WXPAY_KEYPATH="wxpay_keyPath";
public final static String WXPAY_MCHID="wxpay_mchId";
public final static String WXPAY_MCHKEY="wxpay_mchKey";
public final static String WX_NATIVE_APP_APPID="wx_native_app_appId";
public final static String EXP_APPID = "exp_appId";
//播放状态变化事件detail = {code}
public static final String BINDSTATECHANGE = "bindstatechange";
}

View File

@ -0,0 +1,72 @@
/**
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.yshop.framework.common.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.stream.Stream;
/**
* @author hupeng
* 订单相关枚举
*/
@Getter
@AllArgsConstructor
public enum OrderInfoEnum {
STATUS_NE1(-1,"申请退款"),
STATUS_NE2(-2,"退款成功"),
STATUS_0(0,"默认"),
STATUS_1(1,"待收货"),
STATUS_2(2,"已收货"),
STATUS_3(3,"已完成"),
PAY_STATUS_0(0,"未支付"),
PAY_STATUS_1(1,"已支付"),
REFUND_STATUS_0(0,"正常"),
REFUND_STATUS_1(1,"退款中"),
REFUND_STATUS_2(2,"已退款"),
BARGAIN_STATUS_1(1,"参与中"),
BARGAIN_STATUS_2(2,"参与失败"),
BARGAIN_STATUS_3(3,"参与成功"),
PINK_STATUS_1(1,"进行中"),
PINK_STATUS_2(2,"已完成"),
PINK_STATUS_3(3,"未完成"),
PINK_REFUND_STATUS_0(0,"拼团正常"),
PINK_REFUND_STATUS_1(1,"拼团已退款"),
CANCEL_STATUS_0(0,"正常"),
CANCEL_STATUS_1(1,"已取消"),
CONFIRM_STATUS_0(0,"正常"),
CONFIRM_STATUS_1(1,"确认"),
PAY_CHANNEL_0(0,"公众号/H5支付渠道"),
PAY_CHANNEL_1(1,"小程序支付渠道"),
SHIPPIING_TYPE_1(1,"快递"),
SHIPPIING_TYPE_2(2,"门店自提");
private Integer value;
private String desc;
public static OrderInfoEnum toType(int value) {
return Stream.of(OrderInfoEnum.values())
.filter(p -> p.value == value)
.findAny()
.orElse(null);
}
}

View File

@ -0,0 +1,45 @@
/**
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/
package co.yixiang.yshop.framework.common.params;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
@Data
@Schema(description = "用户 APP - 查询参数对象")
public abstract class QueryParam implements Serializable{
private static final long serialVersionUID = -3263921252635611410L;
@Schema(description = "页码,默认为1", required = true)
private Integer page =1;
@Schema(description = "页大小,默认为10", required = true)
private Integer limit = 10;
@Schema(description = "搜索字符串", required = true)
private String keyword;
// @Schema(description = "当前第几页", required = true)
// public void setCurrent(Integer current) {
// if (current == null || current <= 0){
// this.page = 1;
// }else{
// this.page = current;
// }
// }
//
// public void setSize(Integer size) {
// if (size == null || size <= 0){
// this.limit = 10;
// }else{
// this.limit = size;
// }
// }
}

View File

@ -0,0 +1,28 @@
package co.yixiang.yshop.framework.common.serializer;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import java.io.IOException;
import java.math.BigDecimal;
import java.text.DecimalFormat;
/**
* @author LionCity
* @date Created in 2020-05-30 14:12
* @description
* @modified By
* @version:
*/
public class BigDecimalSerializer extends JsonSerializer<BigDecimal> {
@Override
public void serialize(BigDecimal value, JsonGenerator gen, SerializerProvider serializerProvider) throws IOException {
if (value != null && !"".equals(value)) {
DecimalFormat df2 =new DecimalFormat("0.00");
gen.writeString(df2.format(value));
} else {
gen.writeString(value + "");
}
}
}

View File

@ -0,0 +1,27 @@
package co.yixiang.yshop.framework.common.serializer;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import java.io.IOException;
import java.text.DecimalFormat;
/**
* @author LionCity
* @date Created in 2020-05-30 14:12
* @description
* @modified By
* @version:
*/
public class DoubleSerializer extends JsonSerializer<Double> {
@Override
public void serialize(Double value, JsonGenerator gen, SerializerProvider serializerProvider) throws IOException {
if (value != null && !"".equals(value)) {
DecimalFormat df2 =new DecimalFormat("0.00");
gen.writeString(df2.format(value));
} else {
gen.writeString(value + "");
}
}
}