Merge branch 'master' into cc_20250723_Decoration
# Conflicts: # coolstore-partner-web/src/main/java/com/cool/store/controller/webb/OpenApiController.java
This commit is contained in:
@@ -28,6 +28,7 @@ public class OpenSignatureUtil {
|
||||
.filter(e -> !"appKey".equals(e.getKey()))
|
||||
.filter(e -> !"timestamp".equals(e.getKey()))
|
||||
.filter(e -> !"sign".equals(e.getKey()))
|
||||
.filter(e -> e.getValue() != null && !e.getValue().isEmpty())
|
||||
.collect(Collectors.toMap(
|
||||
Map.Entry::getKey,
|
||||
Map.Entry::getValue
|
||||
@@ -45,7 +46,7 @@ public class OpenSignatureUtil {
|
||||
// 3.2 添加固定参数(不参与排序)
|
||||
sb.append("appkey=").append(appKey)
|
||||
.append("×tamp=").append(timestamp);
|
||||
|
||||
log.info("待签名字符串:{}", sb);
|
||||
// 4. 生成签名
|
||||
return hmacSha256(sb.toString(), appSecret);
|
||||
}
|
||||
|
||||
@@ -76,5 +76,11 @@ public class StoreDao {
|
||||
return storeMapper.list();
|
||||
}
|
||||
|
||||
public List<StoreDO> getStoreNumByStoreCodes(List<String> storeCodeIds) {
|
||||
if(CollectionUtils.isEmpty(storeCodeIds)) {
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
return storeMapper.getStoreNumByStoreCodes(storeCodeIds);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -43,4 +43,6 @@ public interface StoreMapper {
|
||||
|
||||
List<StoreAreaDTO> getStoreAreaList( @Param("storeIds") List<String> storeIds);
|
||||
|
||||
List<StoreDO> getStoreNumByStoreCodes(@Param("storeCodeIds") List<String> storeCodeIds);
|
||||
|
||||
}
|
||||
|
||||
@@ -144,6 +144,15 @@
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="getStoreNumByStoreCodes" resultMap="BaseResultMap">
|
||||
select *
|
||||
from store_${enterpriseId}
|
||||
where is_delete = 'effective'
|
||||
<if test="storeCodeIds != null">
|
||||
<foreach collection="storeCodeIds" item="item" separator="," open="and store_num in (" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/7/23 9:24
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class StoreCodeDTO {
|
||||
private List<String> storeCodeList;
|
||||
}
|
||||
@@ -5,6 +5,8 @@ import com.cool.store.dto.store.StoreUserPositionDTO;
|
||||
import com.cool.store.response.MiniShopsResponse;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/5/13 9:56
|
||||
@@ -23,6 +25,6 @@ public interface StoreService {
|
||||
|
||||
PageInfo<MiniShopsResponse> getStoreListByMobile(String mobile,Integer pageNum,Integer pageSize,String storeName,String storeNum);
|
||||
|
||||
PageInfo<StoreUserPositionDTO> getStoreUser(Integer pageSize, Integer pageNum);
|
||||
List<StoreUserPositionDTO> getStoreUser(List<String> storeCodeList);
|
||||
|
||||
}
|
||||
|
||||
@@ -110,15 +110,13 @@ public class StoreServiceImpl implements StoreService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<StoreUserPositionDTO> getStoreUser(Integer pageSize, Integer pageNum) {
|
||||
if (pageSize>=100){
|
||||
public List<StoreUserPositionDTO> getStoreUser(List<String> storeCodeList) {
|
||||
if (CollectionUtils.isNotEmpty(storeCodeList)&&storeCodeList.size()>=100){
|
||||
throw new ServiceException(ErrorCodeEnum.ERROR_MESSAGE,"单次最多获取100条门店数据");
|
||||
}
|
||||
PageHelper.startPage(pageNum,pageSize);
|
||||
List<StoreDO> list = storeDao.list();
|
||||
PageInfo info = new PageInfo<>(list);
|
||||
List<StoreDO> list = storeDao.getStoreNumByStoreCodes(storeCodeList);
|
||||
if (CollectionUtils.isEmpty(list)){
|
||||
return info;
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<StoreUserPositionDTO> result = new ArrayList<>();
|
||||
list.forEach(x->{
|
||||
@@ -143,8 +141,7 @@ public class StoreServiceImpl implements StoreService {
|
||||
storeUserPositionDTO.setUserList(userList);
|
||||
result.add(storeUserPositionDTO);
|
||||
});
|
||||
info.setList(result);
|
||||
return info;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ public class SyncMainSysServerImpl implements SyncMainSysServer {
|
||||
BigRegionDO byRegionId = bigRegionDAO.getByRegionId(shopInfo.getRegionId());
|
||||
if (byRegionId != null) {
|
||||
requestBody.setStore_area(byRegionId.getStoreManageRegionId() == null
|
||||
? shopInfo.getRegionId().toString() : shopInfo.getManagerRegionId().toString());
|
||||
? shopInfo.getRegionId().toString() : byRegionId.getStoreManageRegionId().toString());
|
||||
} else {
|
||||
requestBody.setStore_area(shopInfo.getRegionId().toString());
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ public class OpenApiValidateFilter implements Filter {
|
||||
}
|
||||
MDC.put(CommonConstants.REQUEST_ID, UUIDUtils.get32UUID());
|
||||
//statusRefresh 放开不需要验签
|
||||
if(uri.startsWith("/zxjp/open/v1")){
|
||||
if(uri.startsWith("/zxjp/open/v1/statusRefresh")||uri.startsWith("/zxjp/open/v1/getStoreUser")){
|
||||
filterChain.doFilter(servletRequest, response);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.cool.store.controller.webb;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.dto.*;
|
||||
import com.cool.store.dto.store.StoreUserPositionDTO;
|
||||
import com.cool.store.request.OpenApiStoreRequest;
|
||||
import com.cool.store.request.StoreCodeDTO;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.request.xgj.FranchiseFeeCallBackRequest;
|
||||
import com.cool.store.request.xgj.ReceiptCallBackRequest;
|
||||
@@ -17,6 +19,7 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
@@ -75,8 +78,8 @@ public class OpenApiController {
|
||||
}
|
||||
@ApiOperation("获取门店人员信息")
|
||||
@PostMapping("/getStoreUser")
|
||||
public ApiResponse<PageInfo<StoreUserPositionDTO>> getStoreUser(@RequestBody @Validated OpenApiStoreRequest dto) {
|
||||
return ApiResponse.success(storeService.getStoreUser(dto.getPageSize(),dto.getPageNum()));
|
||||
public ApiResponse<List<StoreUserPositionDTO>> getStoreUser(@RequestBody @Validated StoreCodeDTO dto) {
|
||||
return ApiResponse.success(storeService.getStoreUser(dto.getStoreCodeList()));
|
||||
}
|
||||
@ApiOperation("分配测量员,设计组")
|
||||
@PostMapping("/assignSurveyors")
|
||||
|
||||
Reference in New Issue
Block a user