Merge branch 'master' into cc_20251103_open_api

This commit is contained in:
wangff
2025-11-13 13:17:52 +08:00
47 changed files with 1472 additions and 30 deletions

View File

@@ -0,0 +1,20 @@
package com.cool.store.dto.huoma;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author suzhuhong
* @Date 2025/11/6 11:09
* @Version 1.0
*/
@Data
public class AccountTagDTO {
@ApiModelProperty("门店编码")
private String storeNum;
@ApiModelProperty("设备名称")
private String deviceName;
}

View File

@@ -0,0 +1,39 @@
package com.cool.store.dto.huoma;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* <p>
* 火码账号DTO
* </p>
*
* @author wangff
* @since 2025/9/23
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class HuoMaAccountDTO {
/**
* 账号
*/
private String account;
/**
* 密码
*/
private String password;
/**
* 是否已查询
*/
private Boolean isQuery;
public HuoMaAccountDTO(String account, String password) {
this.account = account;
this.password = password;
this.isQuery = false;
}
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -0,0 +1,27 @@
package com.cool.store.dto.huoma;
import com.alibaba.fastjson.annotation.JSONField;
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列表不能为空")
@JSONField(name = "terminals")
private List<String> deviceIdList;
@ApiModelProperty("节目id")
private Long programId;
}

View File

@@ -0,0 +1,59 @@
package com.cool.store.dto.huoma;
import com.cool.store.utils.BrowserVersionUtils;
import lombok.Data;
import java.util.Objects;
/**
* @Author: WangShuo
* @Date: 2025/08/13/16:24
* @Version 1.0
* @注释:
*/
@Data
public class StoreEquipmentDTO {
/**
* 已授权登录数
*/
private Integer activeCount;
/**
* 总设备
*/
private Integer terminalCount;
/**
* 网点ID
*/
private Integer pointId;
/**
* 网点号
*/
private String pointCode;
/**
* 签到数
*/
private Integer signCount;
/**
* 在线
*/
private Integer connectCount;
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
StoreEquipmentDTO that = (StoreEquipmentDTO) o;
return Objects.equals(pointCode, that.pointCode);
}
@Override
public int hashCode() {
return Objects.hashCode(pointCode);
}
}

View File

@@ -0,0 +1,40 @@
package com.cool.store.dto.huoma;
import lombok.Data;
/**
* @Author suzhuhong
* @Date 2025/8/18 16:00
* @Version 1.0
*/
@Data
public class StoreRequestDTO {
private String reportCode;
private Integer index;
private Integer size;
private Params params;
public StoreRequestDTO(String reportCode, Integer index, Integer size, String shopCode) {
this.reportCode = reportCode;
this.index = index;
this.size = size;
this.params = new Params(shopCode);
}
@Data
static class Params{
private String inputText_2;
public Params(String inputText_2) {
this.inputText_2 = inputText_2;
}
}
}

View File

@@ -0,0 +1,24 @@
package com.cool.store.dto.huoma;
import lombok.Data;
/**
* @Author suzhuhong
* @Date 2025/8/18 16:38
* @Version 1.0
*/
@Data
public class StoreXinFaDetailRequestDTO {
private Integer index;
private Integer size;
private Integer pointId;
public StoreXinFaDetailRequestDTO(Integer index, Integer size, Integer pointId) {
this.index = index;
this.size = size;
this.pointId = pointId;
}
}

View File

