feat:信发
This commit is contained in:
@@ -0,0 +1,58 @@
|
|||||||
|
package com.cool.store.enums;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/11/5 16:03
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public enum SpecialTagEnum {
|
||||||
|
|
||||||
|
ELECTRONIC_PRICE_LIST("电子价目牌"),
|
||||||
|
ACTIVITY_CAROUSEL("活动轮播"),
|
||||||
|
ACTIVITY_PACKAGE("活动套餐"),
|
||||||
|
PROMOTIONAL_VIDEO("宣传视频");
|
||||||
|
|
||||||
|
private final String tagName;
|
||||||
|
|
||||||
|
SpecialTagEnum(String tagName) {
|
||||||
|
this.tagName = tagName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTagName() {
|
||||||
|
return tagName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据标签名称获取枚举值
|
||||||
|
*/
|
||||||
|
public static SpecialTagEnum fromTagName(String tagName) {
|
||||||
|
for (SpecialTagEnum tag : values()) {
|
||||||
|
if (tag.getTagName().equals(tagName)) {
|
||||||
|
return tag;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有标签名称列表
|
||||||
|
*/
|
||||||
|
public static List<String> getAllTagNames() {
|
||||||
|
return Arrays.stream(values())
|
||||||
|
.map(SpecialTagEnum::getTagName)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取电子价目牌标签名称
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static List<String> getElectronicPriceTagName() {
|
||||||
|
return Arrays.asList(ELECTRONIC_PRICE_LIST.getTagName());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
package com.cool.store.dto.huoma;
|
||||||
|
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/11/5 14:43
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ProgramReqDTO {
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "门店编码",required = true)
|
||||||
|
private String storeCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "设备名称",required = true)
|
||||||
|
@NotEmpty(message = "设备名称不能为空")
|
||||||
|
private String deviceName;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "第几页,",required = true)
|
||||||
|
private Integer index;
|
||||||
|
|
||||||
|
@ApiModelProperty(name ="每页数量",required = true)
|
||||||
|
private Integer size;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "时间",hidden = true)
|
||||||
|
private String date;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "排序",hidden = true)
|
||||||
|
private String sort;
|
||||||
|
|
||||||
|
@ApiModelProperty("标签id列表")
|
||||||
|
private List<Integer> tagIds;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.cool.store.dto.huoma;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/11/5 14:44
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
public class ProgramResponseDTO {
|
||||||
|
|
||||||
|
@ApiModelProperty("节目ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("节目名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty("节目缩略图")
|
||||||
|
private String thumbnail;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.cool.store.dto.huoma;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/11/5 17:06
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PublishDTO {
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "门店编号",required = true)
|
||||||
|
@NotEmpty(message = "门店编码不能为空")
|
||||||
|
private String storeCode;
|
||||||
|
@ApiModelProperty(name = "设备ID列表",required = true)
|
||||||
|
@NotEmpty(message = "设备ID列表不能为空")
|
||||||
|
private List<String> deviceIdList;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.cool.store.dto.huoma;
|
package com.cool.store.dto.huoma;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -8,10 +10,13 @@ import lombok.Data;
|
|||||||
* @Version 1.0
|
* @Version 1.0
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class TagDetailDTO {
|
public class TagDetailDTO {
|
||||||
|
|
||||||
|
@ApiModelProperty("标签Id")
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty("标签名称")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,67 @@
|
|||||||
|
package com.cool.store.service.impl.xinfa;
|
||||||
|
|
||||||
|
import com.cool.store.dto.huoma.*;
|
||||||
|
import com.cool.store.enums.SpecialTagEnum;
|
||||||
|
import com.cool.store.response.ResponseResult;
|
||||||
|
import com.cool.store.service.xinfa.XinFaBusinessService;
|
||||||
|
import com.cool.store.service.xinfa.XinFaDeviceService;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/11/5 16:17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class XinFaBusinessServiceImpl implements XinFaBusinessService {
|
||||||
|
@Resource
|
||||||
|
XinFaDeviceService xinFaDeviceService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<StoreXinFaDeviceDetail> getStoreXinFaDeviceDetail(String storeNum) {
|
||||||
|
return xinFaDeviceService.getStoreXinFaDeviceDetail(storeNum);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<TagDetailDTO> getAccountAllTags(String storeNum,String deviceName) {
|
||||||
|
//如果是广告机,不需要展示标签
|
||||||
|
if (deviceName.contains("广告机")){
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
List<TagDetailDTO> accountAllTags = xinFaDeviceService.getAccountAllTags(storeNum);
|
||||||
|
if (accountAllTags != null){
|
||||||
|
return accountAllTags.stream()
|
||||||
|
.filter(tag -> tag.getName() != null &&
|
||||||
|
SpecialTagEnum.getAllTagNames().contains(tag.getName()))
|
||||||
|
.sorted(Comparator.comparing(tag -> SpecialTagEnum.getAllTagNames().indexOf(tag.getName())))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ProgramResponseDTO> getProgramList(ProgramReqDTO programReqDTO) {
|
||||||
|
//如果没传tag 查所有 根据更新时间倒序排
|
||||||
|
programReqDTO.setSort("desc");
|
||||||
|
programReqDTO.setDate("updateTime");
|
||||||
|
if (CollectionUtils.isEmpty(programReqDTO.getTagIds())){
|
||||||
|
//设备名称包含 广告机 只查询电子价目表
|
||||||
|
programReqDTO.setTagIds(xinFaDeviceService.getAccountSpecialTagIds(programReqDTO.getStoreCode(), SpecialTagEnum.getElectronicPriceTagName()));
|
||||||
|
}
|
||||||
|
List<ProgramResponseDTO> programList = xinFaDeviceService.getProgramList(programReqDTO);
|
||||||
|
return programList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean publishProgram(PublishDTO publishDTO) {
|
||||||
|
return xinFaDeviceService.publish(publishDTO);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package com.cool.store.service.xinfa;
|
||||||
|
|
||||||
|
import com.cool.store.dto.huoma.*;
|
||||||
|
import com.cool.store.response.ResponseResult;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/11/5 16:15
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public interface XinFaBusinessService {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取门店信发设备列表
|
||||||
|
* @param storeNum
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<StoreXinFaDeviceDetail> getStoreXinFaDeviceDetail(String storeNum);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取账号下有哪些标签
|
||||||
|
* @param storeNum
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<TagDetailDTO> getAccountAllTags(String storeNum,String deviceName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取账号下有哪些节目、
|
||||||
|
* 通过门店在哪个账号下 确定账号
|
||||||
|
* @param programReqDTO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ProgramResponseDTO> getProgramList(ProgramReqDTO programReqDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布信发设备
|
||||||
|
* @param publishDTO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean publishProgram(PublishDTO publishDTO);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -4,7 +4,9 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.cool.store.constants.RedisConstant;
|
import com.cool.store.constants.RedisConstant;
|
||||||
import com.cool.store.dto.huoma.*;
|
import com.cool.store.dto.huoma.*;
|
||||||
import com.cool.store.enums.ErrorCodeEnum;
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
|
import com.cool.store.enums.SpecialTagEnum;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.response.ResponseResult;
|
||||||
import com.cool.store.utils.RedisUtilPool;
|
import com.cool.store.utils.RedisUtilPool;
|
||||||
import com.cool.store.utils.poi.constant.Constants;
|
import com.cool.store.utils.poi.constant.Constants;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
@@ -16,12 +18,14 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author suzhuhong
|
* @Author suzhuhong
|
||||||
@@ -54,8 +58,12 @@ public class XinFaDeviceService {
|
|||||||
private String huoMaGetStoreIdUrl;
|
private String huoMaGetStoreIdUrl;
|
||||||
@Value("${huoMa.store.device.detail.url}")
|
@Value("${huoMa.store.device.detail.url}")
|
||||||
private String huoMaGetStoreXinFaDeviceDetailUrl ;
|
private String huoMaGetStoreXinFaDeviceDetailUrl ;
|
||||||
@Value("${huoMa.get.tag.url }")
|
@Value("${huoMa.get.tag.url}")
|
||||||
private String huoMaGetTagUrl;
|
private String huoMaGetTagUrl;
|
||||||
|
@Value("${huoMa.get.program.url}")
|
||||||
|
private String huoMaGetProgramUrl;
|
||||||
|
@Value("${huoMa.get.publish.url}")
|
||||||
|
private String huoMaGetPublishUrl;
|
||||||
|
|
||||||
|
|
||||||
private final Map<String, HuoMaAccountDTO> accountMap = new HashMap<>();
|
private final Map<String, HuoMaAccountDTO> accountMap = new HashMap<>();
|
||||||
@@ -168,18 +176,115 @@ public class XinFaDeviceService {
|
|||||||
String source = redisUtilPool.hashGet(RedisConstant.HUOMA_STORE_DEVICE_RESOURCE_KEY, storeNum);
|
String source = redisUtilPool.hashGet(RedisConstant.HUOMA_STORE_DEVICE_RESOURCE_KEY, storeNum);
|
||||||
//获取标签 必须要知道门店属于哪个账号下 获取对应账号下的标签 如果获取不到 直接返回空
|
//获取标签 必须要知道门店属于哪个账号下 获取对应账号下的标签 如果获取不到 直接返回空
|
||||||
if (StringUtils.isEmpty(source)){
|
if (StringUtils.isEmpty(source)){
|
||||||
|
log.info("门店没有找到对应的账号,storeNum: {}", storeNum);
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
HuoMaAccountDTO huoMaAccountDTO = accountMap.get(source);
|
HuoMaAccountDTO huoMaAccountDTO = accountMap.get(source);
|
||||||
if (Objects.nonNull(huoMaAccountDTO)){
|
if (Objects.nonNull(huoMaAccountDTO)){
|
||||||
huoMaAccountDTO.setIsQuery(true);
|
huoMaAccountDTO.setIsQuery(true);
|
||||||
String token = getStoreToken(huoMaAccountDTO.getAccount(), huoMaAccountDTO.getPassword());
|
String token = getStoreToken(huoMaAccountDTO.getAccount(), huoMaAccountDTO.getPassword());
|
||||||
return getAccountAllTags(token);
|
TagDTO tagDTO = new TagDTO("DEFAULT", 0, 30,"program");
|
||||||
|
String responseBody = null;
|
||||||
|
try{
|
||||||
|
responseBody = sendPostRequestByToken(JSONObject.toJSONString(tagDTO), huoMaGetTagUrl,token);
|
||||||
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
|
JsonNode rootNode = mapper.readTree(responseBody);
|
||||||
|
|
||||||
|
// 直接转换整个数组
|
||||||
|
return mapper.convertValue(
|
||||||
|
rootNode.path("data").path("content"),
|
||||||
|
mapper.getTypeFactory().constructCollectionType(List.class, TagDetailDTO.class)
|
||||||
|
);
|
||||||
|
}catch (Exception e){
|
||||||
|
log.error("getAccountAllTags解析获取data失败,url:{},responseBody:{}",huoMaTokenUrl, responseBody);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return new ArrayList<>();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取账号下指定标签的id 只需要一下四个
|
||||||
|
* @param storeNum
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<Integer> getAccountSpecialTagIds( String storeNum,List<String> tagList) {
|
||||||
|
List<TagDetailDTO> accountAllTags = getAccountAllTags(storeNum);
|
||||||
|
if (accountAllTags != null) {
|
||||||
|
return accountAllTags.stream()
|
||||||
|
.filter(tag -> tag.getName() != null &&
|
||||||
|
tagList.contains(tag.getName()))
|
||||||
|
.map(TagDetailDTO::getId)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public List<ProgramResponseDTO> getProgramList(ProgramReqDTO programReqDTO) {
|
||||||
|
if (StringUtils.isEmpty(programReqDTO.getStoreCode())){
|
||||||
|
log.info("门店没有找到对应的账号,storeNum: {}", programReqDTO.getStoreCode());
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
//先查询门店是属于哪个账号下
|
||||||
|
String source = redisUtilPool.hashGet(RedisConstant.HUOMA_STORE_DEVICE_RESOURCE_KEY, programReqDTO.getStoreCode());
|
||||||
|
//获取标签 必须要知道门店属于哪个账号下 获取对应账号下的标签 如果获取不到 直接返回空
|
||||||
|
if (StringUtils.isEmpty(source)){
|
||||||
|
log.info("门店没有找到对应的账号,storeNum: {}", programReqDTO.getStoreCode());
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
HuoMaAccountDTO huoMaAccountDTO = accountMap.get(source);
|
||||||
|
if (huoMaAccountDTO!=null){
|
||||||
|
String token = getStoreToken(huoMaAccountDTO.getAccount(), huoMaAccountDTO.getPassword());
|
||||||
|
String responseBody = null;
|
||||||
|
try{
|
||||||
|
responseBody = sendPostRequestByToken(JSONObject.toJSONString(programReqDTO), huoMaGetProgramUrl,token);
|
||||||
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
|
JsonNode rootNode = mapper.readTree(responseBody);
|
||||||
|
|
||||||
|
// 直接转换整个数组
|
||||||
|
return mapper.convertValue(
|
||||||
|
rootNode.path("data").path("content"),
|
||||||
|
mapper.getTypeFactory().constructCollectionType(List.class, ProgramResponseDTO.class)
|
||||||
|
);
|
||||||
|
}catch (Exception e){
|
||||||
|
log.error("getProgramList 解析获取data失败,url:{},responseBody:{}",huoMaTokenUrl, responseBody);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean publish(PublishDTO publishDTO){
|
||||||
|
if (StringUtils.isEmpty(publishDTO.getStoreCode())){
|
||||||
|
log.info("门店没有找到对应的账号,发布失败,storeNum: {}", publishDTO.getStoreCode());
|
||||||
|
return Boolean.FALSE;
|
||||||
|
}
|
||||||
|
String source = redisUtilPool.hashGet(RedisConstant.HUOMA_STORE_DEVICE_RESOURCE_KEY, publishDTO.getStoreCode());
|
||||||
|
//获取标签 必须要知道门店属于哪个账号下 获取对应账号下的标签 如果获取不到 直接返回空
|
||||||
|
if (StringUtils.isEmpty(source)){
|
||||||
|
log.info("门店没有找到对应的账号,storeNum: {}", publishDTO.getStoreCode());
|
||||||
|
return Boolean.FALSE;
|
||||||
|
}
|
||||||
|
HuoMaAccountDTO huoMaAccountDTO = accountMap.get(source);
|
||||||
|
if (huoMaAccountDTO!=null){
|
||||||
|
String token = getStoreToken(huoMaAccountDTO.getAccount(), huoMaAccountDTO.getPassword());
|
||||||
|
String responseBody = null;
|
||||||
|
try{
|
||||||
|
responseBody = sendPostRequestByToken(JSONObject.toJSONString(publishDTO), huoMaGetPublishUrl,token);
|
||||||
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
|
JsonNode rootNode = mapper.readTree(responseBody);
|
||||||
|
|
||||||
|
// 直接转换整个数组
|
||||||
|
log.info("发布成功 deviceId:{},storeCod:{}e",JSONObject.toJSONString(publishDTO.getDeviceIdList()), publishDTO.getStoreCode() );
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}catch (Exception e){
|
||||||
|
log.error("getProgramList 解析获取data失败,url:{},responseBody:{}",huoMaTokenUrl, responseBody);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return Boolean.FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public List<StoreXinFaDeviceDetail> getStoreXinFaDeviceDetailByPointId(Integer pointId, String token) {
|
public List<StoreXinFaDeviceDetail> getStoreXinFaDeviceDetailByPointId(Integer pointId, String token) {
|
||||||
if (pointId != null){
|
if (pointId != null){
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import com.cool.store.dto.FoodTokenDTO;
|
|||||||
import com.cool.store.dto.GetAccessTokenDTO;
|
import com.cool.store.dto.GetAccessTokenDTO;
|
||||||
import com.cool.store.dto.HqtTokenDTO;
|
import com.cool.store.dto.HqtTokenDTO;
|
||||||
import com.cool.store.dto.ModifyPasswordDTO;
|
import com.cool.store.dto.ModifyPasswordDTO;
|
||||||
import com.cool.store.dto.huoma.StoreXinFaDeviceDetail;
|
import com.cool.store.dto.huoma.*;
|
||||||
import com.cool.store.dto.wechat.CallbackMessageDTO;
|
import com.cool.store.dto.wechat.CallbackMessageDTO;
|
||||||
import com.cool.store.dto.wechat.WechatTemplateMessageDTO;
|
import com.cool.store.dto.wechat.WechatTemplateMessageDTO;
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
@@ -42,6 +42,7 @@ import com.cool.store.service.impl.CommonService;
|
|||||||
import com.cool.store.service.impl.OrderSysInfoServiceImpl;
|
import com.cool.store.service.impl.OrderSysInfoServiceImpl;
|
||||||
import com.cool.store.service.impl.UserAuthMappingServiceImpl;
|
import com.cool.store.service.impl.UserAuthMappingServiceImpl;
|
||||||
import com.cool.store.service.wechat.WechatTemplateService;
|
import com.cool.store.service.wechat.WechatTemplateService;
|
||||||
|
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.CoolDateUtils;
|
import com.cool.store.utils.CoolDateUtils;
|
||||||
import com.cool.store.utils.RedisConstantUtil;
|
import com.cool.store.utils.RedisConstantUtil;
|
||||||
@@ -608,12 +609,33 @@ public class PCTestController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
XinFaDeviceService xinFaDeviceService;
|
XinFaBusinessService xinFaBusinessService;
|
||||||
@ApiOperation("测试门店设备信息")
|
@ApiOperation("测试门店设备信息")
|
||||||
@GetMapping("/getStoreXinFaDeviceDetail")
|
@GetMapping("/getStoreXinFaDeviceDetail")
|
||||||
public ResponseResult<List<StoreXinFaDeviceDetail>> getStoreXinFaDeviceDetail(@RequestParam("shopId")String storeNum) {
|
public ResponseResult<List<StoreXinFaDeviceDetail>> getStoreXinFaDeviceDetail(@RequestParam("storeNum")String storeNum) {
|
||||||
return ResponseResult.success(xinFaDeviceService.getStoreXinFaDeviceDetail(storeNum));
|
return ResponseResult.success(xinFaBusinessService.getStoreXinFaDeviceDetail(storeNum));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("测试标签信息")
|
||||||
|
@GetMapping("/getAccountAllTags")
|
||||||
|
public ResponseResult<List<TagDetailDTO>> getAccountAllTags(@RequestParam("storeNum")String storeNum,
|
||||||
|
@RequestParam("deviceName")String deviceName) {
|
||||||
|
List<TagDetailDTO> accountAllTags = xinFaBusinessService.getAccountAllTags(storeNum,deviceName);
|
||||||
|
return ResponseResult.success(accountAllTags);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("获取节目列表")
|
||||||
|
@PostMapping("/getProgramList")
|
||||||
|
public ResponseResult<List<ProgramResponseDTO>> getProgramList(@RequestBody ProgramReqDTO programReqDTO) {
|
||||||
|
List<ProgramResponseDTO> accountAllTags = xinFaBusinessService.getProgramList(programReqDTO);
|
||||||
|
return ResponseResult.success(accountAllTags);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("发布/上架")
|
||||||
|
@PostMapping("/publishProgram")
|
||||||
|
public ResponseResult<Boolean> publishProgram(@RequestBody PublishDTO publishDTO) {
|
||||||
|
Boolean publishStatus = xinFaBusinessService.publishProgram(publishDTO);
|
||||||
|
return ResponseResult.success(publishStatus);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,6 +147,8 @@ huoMa.token.url = https://www.huoMayunping.com/api/SAASLogin/merchant
|
|||||||
huoMa.id.url = https://www.huomayunping.com/api/reportCenter/executeSql
|
huoMa.id.url = https://www.huomayunping.com/api/reportCenter/executeSql
|
||||||
huoMa.store.device.detail.url = https://www.huomayunping.com/api/terminal/search
|
huoMa.store.device.detail.url = https://www.huomayunping.com/api/terminal/search
|
||||||
huoMa.get.point.terminal.url = https://www.huoMayunping.com/api/terminal/getPointTerminalInfos
|
huoMa.get.point.terminal.url = https://www.huoMayunping.com/api/terminal/getPointTerminalInfos
|
||||||
|
huoMa.get.program.url = https://www.huomayunping.com/api/program/search
|
||||||
|
huoMa.get.publish.url = https://www.huomayunping.com/api/channelPublish/target/v2/quick-publish
|
||||||
huoMa.direct.stores.account = 15370309163
|
huoMa.direct.stores.account = 15370309163
|
||||||
huoMa.direct.stores.password = Zx@123456.
|
huoMa.direct.stores.password = Zx@123456.
|
||||||
huoMa.franchise.stores.account = 13563273279
|
huoMa.franchise.stores.account = 13563273279
|
||||||
|
|||||||
@@ -161,6 +161,8 @@ huoMa.id.url = https://www.huomayunping.com/api/reportCenter/executeSql
|
|||||||
huoMa.store.device.detail.url = https://www.huomayunping.com/api/terminal/search
|
huoMa.store.device.detail.url = https://www.huomayunping.com/api/terminal/search
|
||||||
huoMa.get.point.terminal.url = https://www.huoMayunping.com/api/terminal/getPointTerminalInfos
|
huoMa.get.point.terminal.url = https://www.huoMayunping.com/api/terminal/getPointTerminalInfos
|
||||||
huoMa.get.tag.url = https://www.huomayunping.com/api/tag/search
|
huoMa.get.tag.url = https://www.huomayunping.com/api/tag/search
|
||||||
|
huoMa.get.program.url = https://www.huomayunping.com/api/program/search
|
||||||
|
huoMa.get.publish.url = https://www.huomayunping.com/api/channelPublish/target/v2/quick-publish
|
||||||
huoMa.direct.stores.account = 15370309163
|
huoMa.direct.stores.account = 15370309163
|
||||||
huoMa.direct.stores.password = Zx@123456.
|
huoMa.direct.stores.password = Zx@123456.
|
||||||
huoMa.franchise.stores.account = 13563273279
|
huoMa.franchise.stores.account = 13563273279
|
||||||
|
|||||||
Reference in New Issue
Block a user