bug修复
This commit is contained in:
1 parent
7fed799118
commit
eae135ec88
37 files changed
+866
-27
No files matched your search
@@ -13,7 +13,7 @@ public enum BusinessCodePrefixEnum {
|
||||
INQUIRY_SETTING("IST"), INQUIRY_FIELD_VALUE("IFV"), INQUIRY_ATTACHMENT("IAT"),
|
||||
INQUIRY_LOG("ILG"), INQUIRY_RECEIVER("IRC"), MAIL_TASK("MLT"), CUSTOMER("CUS"),
|
||||
CONTACT("CON"), LEAD("LED"), FOLLOW_UP("FLW"), MEDIA("MED"), SEO("SEO"), SEO_HEADING("SEH"),
|
||||
PUBLISH("PUB"), JOB("JOB"), USER("USR"), ROLE("ROL"), FLOW_LOG("FLO");
|
||||
PUBLISH("PUB"), JOB("JOB"), USER("USR"), ROLE("ROL"), FLOW_LOG("FLO"), SOCIAL_CHANNEL("SOC");
|
||||
|
||||
/** 三位业务前缀。 */
|
||||
private final String prefix;
|
||||
|
||||
+11
@@ -40,6 +40,17 @@ public class ProductRepositoryService {
|
||||
if (categoryCode != null && !categoryCode.isBlank()) query.eq(ProductEntity::getPrimaryCategoryCode, categoryCode);
|
||||
return mapper.selectList(query.orderByDesc(ProductEntity::getFeaturedFlag).orderByAsc(ProductEntity::getSortNo));
|
||||
}
|
||||
/** 查询前台指定分类集合下的已发布产品。 */
|
||||
public List<ProductEntity> listPublishedByCategories(String siteCode, List<String> categoryCodes) {
|
||||
if (categoryCodes == null || categoryCodes.isEmpty()) {
|
||||
return List.of();
|
||||
}
|
||||
return mapper.selectList(Wrappers.<ProductEntity>lambdaQuery()
|
||||
.eq(ProductEntity::getSiteCode, siteCode)
|
||||
.eq(ProductEntity::getStatus, "PUBLISHED")
|
||||
.in(ProductEntity::getPrimaryCategoryCode, categoryCodes)
|
||||
.orderByDesc(ProductEntity::getFeaturedFlag).orderByAsc(ProductEntity::getSortNo));
|
||||
}
|
||||
/** 新增产品。 */ public int insert(ProductEntity entity) { return mapper.insert(entity); }
|
||||
/** 按产品业务编号更新。 */
|
||||
public int updateByCode(ProductEntity entity) {
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.shoplix.modules.social.enums;
|
||||
|
||||
/** 社媒渠道平台。 */
|
||||
public enum SocialPlatformEnum {
|
||||
FACEBOOK,
|
||||
X,
|
||||
LINKEDIN,
|
||||
YOUTUBE,
|
||||
INSTAGRAM,
|
||||
WHATSAPP,
|
||||
PINTEREST,
|
||||
TIKTOK,
|
||||
LINE,
|
||||
TUMBLR,
|
||||
EMAIL
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.shoplix.modules.social.repository.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
/** 站点社媒渠道持久化实体。 */
|
||||
@Data
|
||||
@TableName("social_channel")
|
||||
public class SocialChannelEntity {
|
||||
/** 数据库内部主键。 */ @TableId(type = IdType.AUTO) private Long id;
|
||||
/** 渠道业务编号。 */ private String channelCode;
|
||||
/** 所属站点业务编号。 */ private String siteCode;
|
||||
/** 社媒平台枚举值。 */ private String platform;
|
||||
/** 前台展示名称。 */ private String displayName;
|
||||
/** 社媒主页或联系地址。 */ private String profileUrl;
|
||||
/** 产品详情分享开关:0关闭,1开启。 */ private Integer shareEnabled;
|
||||
/** 全站悬浮栏开关:0关闭,1开启。 */ private Integer floatingEnabled;
|
||||
/** 渠道启用状态:0停用,1启用。 */ private Integer enabled;
|
||||
/** 展示排序值。 */ private Integer sortNo;
|
||||
/** 创建毫秒时间戳。 */ private Long createTime;
|
||||
/** 更新毫秒时间戳。 */ private Long updateTime;
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package com.shoplix.modules.social.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.shoplix.modules.social.repository.entity.SocialChannelEntity;
|
||||
|
||||
/** 社媒渠道 Mapper。 */
|
||||
public interface SocialChannelMapper extends BaseMapper<SocialChannelEntity> {
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package com.shoplix.modules.social.repository.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.shoplix.modules.social.repository.entity.SocialChannelEntity;
|
||||
import com.shoplix.modules.social.repository.mapper.SocialChannelMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/** 社媒渠道单表数据源服务。 */
|
||||
@Service
|
||||
public class SocialChannelRepositoryService {
|
||||
private final SocialChannelMapper mapper;
|
||||
|
||||
/** 注入社媒渠道 Mapper。 */
|
||||
public SocialChannelRepositoryService(SocialChannelMapper mapper) {
|
||||
this.mapper = mapper;
|
||||
}
|
||||
|
||||
/** 查询站点社媒渠道。 */
|
||||
public List<SocialChannelEntity> list(String siteCode, boolean enabledOnly) {
|
||||
var query = Wrappers.<SocialChannelEntity>lambdaQuery().eq(SocialChannelEntity::getSiteCode, siteCode);
|
||||
if (enabledOnly) query.eq(SocialChannelEntity::getEnabled, 1);
|
||||
return mapper.selectList(query.orderByAsc(SocialChannelEntity::getSortNo).orderByAsc(SocialChannelEntity::getId));
|
||||
}
|
||||
|
||||
/** 物理删除站点全部社媒渠道,用于整组配置替换。 */
|
||||
public int deleteBySite(String siteCode) {
|
||||
return mapper.delete(Wrappers.<SocialChannelEntity>lambdaQuery().eq(SocialChannelEntity::getSiteCode, siteCode));
|
||||
}
|
||||
|
||||
/** 新增社媒渠道。 */
|
||||
public int insert(SocialChannelEntity entity) {
|
||||
return mapper.insert(entity);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user