@@ -0,0 +1,81 @@
package com.cool.store.dto.huoma;
import com.alibaba.fastjson.parser.DefaultJSONParser;
import com.alibaba.fastjson.parser.deserializer.ObjectDeserializer;
import com.cool.store.utils.BrowserVersionUtils;
import com.cool.store.utils.StringUtil;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.lang.reflect.Type;
/**
* @Author suzhuhong
* @Date 2025/8/18 16:27
* @Version 1.0
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class StoreXinFaDeviceDetail {
/**
* 设备ID
*/
@ApiModelProperty(value = "设备ID")
private String id;
@ApiModelProperty("设备id")
private String deviceId;
/**
* 设备名称
*/
@ApiModelProperty(value = "设备名称")
private String name;
/**
* 设备连接状态 0:未连接 1:已连接
*/
@ApiModelProperty(value = "设备连接状态 false:未连接 true:已连接")
private Boolean isConnect;
/**
* 设备总内存
*/
@ApiModelProperty(value = "设备总内存")
private String totalRam;
/**
* 设备可用内存
*/
@ApiModelProperty(value = "设备可用内存")
private String availRam;
/**
* 设备浏览器信息
*/
@ApiModelProperty(value = "设备浏览器信息")
private String userAgent;
/**
* 内用内存小于300M 或者 浏览器版本小于60
*/
@ApiModelProperty(value = "内用内存小于300M 或者 浏览器版本小于60")
private Boolean flag;
public boolean getFlag() {
if (StringUtil.isEmpty(availRam)||StringUtil.isEmpty(userAgent)){
return false;
}
try {
Boolean isOldChromeBrowser = BrowserVersionUtils.isOldChromeBrowser(userAgent);
long availableMemoryMB = Long.parseLong(availRam) / (1024 * 1024);
return availableMemoryMB < 300 || isOldChromeBrowser;
} catch (NumberFormatException e) {
return false;
}
}
}

View File

@@ -0,0 +1,29 @@
package com.cool.store.dto.huoma;
import io.swagger.models.auth.In;
import lombok.Data;
/**
* @Author suzhuhong
* @Date 2025/11/5 9:33
* @Version 1.0
*/
@Data
public class TagDTO {
private String channelType;
private Integer index;
private Integer size;
private String type;
public TagDTO(String channelType, Integer index, Integer size, String type) {
this.channelType = channelType;
this.index = index;
this.size = size;
this.type = type;
}
}

View File

@@ -0,0 +1,22 @@
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 9:41
* @Version 1.0
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class TagDetailDTO {
@ApiModelProperty("标签Id")
private Integer id;
@ApiModelProperty("标签名称")
private String name;
}

View File

@@ -72,4 +72,8 @@ public class FranchiseFeeDO {
@ApiModelProperty("新管家已缴金额")
private BigDecimal xgjFeesPaid;
@Column(name = "cashier_fee")
@ApiModelProperty("收银费(系统费)")
private String cashierFee;
}

View File

@@ -117,4 +117,8 @@ public class OrderSysInfoDO {
/** 总部订货收款修改人 */
@Column(name = "receiving_update_user")
private String receivingUpdateUser;
/** 订货方式0先款后货、1先货后款 */
@Column(name = "order_type")
private Integer orderType;
}

View File

