Merge remote-tracking branch 'origin/cc_20240605_fix' into cc_20240603_wantarea_bigregion
This commit is contained in:
@@ -8,4 +8,7 @@ import org.apache.ibatis.annotations.Param;
|
||||
public interface SystemBuildingShopMapper extends tk.mybatis.mapper.common.Mapper<SystemBuildingShopDO> {
|
||||
void updateAuditByShopId(@Param("auditId") Long auditId,
|
||||
@Param("shopId") Long shopId);
|
||||
|
||||
SystemBuildingShopDO selectByShopId(@Param("shopId") Long shopId);
|
||||
|
||||
}
|
||||
|
||||
@@ -13,5 +13,10 @@
|
||||
set audit_id = #{auditId}
|
||||
where shop_id = #{shopId}
|
||||
</update>
|
||||
<select id="selectByShopId" resultType="com.cool.store.entity.SystemBuildingShopDO">
|
||||
select * from xfsg_system_building_shop
|
||||
where shop_id = #{shopId};
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -140,6 +140,10 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
if (Objects.isNull(request.getShopId())) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_ID_NOT_EXIST);
|
||||
}
|
||||
SignFranchiseDO isExist = signFranchiseMapper.selectByShopId(request.getShopId());
|
||||
if (Objects.nonNull(isExist) && Objects.isNull(request.getId())){
|
||||
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||
}
|
||||
String lockKey = "submitSignFranchise:" + request.getShopId();
|
||||
//流水
|
||||
String lockValue = UUID.randomUUID().toString();
|
||||
|
||||
@@ -95,6 +95,10 @@ public class SysStoreAppServiceImpl implements SysStoreAppService, AuditResultSe
|
||||
if (Objects.isNull(request)) {
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||
}
|
||||
SystemBuildingShopDO isExist = systemBuildingShopMapper.selectByShopId(request.getShopId());
|
||||
if (Objects.nonNull(isExist) && Objects.isNull(request.getId())){
|
||||
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||
}
|
||||
String lockKey = "submitSysBuildStore:" + request.getShopId();
|
||||
String lockValue = UUID.randomUUID().toString();
|
||||
boolean acquired = false;
|
||||
|
||||
Reference in New Issue
Block a user