Merge #97 into master from cc_20260414_store
feat:bug处理 * cc_20260414_store: (6 commits squashed) - feat:省市区 - feat:设备接口 - feat:设备接口 - feat:获取门店设备列表 get->post - feat:异常处理 - feat:bug处理 Signed-off-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/97
This commit is contained in:
@@ -12,6 +12,7 @@ import org.apache.commons.collections4.CollectionUtils;
|
|||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
import tk.mybatis.mapper.entity.Example;
|
import tk.mybatis.mapper.entity.Example;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@@ -44,6 +45,9 @@ public class StoreTypeOptionDAO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<StoreTypeOptionDO> selectByIds(List<Long> optionIds,Long storeTypeId){
|
public List<StoreTypeOptionDO> selectByIds(List<Long> optionIds,Long storeTypeId){
|
||||||
|
if (storeTypeId==null||CollectionUtils.isEmpty(optionIds)){
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
Example example = new Example(StoreTypeOptionDO.class);
|
Example example = new Example(StoreTypeOptionDO.class);
|
||||||
example.createCriteria().andIn("optionId", optionIds).andEqualTo("storeTypeId",storeTypeId);
|
example.createCriteria().andIn("optionId", optionIds).andEqualTo("storeTypeId",storeTypeId);
|
||||||
return mapper.selectByExample(example);
|
return mapper.selectByExample(example);
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author suzhuhong
|
* @Author suzhuhong
|
||||||
@@ -38,7 +40,7 @@ public class StoreXinFaDeviceDetail {
|
|||||||
/**
|
/**
|
||||||
* 设备连接状态 0:未连接 1:已连接
|
* 设备连接状态 0:未连接 1:已连接
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "设备连接状态 false:未连接 true:已连接")
|
@ApiModelProperty(value = "设备连接状态未连接 1:已连接")
|
||||||
private Boolean isConnect;
|
private Boolean isConnect;
|
||||||
|
|
||||||
@ApiModelProperty(value = "授权码")
|
@ApiModelProperty(value = "授权码")
|
||||||
@@ -68,6 +70,201 @@ public class StoreXinFaDeviceDetail {
|
|||||||
@ApiModelProperty(value = "内用内存小于300M 或者 浏览器版本小于60")
|
@ApiModelProperty(value = "内用内存小于300M 或者 浏览器版本小于60")
|
||||||
private Boolean flag;
|
private Boolean flag;
|
||||||
|
|
||||||
|
@ApiModelProperty("应用版本")
|
||||||
|
private String appVersion;
|
||||||
|
|
||||||
|
@ApiModelProperty("屏幕角度")
|
||||||
|
private String screenAngle;
|
||||||
|
|
||||||
|
@ApiModelProperty("分类ID")
|
||||||
|
private Long classifyId;
|
||||||
|
|
||||||
|
@ApiModelProperty("点位名称")
|
||||||
|
private String pointName;
|
||||||
|
|
||||||
|
@ApiModelProperty("渠道")
|
||||||
|
private Integer channel;
|
||||||
|
|
||||||
|
@ApiModelProperty("类型")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
@ApiModelProperty("商户名称")
|
||||||
|
private String merchantName;
|
||||||
|
|
||||||
|
@ApiModelProperty("销售人ID")
|
||||||
|
private Long sellerId;
|
||||||
|
|
||||||
|
@ApiModelProperty("客户端类型")
|
||||||
|
private String clientType;
|
||||||
|
|
||||||
|
@ApiModelProperty("管理信息")
|
||||||
|
private String manageInfo;
|
||||||
|
|
||||||
|
@ApiModelProperty("节目名称")
|
||||||
|
private String programName;
|
||||||
|
|
||||||
|
@ApiModelProperty("型号")
|
||||||
|
private String model;
|
||||||
|
|
||||||
|
// @ApiModelProperty("标签")
|
||||||
|
// private List<String> tag;
|
||||||
|
|
||||||
|
@ApiModelProperty("品牌")
|
||||||
|
private String brand;
|
||||||
|
|
||||||
|
@ApiModelProperty("屏幕点位")
|
||||||
|
private Integer screenPoint;
|
||||||
|
|
||||||
|
@ApiModelProperty("是否子终端")
|
||||||
|
private Boolean isChildTerminal;
|
||||||
|
|
||||||
|
@ApiModelProperty("序列号")
|
||||||
|
private String serialNum;
|
||||||
|
|
||||||
|
@ApiModelProperty("签到时间")
|
||||||
|
private String signTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("IP地址")
|
||||||
|
private String ip;
|
||||||
|
|
||||||
|
@ApiModelProperty("CPU")
|
||||||
|
private String cpu;
|
||||||
|
|
||||||
|
@ApiModelProperty("是否激活")
|
||||||
|
private Boolean active;
|
||||||
|
|
||||||
|
@ApiModelProperty("激活时间")
|
||||||
|
private String activateTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("时区")
|
||||||
|
private String timeZone;
|
||||||
|
|
||||||
|
@ApiModelProperty("空闲容量")
|
||||||
|
private String freeCapacity;
|
||||||
|
|
||||||
|
@ApiModelProperty("设备信息")
|
||||||
|
private String deviceInfo;
|
||||||
|
|
||||||
|
@ApiModelProperty("使用状态")
|
||||||
|
private Integer useStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty("POS X坐标")
|
||||||
|
private Integer posX;
|
||||||
|
|
||||||
|
@ApiModelProperty("POS Y坐标")
|
||||||
|
private Integer posY;
|
||||||
|
|
||||||
|
@ApiModelProperty("授权信息")
|
||||||
|
private License license;
|
||||||
|
|
||||||
|
@ApiModelProperty("门店容量")
|
||||||
|
private String storeCapacity;
|
||||||
|
|
||||||
|
@ApiModelProperty("尺寸")
|
||||||
|
private String size;
|
||||||
|
|
||||||
|
@ApiModelProperty("图片模式")
|
||||||
|
private String imgMode;
|
||||||
|
|
||||||
|
@ApiModelProperty("设备唯一ID")
|
||||||
|
private String deviceUId;
|
||||||
|
|
||||||
|
@ApiModelProperty("设备")
|
||||||
|
private String device;
|
||||||
|
|
||||||
|
// @ApiModelProperty("标签ID列表")
|
||||||
|
// private List<String> tagIdList;
|
||||||
|
|
||||||
|
@ApiModelProperty("最后更新时间")
|
||||||
|
private String lastUpdateTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("日志类型")
|
||||||
|
private String logType;
|
||||||
|
|
||||||
|
@ApiModelProperty("编码")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
@ApiModelProperty("是否连接")
|
||||||
|
private Boolean connect;
|
||||||
|
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端ID")
|
||||||
|
private Long terminalId;
|
||||||
|
|
||||||
|
@ApiModelProperty("视频模式")
|
||||||
|
private String videoMode;
|
||||||
|
|
||||||
|
@ApiModelProperty("MAC地址")
|
||||||
|
private String mac;
|
||||||
|
|
||||||
|
@ApiModelProperty("制造商")
|
||||||
|
private String manufacturer;
|
||||||
|
|
||||||
|
@ApiModelProperty("H5版本")
|
||||||
|
private String h5Version;
|
||||||
|
|
||||||
|
@ApiModelProperty("是否删除")
|
||||||
|
private Boolean isDeleted;
|
||||||
|
|
||||||
|
@ApiModelProperty("操作系统版本")
|
||||||
|
private String osVersion;
|
||||||
|
|
||||||
|
@ApiModelProperty("点位ID")
|
||||||
|
private Long pointId;
|
||||||
|
|
||||||
|
@ApiModelProperty("行数")
|
||||||
|
private Integer rowCount;
|
||||||
|
|
||||||
|
@ApiModelProperty("DPI")
|
||||||
|
private String dpi;
|
||||||
|
|
||||||
|
@ApiModelProperty("渠道ID")
|
||||||
|
private Long channelId;
|
||||||
|
|
||||||
|
@ApiModelProperty("方向")
|
||||||
|
private String orientation;
|
||||||
|
|
||||||
|
@ApiModelProperty("创建时间")
|
||||||
|
private String createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("操作系统")
|
||||||
|
private String os;
|
||||||
|
|
||||||
|
@ApiModelProperty("切换配置")
|
||||||
|
private String switchConfig;
|
||||||
|
|
||||||
|
@ApiModelProperty("浏览器内核")
|
||||||
|
private String browserKernel;
|
||||||
|
|
||||||
|
@ApiModelProperty("更新时间")
|
||||||
|
private String updateTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("点位编号")
|
||||||
|
private String pointNo;
|
||||||
|
|
||||||
|
@ApiModelProperty("Token")
|
||||||
|
private String token;
|
||||||
|
|
||||||
|
@ApiModelProperty("删除")
|
||||||
|
private Boolean deleted;
|
||||||
|
|
||||||
|
@ApiModelProperty("列数")
|
||||||
|
private Integer colCount;
|
||||||
|
|
||||||
|
@ApiModelProperty("链接类型")
|
||||||
|
private String linkType;
|
||||||
|
|
||||||
|
@ApiModelProperty("渠道名称")
|
||||||
|
private String channelName;
|
||||||
|
|
||||||
|
@ApiModelProperty("操作")
|
||||||
|
private List<String> operation;
|
||||||
|
|
||||||
|
@ApiModelProperty("节目ID")
|
||||||
|
private Long programId;
|
||||||
|
|
||||||
public boolean getFlag() {
|
public boolean getFlag() {
|
||||||
if (StringUtil.isEmpty(availRam)||StringUtil.isEmpty(userAgent)){
|
if (StringUtil.isEmpty(availRam)||StringUtil.isEmpty(userAgent)){
|
||||||
return false;
|
return false;
|
||||||
@@ -88,4 +285,22 @@ public class StoreXinFaDeviceDetail {
|
|||||||
public String getDeviceId() {
|
public String getDeviceId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 授权信息内部类
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public static class License {
|
||||||
|
@ApiModelProperty("开始时间")
|
||||||
|
private String startTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("结束时间")
|
||||||
|
private String endTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("授权ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("状态")
|
||||||
|
private Integer status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.cool.store.request;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther zx_szh
|
||||||
|
* @Date 2026/4/14 15:00
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class StoreNumRequest {
|
||||||
|
|
||||||
|
@ApiModelProperty("门店编码")
|
||||||
|
private String storeNum;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -571,6 +571,9 @@ public class StoreServiceImpl implements StoreService {
|
|||||||
dto.setBrand(FranchiseBrandEnum.getDescByCode(store.getJoinBrand()));
|
dto.setBrand(FranchiseBrandEnum.getDescByCode(store.getJoinBrand()));
|
||||||
dto.setOrderMiniProgramName(store.getMiniProgramOrderStoreName());
|
dto.setOrderMiniProgramName(store.getMiniProgramOrderStoreName());
|
||||||
dto.setStatus(StoreStatusEnum.getName(store.getStoreStatus()));
|
dto.setStatus(StoreStatusEnum.getName(store.getStoreStatus()));
|
||||||
|
dto.setCity(store.getCity());
|
||||||
|
dto.setProvince(store.getProvince());
|
||||||
|
dto.setCity(store.getCity());
|
||||||
if (store.getRegionId() != null){
|
if (store.getRegionId() != null){
|
||||||
dto.setRegionId(store.getRegionId());
|
dto.setRegionId(store.getRegionId());
|
||||||
dto.setManagerSupervisionName(regionMap.get(store.getRegionId()));
|
dto.setManagerSupervisionName(regionMap.get(store.getRegionId()));
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
package com.cool.store.service.impl.xinfa;
|
package com.cool.store.service.impl.xinfa;
|
||||||
|
|
||||||
import com.cool.store.dto.huoma.*;
|
import com.cool.store.dto.huoma.*;
|
||||||
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
import com.cool.store.enums.SpecialTagEnum;
|
import com.cool.store.enums.SpecialTagEnum;
|
||||||
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.response.ResponseResult;
|
import com.cool.store.response.ResponseResult;
|
||||||
import com.cool.store.service.xinfa.XinFaBusinessService;
|
import com.cool.store.service.xinfa.XinFaBusinessService;
|
||||||
import com.cool.store.service.xinfa.XinFaDeviceService;
|
import com.cool.store.service.xinfa.XinFaDeviceService;
|
||||||
|
import com.cool.store.utils.poi.StringUtils;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@@ -27,6 +30,9 @@ public class XinFaBusinessServiceImpl implements XinFaBusinessService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<StoreXinFaDeviceDetail> getStoreXinFaDeviceDetail(String storeNum) {
|
public List<StoreXinFaDeviceDetail> getStoreXinFaDeviceDetail(String storeNum) {
|
||||||
|
if (StringUtils.isEmpty(storeNum)){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||||
|
}
|
||||||
return xinFaDeviceService.getStoreXinFaDeviceDetail(storeNum);
|
return xinFaDeviceService.getStoreXinFaDeviceDetail(storeNum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.cool.store.service.order.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.util.PageUtil;
|
import cn.hutool.core.util.PageUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.cool.store.constants.CommonConstants;
|
||||||
import com.cool.store.constants.RedisConstant;
|
import com.cool.store.constants.RedisConstant;
|
||||||
import com.cool.store.context.LoginUserInfo;
|
import com.cool.store.context.LoginUserInfo;
|
||||||
import com.cool.store.dao.*;
|
import com.cool.store.dao.*;
|
||||||
@@ -74,6 +75,7 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@@ -129,6 +131,8 @@ public class MiniStoreOrderServiceImpl implements MiniStoreOrderService {
|
|||||||
private final FranchiseFeeMapper franchiseFeeMapper;
|
private final FranchiseFeeMapper franchiseFeeMapper;
|
||||||
private final PushService pushService;
|
private final PushService pushService;
|
||||||
private final StoreOrderOptionSnapshotDAO storeOrderOptionSnapshotDAO;
|
private final StoreOrderOptionSnapshotDAO storeOrderOptionSnapshotDAO;
|
||||||
|
@Value("${spring.profiles.active}")
|
||||||
|
private String active;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -2042,8 +2046,11 @@ public class MiniStoreOrderServiceImpl implements MiniStoreOrderService {
|
|||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Boolean isOnline = active.equals(CommonConstants.HD_ENV) || active.equals(CommonConstants.ONLINE_ENV);
|
||||||
|
Long tableId = isOnline ? 38L : 32L;
|
||||||
|
|
||||||
// 获取费用类型字典映射(费用名称)
|
// 获取费用类型字典映射(费用名称)
|
||||||
Map<String, String> expenseTypeNameMap = buildDictNameMap(32L);
|
Map<String, String> expenseTypeNameMap = buildDictNameMap(tableId);
|
||||||
|
|
||||||
// 获取配置大类名称映射
|
// 获取配置大类名称映射
|
||||||
Set<String> categoryCodeSet = snapshotList.stream()
|
Set<String> categoryCodeSet = snapshotList.stream()
|
||||||
|
|||||||
@@ -316,7 +316,7 @@ public class XinFaDeviceService {
|
|||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
log.error("getStoreXinFaDeviceDetailByPointId解析获取data失败,url:{},responseBody:{}",huoMaTokenUrl, responseBody);
|
log.error("getStoreXinFaDeviceDetailByPointId解析获取data失败,url:{},responseBody:{},exception:{}",huoMaTokenUrl, responseBody,e.getMessage());
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.cool.store.controller.webb;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.cool.store.annotation.Debounce;
|
import com.cool.store.annotation.Debounce;
|
||||||
import com.cool.store.dto.*;
|
import com.cool.store.dto.*;
|
||||||
|
import com.cool.store.dto.huoma.StoreXinFaDeviceDetail;
|
||||||
import com.cool.store.dto.region.BigRegionDTO;
|
import com.cool.store.dto.region.BigRegionDTO;
|
||||||
import com.cool.store.dto.store.StoreUserPositionDTO;
|
import com.cool.store.dto.store.StoreUserPositionDTO;
|
||||||
import com.cool.store.dto.wallet.PaymentDTO;
|
import com.cool.store.dto.wallet.PaymentDTO;
|
||||||
@@ -31,6 +32,8 @@ import com.cool.store.response.bigdata.ApiResponse;
|
|||||||
import com.cool.store.service.*;
|
import com.cool.store.service.*;
|
||||||
import com.cool.store.service.privatesphere.PrivateSphereQrService;
|
import com.cool.store.service.privatesphere.PrivateSphereQrService;
|
||||||
import com.cool.store.service.wallet.WalletService;
|
import com.cool.store.service.wallet.WalletService;
|
||||||
|
import com.cool.store.service.xinfa.XinFaBusinessService;
|
||||||
|
import com.cool.store.service.xinfa.XinFaDeviceService;
|
||||||
import com.cool.store.utils.HttpHelper;
|
import com.cool.store.utils.HttpHelper;
|
||||||
import com.cool.store.utils.poi.StringUtils;
|
import com.cool.store.utils.poi.StringUtils;
|
||||||
import com.cool.store.service.close.CloseStoreService;
|
import com.cool.store.service.close.CloseStoreService;
|
||||||
@@ -88,6 +91,8 @@ public class OpenApiController {
|
|||||||
RegionService regionService;
|
RegionService regionService;
|
||||||
@Resource
|
@Resource
|
||||||
PrivateSphereQrService privateSphereQrService;
|
PrivateSphereQrService privateSphereQrService;
|
||||||
|
@Resource
|
||||||
|
XinFaBusinessService xinFaBusinessService;
|
||||||
|
|
||||||
@PostMapping("/statusRefresh")
|
@PostMapping("/statusRefresh")
|
||||||
public ApiResponse<Boolean> statusRefresh(@RequestBody StatusRefreshDTO statusRefreshDTO){
|
public ApiResponse<Boolean> statusRefresh(@RequestBody StatusRefreshDTO statusRefreshDTO){
|
||||||
@@ -303,4 +308,11 @@ public class OpenApiController {
|
|||||||
request.setClientIp(HttpHelper.getIpAddr(httpRequest));
|
request.setClientIp(HttpHelper.getIpAddr(httpRequest));
|
||||||
return ApiResponse.success(privateSphereQrService.getPrivateSphereQr(request));
|
return ApiResponse.success(privateSphereQrService.getPrivateSphereQr(request));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("获取门店设备列表")
|
||||||
|
@PostMapping("/getDeviceByStoreNum")
|
||||||
|
public ApiResponse<List<StoreXinFaDeviceDetail>> getStoreXinFaDeviceDetail(@RequestBody StoreNumRequest request) {
|
||||||
|
return ApiResponse.success(xinFaBusinessService.getStoreXinFaDeviceDetail(request.getStoreNum()));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user