@@ -44,6 +44,8 @@ public class FranchiseFeeRequest {
@ApiModelProperty("加盟费优惠原因")
private String discountReason;
@ApiModelProperty("收银费(系统费)(三明治使用)")
private String cashierFee;
public FranchiseFeeDO toFranchiseFeeDO() {
FranchiseFeeDO franchiseFeeDO = new FranchiseFeeDO();
@@ -63,6 +65,7 @@ public class FranchiseFeeRequest {
franchiseFeeDO.setThirdYearFee(this.thirdYearFee);
franchiseFeeDO.setPerformanceBond(this.performanceBond);
franchiseFeeDO.setDiscountReason(this.discountReason);
franchiseFeeDO.setCashierFee(this.cashierFee);
return franchiseFeeDO;
}
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.request;
import com.cool.store.constants.CommonConstants;
import com.cool.store.entity.OrderSysInfoDO;
import com.cool.store.enums.JoinModeEnum;
import com.cool.store.enums.OrderSysTypeEnum;
@@ -94,6 +95,9 @@ public class OrderSysInfoRequest {
@ApiModelProperty(value = "总部订货收款修改人" )
private String receivingUpdateUser;
@ApiModelProperty("订货方式0先款后货、1先货后款")
private Integer orderType;
public OrderSysInfoDO toOrderSysInfoDO() {
OrderSysInfoDO orderSysInfoDO = new OrderSysInfoDO();
@@ -131,7 +135,10 @@ public class OrderSysInfoRequest {
if (Objects.equals(joinMode, JoinModeEnum.FLAGSHIP_STORE.getCode())&&this.shopCode!=null){
return true;
}
if (StringUtils.isAnyBlank(this.receivingFirmName,this.receivingMsBankAccount,this.receivingMsBankBranch,this.bankUnionPayAccount,this.shopCode)){
if (StringUtils.isBlank(this.shopCode)) {
return false;
}
if (!CommonConstants.INDEX_ONE.equals(this.orderType) && StringUtils.isAnyBlank(this.receivingFirmName,this.receivingMsBankAccount,this.receivingMsBankBranch,this.bankUnionPayAccount)){
return false;
}
}

View File

@@ -3,10 +3,13 @@ package com.cool.store.request.xgj;
import com.cool.store.entity.FranchiseFeeDO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import java.math.BigDecimal;
import java.util.Date;
import static com.cool.store.utils.CommonUtil.convertToBig;
/**
* @Author suzhuhong
* @Date 2025/6/3 16:52
@@ -44,17 +47,24 @@ public class PushFranchiseFeeRequest {
@ApiModelProperty( "创建时间")
private Date createTime;
@ApiModelProperty("品牌")
private Integer joinBrand;
public PushFranchiseFeeRequest(){}
public PushFranchiseFeeRequest(Long shopId, String partnerName, FranchiseFeeDO franchiseFeeDO){
this.setShopId(shopId);
this.setPartnerName(partnerName);
this.setBillId(franchiseFeeDO.getId().intValue());
this.setFranchiseFee(new BigDecimal(franchiseFeeDO.getYearFranchiseFee()));
this.setBond(new BigDecimal(franchiseFeeDO.getLoanMargin()));
this.setFirstYearManageFee(new BigDecimal(franchiseFeeDO.getFirstYearManageFee()));
this.setFirstYearFee(new BigDecimal(franchiseFeeDO.getFirstYearFee()));
this.setDesignFee(new BigDecimal(franchiseFeeDO.getPerformanceBond()));
this.setFranchiseFee(convertToBig(franchiseFeeDO.getYearFranchiseFee()));
this.setBond(convertToBig(franchiseFeeDO.getLoanMargin()));
this.setFirstYearManageFee(convertToBig(franchiseFeeDO.getFirstYearManageFee()));
this.setFirstYearFee(convertToBig(franchiseFeeDO.getFirstYearFee()));
this.setDesignFee(convertToBig(franchiseFeeDO.getPerformanceBond()));
// 三明治收银费
if (StringUtils.isNotBlank(franchiseFeeDO.getCashierFee())) {
this.setFranchiseFee(convertToBig(franchiseFeeDO.getCashierFee()));
}
this.setTotalFee(this.getBond()
.add(this.getFranchiseFee())
.add(this.getFirstYearManageFee())

View File

@@ -56,6 +56,9 @@ public class ReceiptRequest {
@ApiModelProperty( "删除标识")
private Integer deleted = 0;
@ApiModelProperty("品牌")
private Integer joinBrand;
public ReceiptRequest() {
}

View File

@@ -241,5 +241,9 @@ public class AddSignFranchiseResponse {
@ApiModelProperty("是否统管 1-统管0-不统管")
private Integer unifiedManagement;
@ApiModelProperty("收银费(系统费)")
private String cashierFee;
@ApiModelProperty("收银费(系统费)大写")
private String bigCashierFee;
}

View File

@@ -206,4 +206,7 @@ public class BuildInformationResponse {
@ApiModelProperty(value = "建店资料当前阶段状态")
private Integer shopSubStageStatus;
@ApiModelProperty("订货方式0先款后货、1先货后款")
private Integer orderType;
}

View File

@@ -63,7 +63,8 @@ public class FranchiseFeeResponse {
@ApiModelProperty("新管家已缴金额")
private BigDecimal xgjFeesPaid;
@ApiModelProperty("收银费(系统费)")
private String cashierFee;
@Data
public static class LinePay{
@@ -200,6 +201,7 @@ public class FranchiseFeeResponse {
franchiseFeeResponse.setXgjCollectionStatus(franchiseFeeDO.getXgjCollectionStatus());
franchiseFeeResponse.setXgjRemainderPayableAmount(franchiseFeeDO.getXgjRemainderPayableAmount());
franchiseFeeResponse.setXgjFeesPaid(franchiseFeeDO.getXgjFeesPaid());
franchiseFeeResponse.setCashierFee(franchiseFeeDO.getCashierFee());
return franchiseFeeResponse;
}
}