Commit d2cbb35d authored by 秦兴亮's avatar 秦兴亮

Merge branch 'dev' of https://gitlab.33.cn/yimu/mall-server into dev

# Conflicts: # mall-server-front/src/main/java/com/fzm/mall/server/front/order/service/impl/OrderServiceImpl.java
parents e55c7c94 f4c17f62
......@@ -97,7 +97,7 @@ public class SmsController {
switch (Objects.requireNonNull(CodeTypeEnum.getByType(type))) {
case REGISTER:
// templateId = "SMS_226745226";
templateId = AliSmsUtils.tempId;
templateId = AliSmsUtils.MERCHANT_REGISTER;
redisKey = MALLGlobalConfig.PHONE_CODE_MERCHANT_REGISTER_REDIS_KEY_SUFFIX;
break;
case SEARCH:
......@@ -106,12 +106,12 @@ public class SmsController {
break;
case REPAIR_PWD:
// templateId = "SMS_226745226";
templateId = AliSmsUtils.tempId;
templateId = AliSmsUtils.REPAIR_PWD;
redisKey = MALLGlobalConfig.PHONE_CODE_REPAIR_PWD_REDIS_KEY_SUFFIX;
break;
case AUTHENTICATION:
// templateId = "SMS_226745226";
templateId = AliSmsUtils.tempId;
templateId = AliSmsUtils.RESET_PWD;
redisKey = MALLGlobalConfig.PHONE_CODE_IDENTITY_REDIS_KEY_SUFFIX;
break;
}
......
......@@ -71,7 +71,6 @@ public class GoodsEditDTO {
private String returnReason;
@ApiModelProperty("商品备注")
@NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
private String note;
@ApiModelProperty("溯源信息")
......
......@@ -76,7 +76,6 @@ public class GoodsRepublishUpdateDTO {
private String returnReason;
@ApiModelProperty("商品备注")
@NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
private String note;
@ApiModelProperty("溯源信息")
......
......@@ -84,7 +84,6 @@ public class GoodsSpuDTO {
private String returnReason;
@ApiModelProperty("商品备注")
@NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
private String note;
@ApiModelProperty("溯源信息")
......
......@@ -39,7 +39,7 @@ public class WeiXinProties {
"zw9dZrrb6bCcV5U4wfT8x+iQXWYXYPJbRx+5SFYOSZkKUrHVsgdLX+dDXsg88yuM\n" +
"UtSQ5NpWkCE1oULt9EfRAF1HyQ==";
@Getter
private static final String NOTIFY_URL = "https://testadminym.8n.cn/root/mall/wxpay/without/return";
private static final String NOTIFY_URL = "https://malladmin.inmvo.com/root/mall/wxpay/without/return";
@Getter
private static final String WEIXINPAY_URL = "https://api.mch.weixin.qq.com/v3/pay/transactions/jsapi";//微信jsapi下单地址
@Getter
......@@ -52,5 +52,5 @@ public class WeiXinProties {
* 退款通知
*/
@Getter
private static final String REFUND_NOTIFY_URL = "http://server.hongrenlian.cn/root/malladmin/wxpay/refund/return";
private static final String REFUND_NOTIFY_URL = "https://malladmin.inmvo.com/root/malladmin/wxpay/refund/return";
}
......@@ -36,8 +36,6 @@ public class AliSmsUtils {
// 重置密码
public static String RESET_PWD = "SMS_225125100";
public static String tempId = "SMS_226745226";
public static boolean sendCode(String mobile, String code, String tplId, boolean isMsg) {
//设置超时时间-可自行调整
System.setProperty("sun.net.client.defaultConnectTimeout", "10000");
......@@ -46,8 +44,8 @@ public class AliSmsUtils {
final String product = "Dysmsapi";//短信API产品名称(短信产品名固定,无需修改)
final String domain = "dysmsapi.aliyuncs.com";//短信API产品域名(接口地址固定,无需修改)
//替换成你的AK
final String accessKeyId = "LTAI5tD9SPnwKjaAzywQEvde";//你的accessKeyId,参考本文档步骤2+
final String accessKeySecret = "Mm1R0sVS10IrRBsNIEvJpLQRj4tOjj";//你的accessKeySecret,参考本文档步骤2
final String accessKeyId = "LTAI5tKnkYvSprbF26n7FZN3";//你的accessKeyId,参考本文档步骤2+
final String accessKeySecret = "kxJfWPa03WSTBsRvj7n2bYeBsdWBgY";//你的accessKeySecret,参考本文档步骤2
//初始化ascClient,暂时不支持多region(请勿修改)
IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", accessKeyId,
accessKeySecret);
......@@ -66,7 +64,7 @@ public class AliSmsUtils {
//必填:待发送手机号。支持以逗号分隔的形式进行批量调用,批量上限为1000个手机号码,批量调用相对于单条调用及时性稍有延迟,验证码类型的短信推荐使用单条调用的方式;发送国际/港澳台消息时,接收号码格式为国际区号+号码,如“85200000000”
request.setPhoneNumbers(mobile);
//必填:短信签名-可在短信控制台中找到
request.setSignName("浙娱");
request.setSignName("一幕影链");
//必填:短信模板-可在短信控制台中找到,发送国际/港澳台消息时,请使用国际/港澳台短信模版
request.setTemplateCode(tplId);
//可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为
......
......@@ -134,7 +134,7 @@ public interface UserAssetMapper extends BaseMapper<UserAsset> {
@Select("select count(*) from user_asset where uid = #{uid} and amount >0 and coin != 'BASE' ")
Integer getCount(@Param("uid") String uid);
@Select("select IFNULL(sum(a.amount * b.original_price),0) from user_asset a left join goods_sku b on a.goods_coin = b.coin_name where a.uid = #{uid} and a.amount > 0 and a.goods_coin != #{mallCoin}")
@Select("select IFNULL(sum(a.amount * b.original_price),0) from user_asset a left join goods_sku b on a.goods_coin = b.coin_name where a.uid = #{uid} and a.amount > 0 and a.coin != #{mallCoin}")
BigDecimal getAllNotMallCoin(@Param("uid") String uid,@Param("mallCoin") String mallCoin);
@Update("update user_asset set amount = amount + #{amount} where id = #{id}")
......
......@@ -4,11 +4,9 @@ import com.fzm.mall.server.front.asset.model.vo.good.GoodSkuVO;
import com.fzm.mall.server.front.asset.model.vo.good.GoodSpuVO;
import com.fzm.mall.server.front.goods.model.GoodSku;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fzm.mall.server.front.goods.model.vo.SaleHotVo;
import com.fzm.mall.server.front.goods.model.vo.SkuVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.*;
import java.util.List;
......@@ -20,6 +18,7 @@ import java.util.List;
* @author tdz
* @since 2021-03-02
*/
@Mapper
public interface GoodSkuMapper extends BaseMapper<GoodSku> {
/**
* 通过币种查询编号
......@@ -83,4 +82,6 @@ public interface GoodSkuMapper extends BaseMapper<GoodSku> {
@Select("select name from goods_spu where goods_id = #{goodsId}")
String getGoodsName(@Param("goodsId") String goodsId);
SaleHotVo count(String goodsId);
}
......@@ -33,4 +33,10 @@ public class SaleHotVo {
@ApiModelProperty(value = "子类目id")
private String categoryId;
@ApiModelProperty(value = "商品库存总量")
private Integer stockCount;
@ApiModelProperty(value = "商品发行量总量")
private Integer circulationCount;
}
......@@ -2,6 +2,7 @@ package com.fzm.mall.server.front.goods.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.fzm.mall.server.front.goods.mapper.GoodSkuMapper;
import com.fzm.mall.server.front.goods.model.Category;
import com.fzm.mall.server.front.goods.model.OprationFloorGoods;
import com.fzm.mall.server.front.goods.mapper.OprationFloorGoodsMapper;
......@@ -33,6 +34,9 @@ public class OprationFloorGoodsServiceImpl extends ServiceImpl<OprationFloorGood
private OprationFloorGoodsMapper oprationFloorGoodsMapper;
@Autowired
private GoodSkuMapper goodSkuMapper;
@Autowired
private ICategoryService categoryService;
@Override
......@@ -49,6 +53,10 @@ public class OprationFloorGoodsServiceImpl extends ServiceImpl<OprationFloorGood
if(category!=null){
i.setCategoryName(category.getName());
}
SaleHotVo countResult = goodSkuMapper.count(i.getGoodsId());
i.setStockCount(countResult.getStockCount());
i.setCirculationCount(countResult.getCirculationCount());
}
}
return list;
......
......@@ -45,7 +45,7 @@ public class WeiXinProties {
"zw9dZrrb6bCcV5U4wfT8x+iQXWYXYPJbRx+5SFYOSZkKUrHVsgdLX+dDXsg88yuM\n" +
"UtSQ5NpWkCE1oULt9EfRAF1HyQ==";
@Getter
private static final String NOTIFY_URL = "https://testym.8n.cn/root/mall/wxpay/without/return";
private static final String NOTIFY_URL = "https://mall.inmvo.com/root/mall/wxpay/without/return";
@Getter
private static final String WEIXINPAY_URL = "https://api.mch.weixin.qq.com/v3/pay/transactions/jsapi";//微信jsapi下单地址
@Getter
......
......@@ -1186,7 +1186,6 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
Collections.sort(serialNoList);
skuService.updateSerialNo(JSON.toJSONString(serialNoList),skuVo.getCommodityPassId());
}
}
}
......
......@@ -2,4 +2,9 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fzm.mall.server.front.goods.mapper.GoodSkuMapper">
<select id="count" resultType="com.fzm.mall.server.front.goods.model.vo.SaleHotVo">
select sum(stock) as stockCount, sum(circulation) as circulationCount
from goods_sku
where goods_id = #{goodsId}
</select>
</mapper>
......@@ -2514,12 +2514,13 @@ CREATE TABLE `goods_sku_usufruct` (
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='使用权';
ADD COLUMN `param` varchar(500) NOT NULL DEFAULT '' COMMENT '功能区跳转参数';
ALTER TABLE `order_detail`
ADD COLUMN `serial_no` JSON NULL DEFAULT NULL COMMENT '序列号' ;
ALTER TABLE `user_asset`
ADD COLUMN `goods_coin` VARCHAR(32) NOT NULL DEFAULT '0' COMMENT '商品coin' ;
update user_asset set goods_coin = coin;
\ No newline at end of file
update user_asset set goods_coin = coin;
ALTER TABLE `user_asset_record` ADD COLUMN `goods_coin` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '商品coin';
\ 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