Merge remote-tracking branch 'origin/master'

This commit is contained in:
Tankaikai 2025-03-10 13:56:35 +08:00
commit c9b37c0c91
11 changed files with 33 additions and 26 deletions

View File

@ -5,6 +5,7 @@ import com.czg.account.service.ShopCouponService;
import com.czg.account.vo.UserCouponVo;
import com.czg.resp.CzgResult;
import com.czg.sa.StpKit;
import com.czg.utils.AssertUtil;
import com.mybatisflex.core.paginate.Page;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;
@ -44,6 +45,7 @@ public class UserShopCouponController {
*/
@GetMapping("/findCoupon")
public CzgResult<List<UserCouponVo>> findCoupon(@RequestHeader String shopId, @RequestParam Long shopUserId, @RequestParam(required = false) Integer type) {
AssertUtil.isBlank(shopId, "店铺Id不能为空");
return CzgResult.success(couponService.findCoupon(Long.parseLong(shopId), shopUserId, type));
}
}

View File

@ -32,11 +32,11 @@ dubbo:
registry:
address: nacos://121.40.109.122:8848 # Nacos 服务地址
group: server-dev
# namespace: 237e1905-0a66-4375-9bb6-a51c3c034aca
protocol:
port: 9101
threads: 20
# threadpool: fixed
name: dubbo
serialization: fastjson2
port: -1
seata:

View File

@ -33,11 +33,11 @@ dubbo:
registry:
address: nacos://121.40.109.122:8848 # Nacos 服务地址
group: server-test
namespace: 237e1905-0a66-4375-9bb6-a51c3c034aca
protocol:
port: 9101
threads: 20
threadpool: fixed
port: -1
name: dubbo
serialization: fastjson2

View File

@ -34,11 +34,11 @@ dubbo:
registry:
address: nacos://121.40.109.122:8848 # Nacos 服务地址
group: server-dev
namespace: 237e1905-0a66-4375-9bb6-a51c3c034aca
protocol:
port: 9201
port: -1
threads: 20
threadpool: fixed
name: dubbo
serialization: fastjson2
seata:
application-id: order-server

View File

@ -35,11 +35,11 @@ dubbo:
registry:
address: nacos://121.40.109.122:8848 # Nacos 服务地址
group: server-test
namespace: 237e1905-0a66-4375-9bb6-a51c3c034aca
protocol:
port: 9201
port: -1
threads: 20
threadpool: fixed
name: dubbo
serialization: hessian2
seata:

View File

@ -39,11 +39,11 @@ dubbo:
registry:
address: nacos://121.40.109.122:8848 # Nacos 服务地址
group: server-dev
namespace: 237e1905-0a66-4375-9bb6-a51c3c034aca
protocol:
port: 9301
port: -1
threads: 20
threadpool: fixed
name: dubbo
serialization: fastjson2
seata:
application-id: product-server

View File

@ -28,12 +28,11 @@ dubbo:
registry:
address: nacos://121.40.109.122:8848 # Nacos 服务地址
group: server-test
namespace: 237e1905-0a66-4375-9bb6-a51c3c034aca
protocol:
port: 9301
port: -1
threads: 20
threadpool: fixed
name: dubbo
serialization: fastjson2
seata:
application-id: product-server

View File

@ -34,11 +34,11 @@ dubbo:
registry:
address: nacos://121.40.109.122:8848 # Nacos 服务地址
group: server-dev
# namespace: 237e1905-0a66-4375-9bb6-a51c3c034aca
protocol:
port: 9401
port: -1
threads: 20
# threadpool: fixed
name: dubbo
serialization: fastjson2
seata:
application-id: system-server

View File

@ -34,11 +34,11 @@ dubbo:
registry:
address: nacos://121.40.109.122:8848 # Nacos 服务地址
group: server-test
namespace: 237e1905-0a66-4375-9bb6-a51c3c034aca
protocol:
port: 9401
port: -1
threads: 20
threadpool: fixed
name: dubbo
serialization: fastjson2
seata:

View File

@ -32,8 +32,13 @@ public class CommonServiceImpl implements CommonService {
if (StrUtil.isBlank(sysUser.getPhone())) {
throw new ApiNotPrintException("账号未绑定手机号");
}
String key = RedisCst.SMS_CODE + sysUser.getPhone() + ":" + type;
Object val = redisService.get(key);
if (val != null) {
throw new ApiNotPrintException("请勿频繁获取");
}
int code = RandomUtil.randomInt(100000, 1000000);
redisService.set(RedisCst.SMS_CODE + sysUser.getPhone() + ":" + type, code, 300);
redisService.set(key, code, 300);
smsService.sendCode(sysUser.getPhone(), String.valueOf(code));
return true;
}

View File

@ -159,6 +159,7 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
}
shopInfo.setOperationPwd(SecureUtil.md5(shopInfoEditDTO.getOperationPwd()));
redisService.del(key);
}
return updateById(shopInfo);
}