2024.04.23提交代码
parent
d1f863ec37
commit
92811c515a
@ -0,0 +1,11 @@
|
||||
package com.flossom.common.core.constant;
|
||||
|
||||
/**
|
||||
* 接口请求日志-接口归属人
|
||||
*/
|
||||
public class InterfaceRequestBelongingConstants {
|
||||
|
||||
public static final String SHUYUN_INTERFACE = "shuyun";
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,143 @@
|
||||
package com.flossom.common.core.domain.entity;
|
||||
|
||||
import com.flossom.common.core.web.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 请求数云接口日志对象 wx_interface_request_log
|
||||
*/
|
||||
public class WxInterfaceRequestLog extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 接口归属
|
||||
*/
|
||||
private String belonging;
|
||||
|
||||
/**
|
||||
* 请求地址
|
||||
*/
|
||||
private String url;
|
||||
|
||||
/**
|
||||
* 请求方式
|
||||
*/
|
||||
private String method;
|
||||
|
||||
/**
|
||||
* 请求params参数
|
||||
*/
|
||||
private String requestParams;
|
||||
|
||||
/**
|
||||
* 请求body参数
|
||||
*/
|
||||
private String requestBody;
|
||||
|
||||
/**
|
||||
* 响应状态
|
||||
*/
|
||||
private Long responseCode;
|
||||
|
||||
/**
|
||||
* 接口耗时
|
||||
*/
|
||||
private Long times;
|
||||
|
||||
/**
|
||||
* 响应数据
|
||||
*/
|
||||
private String responseData;
|
||||
|
||||
/**
|
||||
* 异常信息
|
||||
*/
|
||||
private String errorMessage;
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setBelonging(String belonging) {
|
||||
this.belonging = belonging;
|
||||
}
|
||||
|
||||
public String getBelonging() {
|
||||
return belonging;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setMethod(String method) {
|
||||
this.method = method;
|
||||
}
|
||||
|
||||
public String getMethod() {
|
||||
return method;
|
||||
}
|
||||
|
||||
public void setRequestParams(String requestParams) {
|
||||
this.requestParams = requestParams;
|
||||
}
|
||||
|
||||
public String getRequestParams() {
|
||||
return requestParams;
|
||||
}
|
||||
|
||||
public void setRequestBody(String requestBody) {
|
||||
this.requestBody = requestBody;
|
||||
}
|
||||
|
||||
public String getRequestBody() {
|
||||
return requestBody;
|
||||
}
|
||||
|
||||
public void setResponseCode(Long responseCode) {
|
||||
this.responseCode = responseCode;
|
||||
}
|
||||
|
||||
public Long getResponseCode() {
|
||||
return responseCode;
|
||||
}
|
||||
|
||||
public void setTimes(Long times) {
|
||||
this.times = times;
|
||||
}
|
||||
|
||||
public Long getTimes() {
|
||||
return times;
|
||||
}
|
||||
|
||||
public void setResponseData(String responseData) {
|
||||
this.responseData = responseData;
|
||||
}
|
||||
|
||||
public String getResponseData() {
|
||||
return responseData;
|
||||
}
|
||||
|
||||
public void setErrorMessage(String errorMessage) {
|
||||
this.errorMessage = errorMessage;
|
||||
}
|
||||
|
||||
public String getErrorMessage() {
|
||||
return errorMessage;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package com.flossom.common.core.domain.ret;
|
||||
|
||||
/**
|
||||
* 私人定制电流
|
||||
*/
|
||||
public class CustomizationElectricFormulaVo {
|
||||
private String feelingType;
|
||||
private Double pullingSeconds;
|
||||
private Double moisturizeSeconds;
|
||||
|
||||
public String getFeelingType() {
|
||||
return feelingType;
|
||||
}
|
||||
|
||||
public void setFeelingType(String feelingType) {
|
||||
this.feelingType = feelingType;
|
||||
}
|
||||
|
||||
public Double getPullingSeconds() {
|
||||
return pullingSeconds;
|
||||
}
|
||||
|
||||
public void setPullingSeconds(Double pullingSeconds) {
|
||||
this.pullingSeconds = pullingSeconds;
|
||||
}
|
||||
|
||||
public Double getMoisturizeSeconds() {
|
||||
return moisturizeSeconds;
|
||||
}
|
||||
|
||||
public void setMoisturizeSeconds(Double moisturizeSeconds) {
|
||||
this.moisturizeSeconds = moisturizeSeconds;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package com.flossom.common.core.domain.shuyun;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxUserInstrument;
|
||||
|
||||
public class ExchangeBindingUserInstrument {
|
||||
|
||||
private WxUserInstrument oldUserInstrument;
|
||||
|
||||
private WxUserInstrument newUserInstrument;
|
||||
|
||||
public ExchangeBindingUserInstrument() {
|
||||
}
|
||||
|
||||
public ExchangeBindingUserInstrument(WxUserInstrument oldUserInstrument, WxUserInstrument newUserInstrument) {
|
||||
this.oldUserInstrument = oldUserInstrument;
|
||||
this.newUserInstrument = newUserInstrument;
|
||||
}
|
||||
|
||||
public WxUserInstrument getOldUserInstrument() {
|
||||
return oldUserInstrument;
|
||||
}
|
||||
|
||||
public void setOldUserInstrument(WxUserInstrument oldUserInstrument) {
|
||||
this.oldUserInstrument = oldUserInstrument;
|
||||
}
|
||||
|
||||
public WxUserInstrument getNewUserInstrument() {
|
||||
return newUserInstrument;
|
||||
}
|
||||
|
||||
public void setNewUserInstrument(WxUserInstrument newUserInstrument) {
|
||||
this.newUserInstrument = newUserInstrument;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
package com.flossom.common.core.domain.shuyun;
|
||||
|
||||
public class ShuYunBatchIntegralOperation {
|
||||
|
||||
private ShuYunPointChange shuYunPointChange;
|
||||
|
||||
private Long userId;
|
||||
|
||||
private String unionId;
|
||||
|
||||
public ShuYunBatchIntegralOperation() {
|
||||
}
|
||||
|
||||
public ShuYunBatchIntegralOperation(ShuYunPointChange shuYunPointChange, Long userId, String unionId) {
|
||||
this.shuYunPointChange = shuYunPointChange;
|
||||
this.userId = userId;
|
||||
this.unionId = unionId;
|
||||
}
|
||||
|
||||
public ShuYunPointChange getShuYunPointChange() {
|
||||
return shuYunPointChange;
|
||||
}
|
||||
|
||||
public void setShuYunPointChange(ShuYunPointChange shuYunPointChange) {
|
||||
this.shuYunPointChange = shuYunPointChange;
|
||||
}
|
||||
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getUnionId() {
|
||||
return unionId;
|
||||
}
|
||||
|
||||
public void setUnionId(String unionId) {
|
||||
this.unionId = unionId;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,58 @@
|
||||
package com.flossom.common.core.domain.shuyun;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ShuYunBatchTagOperation {
|
||||
|
||||
// 计算新增加元素
|
||||
List<Integer> needAddTagIdList = new ArrayList<>();
|
||||
// 计算要删除的元素
|
||||
List<Integer> needDelTagIdList = new ArrayList<>();
|
||||
|
||||
private Long userId;
|
||||
|
||||
private String unionId;
|
||||
|
||||
public ShuYunBatchTagOperation() {
|
||||
}
|
||||
|
||||
public ShuYunBatchTagOperation(List<Integer> needAddTagIdList, List<Integer> needDelTagIdList, Long userId, String unionId) {
|
||||
this.needDelTagIdList = needDelTagIdList;
|
||||
this.needAddTagIdList = needAddTagIdList;
|
||||
this.userId = userId;
|
||||
this.unionId = unionId;
|
||||
}
|
||||
|
||||
public List<Integer> getNeedDelTagIdList() {
|
||||
return needDelTagIdList;
|
||||
}
|
||||
|
||||
public void setNeedDelTagIdList(List<Integer> needDelTagIdList) {
|
||||
this.needDelTagIdList = needDelTagIdList;
|
||||
}
|
||||
|
||||
public List<Integer> getNeedAddTagIdList() {
|
||||
return needAddTagIdList;
|
||||
}
|
||||
|
||||
public void setNeedAddTagIdList(List<Integer> needAddTagIdList) {
|
||||
this.needAddTagIdList = needAddTagIdList;
|
||||
}
|
||||
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getUnionId() {
|
||||
return unionId;
|
||||
}
|
||||
|
||||
public void setUnionId(String unionId) {
|
||||
this.unionId = unionId;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
package com.flossom.common.core.enums;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 眼雕大师雷达
|
||||
*
|
||||
* @author flossom
|
||||
*/
|
||||
public enum RedarlevelInitEnum {
|
||||
VERTICAL("垂"),
|
||||
COLLAPSE("垮"),
|
||||
LINES("纹"),
|
||||
PINE("松"),
|
||||
CONCAVE("凹"),
|
||||
BLACK("黑"),
|
||||
FATIGUE("疲"),
|
||||
SWELLING("肿");
|
||||
|
||||
private final String name;
|
||||
|
||||
RedarlevelInitEnum(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化雷达值
|
||||
* @return
|
||||
*/
|
||||
public static Map<String, Integer> initRedarMap(Integer min) {
|
||||
Map<String, Integer> initMap = new HashMap<>();
|
||||
Arrays.stream(values()).forEach(item -> {
|
||||
initMap.put(item.getName(), min);
|
||||
});
|
||||
return initMap;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package com.flossom.common.core.enums;
|
||||
|
||||
/**
|
||||
* 发现管理类型枚举
|
||||
*
|
||||
* @author CGLiang
|
||||
* @version 2.0.0
|
||||
* @date 2024/4/11
|
||||
*/
|
||||
public enum WxFindEnum {
|
||||
|
||||
CAROUSEL_IMAGE(1, "发现轮播图"),
|
||||
PRODUCT_STARTEGY(2, "产品攻略");
|
||||
|
||||
private final Integer type;
|
||||
private final String name;
|
||||
|
||||
WxFindEnum(Integer type, String name) {
|
||||
this.type = type;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,76 @@
|
||||
package com.flossom.common.core.mapper;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxFindCarousel;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 发现轮播图Mapper接口
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-04-10
|
||||
*/
|
||||
public interface WxFindCarouselMapper {
|
||||
/**
|
||||
* 查询发现轮播图
|
||||
*
|
||||
* @param id 发现轮播图主键
|
||||
* @return 发现轮播图
|
||||
*/
|
||||
WxFindCarousel selectWxFindCarouselById(Long id);
|
||||
|
||||
/**
|
||||
* 查询发现轮播图列表
|
||||
*
|
||||
* @param wxFindCarousel 发现轮播图
|
||||
* @return 发现轮播图集合
|
||||
*/
|
||||
List<WxFindCarousel> selectWxFindCarouselList(WxFindCarousel wxFindCarousel);
|
||||
|
||||
/**
|
||||
* 新增发现轮播图
|
||||
*
|
||||
* @param wxFindCarousel 发现轮播图
|
||||
* @return 结果
|
||||
*/
|
||||
int insertWxFindCarousel(WxFindCarousel wxFindCarousel);
|
||||
|
||||
/**
|
||||
* 修改发现轮播图
|
||||
*
|
||||
* @param wxFindCarousel 发现轮播图
|
||||
* @return 结果
|
||||
*/
|
||||
int updateWxFindCarousel(WxFindCarousel wxFindCarousel);
|
||||
|
||||
/**
|
||||
* 删除发现轮播图
|
||||
*
|
||||
* @param id 发现轮播图主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteWxFindCarouselById(@Param("id") Long id, @Param("updateDate") Date updateDate, @Param("updateName") String updateName);
|
||||
|
||||
/**
|
||||
* 批量删除发现轮播图
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteWxFindCarouselByIds(@Param("ids") Long[] ids, @Param("updateDate") Date updateDate, @Param("updateName") String updateName);
|
||||
|
||||
/**
|
||||
* 修改排序
|
||||
*
|
||||
* @param orderNumber 排序值
|
||||
* @param operate 是否开启
|
||||
* @param id id
|
||||
* @param updateDate 修改时间
|
||||
* @param updateName 修改用户名
|
||||
*/
|
||||
void updateSortOrOpen(@Param("operate") Long operate, @Param("orderNumber") Long orderNumber, @Param("id") Long id, @Param("updateDate") Date updateDate, @Param("updateName") String updateName);
|
||||
|
||||
void updateTitleById(@Param("title") String title, @Param("id") long id);
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
package com.flossom.common.core.mapper;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxFindInstrument;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 发现管理与图仪器关联Mapper接口
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-04-10
|
||||
*/
|
||||
public interface WxFindInstrumentMapper {
|
||||
/**
|
||||
* 查询发现管理与图仪器关联
|
||||
*
|
||||
* @param id 发现管理与图仪器关联主键
|
||||
* @return 发现管理与图仪器关联
|
||||
*/
|
||||
WxFindInstrument selectWxFindInstrumentById(Long id);
|
||||
|
||||
/**
|
||||
* 查询发现管理与图仪器关联列表
|
||||
*
|
||||
* @param wxFindInstrument 发现管理与图仪器关联
|
||||
* @return 发现管理与图仪器关联集合
|
||||
*/
|
||||
List<WxFindInstrument> selectWxFindInstrumentList(WxFindInstrument wxFindInstrument);
|
||||
|
||||
/**
|
||||
* 新增发现管理与图仪器关联
|
||||
*
|
||||
* @param wxFindInstrument 发现管理与图仪器关联
|
||||
* @return 结果
|
||||
*/
|
||||
int insertWxFindInstrument(WxFindInstrument wxFindInstrument);
|
||||
|
||||
/**
|
||||
* 修改发现管理与图仪器关联
|
||||
*
|
||||
* @param wxFindInstrument 发现管理与图仪器关联
|
||||
* @return 结果
|
||||
*/
|
||||
int updateWxFindInstrument(WxFindInstrument wxFindInstrument);
|
||||
|
||||
/**
|
||||
* 删除发现管理与图仪器关联
|
||||
*
|
||||
* @param id 发现管理与图仪器关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteWxFindInstrumentById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除发现管理与图仪器关联
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteWxFindInstrumentByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 根据发现管理id软删除数据
|
||||
* @param wxFindId 发现管理id
|
||||
* @param updateDate 修改时间
|
||||
* @param updateName 修改人名称
|
||||
*/
|
||||
void deleteWxFindInstrumentByWxFindId(@Param("wxFindId")Long wxFindId, @Param("updateDate")Date updateDate, @Param("updateName")String updateName, @Param("wxFindType")Integer wxFindType);
|
||||
}
|
||||
@ -0,0 +1,73 @@
|
||||
package com.flossom.common.core.mapper;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxFindProductStrategy;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 产品攻略Mapper接口
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-04-10
|
||||
*/
|
||||
public interface WxFindProductStrategyMapper {
|
||||
/**
|
||||
* 查询产品攻略
|
||||
*
|
||||
* @param id 产品攻略主键
|
||||
* @return 产品攻略
|
||||
*/
|
||||
WxFindProductStrategy selectWxFindProductStrategyById(Long id);
|
||||
|
||||
/**
|
||||
* 查询产品攻略列表
|
||||
*
|
||||
* @param wxFindProductStrategy 产品攻略
|
||||
* @return 产品攻略集合
|
||||
*/
|
||||
List<WxFindProductStrategy> selectWxFindProductStrategyList(WxFindProductStrategy wxFindProductStrategy);
|
||||
|
||||
/**
|
||||
* 新增产品攻略
|
||||
*
|
||||
* @param wxFindProductStrategy 产品攻略
|
||||
* @return 结果
|
||||
*/
|
||||
int insertWxFindProductStrategy(WxFindProductStrategy wxFindProductStrategy);
|
||||
|
||||
/**
|
||||
* 修改产品攻略
|
||||
*
|
||||
* @param wxFindProductStrategy 产品攻略
|
||||
* @return 结果
|
||||
*/
|
||||
int updateWxFindProductStrategy(WxFindProductStrategy wxFindProductStrategy);
|
||||
|
||||
/**
|
||||
* 删除产品攻略
|
||||
*
|
||||
* @param id 产品攻略主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteWxFindProductStrategyById(@Param("id")Long id, @Param("updateDate") Date updateDate, @Param("updateName")String updateName);
|
||||
|
||||
/**
|
||||
* 批量删除产品攻略
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteWxFindProductStrategyByIds(@Param("ids")Long[] ids, @Param("updateDate") Date updateDate, @Param("updateName")String updateName);
|
||||
|
||||
/**
|
||||
* 修改排序
|
||||
* @param orderNumber 排序值
|
||||
* @param operate 是否开启
|
||||
* @param id id
|
||||
* @param updateDate 修改时间
|
||||
* @param updateName 修改用户名
|
||||
*/
|
||||
void updateSort(@Param("operate")Long operate, @Param("orderNumber")Long orderNumber, @Param("id")Long id, @Param("updateDate")Date updateDate, @Param("updateName")String updateName);
|
||||
}
|
||||
@ -0,0 +1,79 @@
|
||||
package com.flossom.common.core.mapper;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxFindTag;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 发现管理与标签关联Mapper接口
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-04-10
|
||||
*/
|
||||
public interface WxFindTagMapper {
|
||||
/**
|
||||
* 查询发现管理与标签关联
|
||||
*
|
||||
* @param id 发现管理与标签关联主键
|
||||
* @return 发现管理与标签关联
|
||||
*/
|
||||
WxFindTag selectWxFindTagById(Long id);
|
||||
|
||||
/**
|
||||
* 查询发现管理与标签关联列表
|
||||
*
|
||||
* @param wxFindTag 发现管理与标签关联
|
||||
* @return 发现管理与标签关联集合
|
||||
*/
|
||||
List<WxFindTag> selectWxFindTagList(WxFindTag wxFindTag);
|
||||
|
||||
/**
|
||||
* 新增发现管理与标签关联
|
||||
*
|
||||
* @param wxFindTag 发现管理与标签关联
|
||||
* @return 结果
|
||||
*/
|
||||
int insertWxFindTag(WxFindTag wxFindTag);
|
||||
|
||||
/**
|
||||
* 批量新增发现管理与标签关联
|
||||
*
|
||||
* @param wxFindTagList 发现管理与标签关联
|
||||
* @return 结果
|
||||
*/
|
||||
int inserts(@Param("wxFindTagList") List<WxFindTag> wxFindTagList);
|
||||
|
||||
/**
|
||||
* 修改发现管理与标签关联
|
||||
*
|
||||
* @param wxFindTag 发现管理与标签关联
|
||||
* @return 结果
|
||||
*/
|
||||
int updateWxFindTag(WxFindTag wxFindTag);
|
||||
|
||||
/**
|
||||
* 删除发现管理与标签关联
|
||||
*
|
||||
* @param id 发现管理与标签关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteWxFindTagById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除发现管理与标签关联
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteWxFindTagByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 根据发现管理id软删除数据
|
||||
* @param wxFindId 发现管理id
|
||||
* @param updateDate 修改时间
|
||||
* @param updateName 修改人名称
|
||||
*/
|
||||
void deleteWxFindTagByWxFindId(@Param("wxFindId")Long wxFindId, @Param("updateDate")Date updateDate, @Param("updateName")String updateName, @Param("wxFindType")Integer wxFindType);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.flossom.common.core.mapper;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxInterfaceRequestLog;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 请求数云接口日志Mapper接口
|
||||
*/
|
||||
public interface WxInterfaceRequestLogMapper {
|
||||
|
||||
/**
|
||||
* 查询请求数云接口日志
|
||||
*
|
||||
* @param id 请求数云接口日志主键
|
||||
* @return 请求数云接口日志
|
||||
*/
|
||||
public WxInterfaceRequestLog selectWxInterfaceRequestLogById(Long id);
|
||||
|
||||
/**
|
||||
* 查询请求数云接口日志列表
|
||||
*
|
||||
* @param wxInterfaceRequestLog 请求数云接口日志
|
||||
* @return 请求数云接口日志集合
|
||||
*/
|
||||
public List<WxInterfaceRequestLog> selectWxInterfaceRequestLogList(WxInterfaceRequestLog wxInterfaceRequestLog);
|
||||
|
||||
/**
|
||||
* 新增请求数云接口日志
|
||||
*
|
||||
* @param wxInterfaceRequestLog 请求数云接口日志
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWxInterfaceRequestLog(WxInterfaceRequestLog wxInterfaceRequestLog);
|
||||
|
||||
/**
|
||||
* 修改请求数云接口日志
|
||||
*
|
||||
* @param wxInterfaceRequestLog 请求数云接口日志
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWxInterfaceRequestLog(WxInterfaceRequestLog wxInterfaceRequestLog);
|
||||
|
||||
/**
|
||||
* 删除请求数云接口日志
|
||||
*
|
||||
* @param id 请求数云接口日志主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxInterfaceRequestLogById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除请求数云接口日志
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxInterfaceRequestLogByIds(Long[] ids);
|
||||
|
||||
}
|
||||
@ -0,0 +1,66 @@
|
||||
package com.flossom.common.core.mapper;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxModeWe200Relation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Mapper接口
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-04-11
|
||||
*/
|
||||
public interface WxModeWe200RelationMapper {
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public WxModeWe200Relation selectWxModeWe200RelationById(Long id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param wxModeWe200Relation 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<WxModeWe200Relation> selectWxModeWe200RelationList(WxModeWe200Relation wxModeWe200Relation);
|
||||
|
||||
public WxModeWe200Relation selectWxModeWe200RelationByModeId(Long modeId);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param wxModeWe200Relation 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWxModeWe200Relation(WxModeWe200Relation wxModeWe200Relation);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param wxModeWe200Relation 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWxModeWe200Relation(WxModeWe200Relation wxModeWe200Relation);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxModeWe200RelationById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxModeWe200RelationByIds(Long[] ids);
|
||||
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
package com.flossom.common.core.request.miniProgram;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* 获取电流定制答题结果
|
||||
* @author CGLiang
|
||||
* @version 2.0.0
|
||||
* @date 2024/4/16
|
||||
*/
|
||||
public class AnswerResultRequest {
|
||||
|
||||
/**
|
||||
* 电流定制配方
|
||||
*/
|
||||
@NotEmpty(message = "电流定制配方不能为空")
|
||||
private List<String> electricList;
|
||||
|
||||
/**
|
||||
* 电流等级 (Lv1, Lv2, Lv3, Lv4, Lv5)
|
||||
*/
|
||||
@NotNull(message = "电流等级不能为空")
|
||||
private Integer electricLevel;
|
||||
|
||||
/**
|
||||
* 电流雷达图最小等级
|
||||
*/
|
||||
@NotNull(message = "电流雷达图最小等级不能为空")
|
||||
private Integer min;
|
||||
|
||||
/**
|
||||
* 模式id
|
||||
*/
|
||||
@NotNull(message = "模式id不能为空")
|
||||
private Long modeId;
|
||||
|
||||
public List<String> getElectricList() {
|
||||
return electricList;
|
||||
}
|
||||
|
||||
public void setElectricList(List<String> electricList) {
|
||||
this.electricList = electricList;
|
||||
}
|
||||
|
||||
public Integer getElectricLevel() {
|
||||
return electricLevel;
|
||||
}
|
||||
|
||||
public void setElectricLevel(Integer electricLevel) {
|
||||
this.electricLevel = electricLevel;
|
||||
}
|
||||
|
||||
public Long getModeId() {
|
||||
return modeId;
|
||||
}
|
||||
|
||||
public void setModeId(Long modeId) {
|
||||
this.modeId = modeId;
|
||||
}
|
||||
|
||||
public Integer getMin() {
|
||||
return min;
|
||||
}
|
||||
|
||||
public void setMin(Integer min) {
|
||||
this.min = min;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
package com.flossom.common.core.request.miniProgram;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 定制电流配方和频率
|
||||
* @author CGLiang
|
||||
* @version 2.0.0
|
||||
* @date 2024/4/16
|
||||
*/
|
||||
public class ElectricFormulaRequest {
|
||||
/**
|
||||
* 模式ID
|
||||
*/
|
||||
@NotNull(message = "模式ID不能为空")
|
||||
private Long modeId;
|
||||
|
||||
/**
|
||||
* 答题结论
|
||||
*/
|
||||
@NotEmpty(message = "答题结论不能为空")
|
||||
private List<Integer> formula;
|
||||
|
||||
public Long getModeId() {
|
||||
return modeId;
|
||||
}
|
||||
|
||||
public void setModeId(Long modeId) {
|
||||
this.modeId = modeId;
|
||||
}
|
||||
|
||||
public List<Integer> getFormula() {
|
||||
return formula;
|
||||
}
|
||||
|
||||
public void setFormula(List<Integer> formula) {
|
||||
this.formula = formula;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,73 @@
|
||||
package com.flossom.common.core.response.miniProgram;
|
||||
|
||||
/**
|
||||
* 眼雕大师模式定制电流配置响模型
|
||||
* @author CGLiang
|
||||
* @version 2.0.0
|
||||
* @date 2024/4/16
|
||||
*/
|
||||
public class EyeNursingElectricFormulaResponse {
|
||||
|
||||
/**
|
||||
* 眼周需求选择分组编号
|
||||
*/
|
||||
private String requirementSelection;
|
||||
|
||||
/**
|
||||
* 部位
|
||||
*/
|
||||
private String part;
|
||||
|
||||
/**
|
||||
* 电流种类
|
||||
*/
|
||||
private String CurrentType;
|
||||
|
||||
/**
|
||||
* 电流种类等级分值
|
||||
*/
|
||||
private Integer levelScore;
|
||||
|
||||
|
||||
public EyeNursingElectricFormulaResponse() {
|
||||
}
|
||||
|
||||
public EyeNursingElectricFormulaResponse(String requirementSelection, String part, String currentType, Integer levelScore) {
|
||||
this.requirementSelection = requirementSelection;
|
||||
this.part = part;
|
||||
CurrentType = currentType;
|
||||
this.levelScore = levelScore;
|
||||
}
|
||||
|
||||
public String getRequirementSelection() {
|
||||
return requirementSelection;
|
||||
}
|
||||
|
||||
public void setRequirementSelection(String requirementSelection) {
|
||||
this.requirementSelection = requirementSelection;
|
||||
}
|
||||
|
||||
public String getPart() {
|
||||
return part;
|
||||
}
|
||||
|
||||
public void setPart(String part) {
|
||||
this.part = part;
|
||||
}
|
||||
|
||||
public String getCurrentType() {
|
||||
return CurrentType;
|
||||
}
|
||||
|
||||
public void setCurrentType(String currentType) {
|
||||
CurrentType = currentType;
|
||||
}
|
||||
|
||||
public Integer getLevelScore() {
|
||||
return levelScore;
|
||||
}
|
||||
|
||||
public void setLevelScore(Integer levelScore) {
|
||||
this.levelScore = levelScore;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
package com.flossom.common.core.response.miniProgram;
|
||||
|
||||
/**
|
||||
* 眼雕大师雷达分数响应实体
|
||||
* @author CGLiang
|
||||
* @version 2.0.0
|
||||
* @date 2024/4/17
|
||||
*/
|
||||
public class RedarScoreResponse {
|
||||
|
||||
/**
|
||||
* 雷达问题描述名称
|
||||
*/
|
||||
private String redarName;
|
||||
|
||||
/**
|
||||
* 雷达问题描述分数
|
||||
*/
|
||||
private Integer redarScore;
|
||||
|
||||
|
||||
public RedarScoreResponse() {
|
||||
}
|
||||
|
||||
public RedarScoreResponse(String redarName, Integer redarScore) {
|
||||
this.redarName = redarName;
|
||||
this.redarScore = redarScore;
|
||||
}
|
||||
|
||||
public String getRedarName() {
|
||||
return redarName;
|
||||
}
|
||||
|
||||
public void setRedarName(String redarName) {
|
||||
this.redarName = redarName;
|
||||
}
|
||||
|
||||
public Integer getRedarScore() {
|
||||
return redarScore;
|
||||
}
|
||||
|
||||
public void setRedarScore(Integer redarScore) {
|
||||
this.redarScore = redarScore;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
package com.flossom.common.core.response.miniProgram;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 眼雕大师雷达响应结果
|
||||
* @author CGLiang
|
||||
* @version 2.0.0
|
||||
* @date 2024/4/17
|
||||
*/
|
||||
public class WxAnswerResponse {
|
||||
|
||||
/**
|
||||
* 护理时间
|
||||
*/
|
||||
private Integer nursingTime;
|
||||
|
||||
/**
|
||||
* 专属配方编号
|
||||
*/
|
||||
private String formulaCode;
|
||||
|
||||
/**
|
||||
* 雷达参数
|
||||
*/
|
||||
private List<RedarScoreResponse> redarScoreList;
|
||||
|
||||
/**
|
||||
* 定制电流配置
|
||||
*/
|
||||
private List<EyeNursingElectricFormulaResponse> electricFormulaList;
|
||||
|
||||
public List<EyeNursingElectricFormulaResponse> getElectricFormulaList() {
|
||||
return electricFormulaList;
|
||||
}
|
||||
|
||||
public void setElectricFormulaList(List<EyeNursingElectricFormulaResponse> electricFormulaList) {
|
||||
this.electricFormulaList = electricFormulaList;
|
||||
}
|
||||
|
||||
public Integer getNursingTime() {
|
||||
return nursingTime;
|
||||
}
|
||||
|
||||
public void setNursingTime(Integer nursingTime) {
|
||||
this.nursingTime = nursingTime;
|
||||
}
|
||||
|
||||
public String getFormulaCode() {
|
||||
return formulaCode;
|
||||
}
|
||||
|
||||
public void setFormulaCode(String formulaCode) {
|
||||
this.formulaCode = formulaCode;
|
||||
}
|
||||
|
||||
public List<RedarScoreResponse> getRedarScoreList() {
|
||||
return redarScoreList;
|
||||
}
|
||||
|
||||
public void setRedarScoreList(List<RedarScoreResponse> redarScoreList) {
|
||||
this.redarScoreList = redarScoreList;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
|
||||
package com.flossom.common.core.utils;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class CollectionUtils {
|
||||
|
||||
private CollectionUtils() {
|
||||
}
|
||||
|
||||
public static boolean isNotEmpty(Collection<?> collection) {
|
||||
return !isEmpty(collection);
|
||||
}
|
||||
|
||||
public static boolean isEmpty(Collection<?> collection) {
|
||||
return null == collection || collection.isEmpty();
|
||||
}
|
||||
|
||||
public static int size(Collection<?> collection) {
|
||||
return null == collection ? 0 : collection.size();
|
||||
}
|
||||
|
||||
public static <T> List<List<T>> split(List<T> list, int size) {
|
||||
if (isEmpty(list)) {
|
||||
return Collections.emptyList();
|
||||
} else {
|
||||
int listSize = list.size();
|
||||
List<List<T>> result = new ArrayList(listSize / size + 1);
|
||||
int offset = 0;
|
||||
|
||||
for (int toIdx = size; toIdx <= listSize; toIdx += size) {
|
||||
result.add(list.subList(offset, toIdx));
|
||||
offset = toIdx;
|
||||
}
|
||||
|
||||
if (offset < listSize) {
|
||||
result.add(list.subList(offset, listSize));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,393 @@
|
||||
package com.flossom.common.core.utils;
|
||||
|
||||
|
||||
import org.apache.http.Consts;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.apache.http.client.config.RequestConfig;
|
||||
import org.apache.http.client.config.RequestConfig.Builder;
|
||||
import org.apache.http.client.entity.UrlEncodedFormEntity;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.client.utils.URIBuilder;
|
||||
import org.apache.http.conn.ConnectTimeoutException;
|
||||
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
|
||||
import org.apache.http.conn.ssl.SSLContextBuilder;
|
||||
import org.apache.http.conn.ssl.TrustStrategy;
|
||||
import org.apache.http.conn.ssl.X509HostnameVerifier;
|
||||
import org.apache.http.entity.ContentType;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
|
||||
import org.apache.http.message.BasicNameValuePair;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.SSLException;
|
||||
import javax.net.ssl.SSLSession;
|
||||
import javax.net.ssl.SSLSocket;
|
||||
import java.io.IOException;
|
||||
import java.net.SocketTimeoutException;
|
||||
import java.net.URI;
|
||||
import java.security.GeneralSecurityException;
|
||||
import java.security.cert.CertificateException;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
public class HttpClientUtils {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(HttpClientUtils.class);
|
||||
|
||||
public static final int connTimeout = 10000;
|
||||
public static final int readTimeout = 10000;
|
||||
public static final String charset = "UTF-8";
|
||||
private static HttpClient client = null;
|
||||
|
||||
static {
|
||||
PoolingHttpClientConnectionManager cm = new PoolingHttpClientConnectionManager();
|
||||
cm.setMaxTotal(128);
|
||||
cm.setDefaultMaxPerRoute(128);
|
||||
client = HttpClients.custom().setConnectionManager(cm).build();
|
||||
}
|
||||
|
||||
public static String postJsonParameters(String url, String parameterStr) throws Exception {
|
||||
return postJson(url, parameterStr, charset, connTimeout, readTimeout);
|
||||
}
|
||||
|
||||
public static String postParameters(String url, String parameterStr) throws Exception {
|
||||
return post(url, parameterStr, "application/x-www-form-urlencoded", charset, connTimeout, readTimeout);
|
||||
}
|
||||
|
||||
public static String postParameters(String url, String parameterStr, String charset, Integer connTimeout, Integer readTimeout) throws ConnectTimeoutException, SocketTimeoutException, Exception {
|
||||
return post(url, parameterStr, "application/x-www-form-urlencoded", charset, connTimeout, readTimeout);
|
||||
}
|
||||
|
||||
public static String postParameters(String url, Map<String, String> params) throws ConnectTimeoutException,
|
||||
SocketTimeoutException, Exception {
|
||||
return postForm(url, params, null, connTimeout, readTimeout);
|
||||
}
|
||||
|
||||
public static String postParameters(String url, Map<String, String> params, Integer connTimeout, Integer readTimeout) throws ConnectTimeoutException,
|
||||
SocketTimeoutException, Exception {
|
||||
return postForm(url, params, null, connTimeout, readTimeout);
|
||||
}
|
||||
|
||||
public static String get(String url) throws Exception {
|
||||
return get(url, charset, null, null);
|
||||
}
|
||||
|
||||
public static String get(String url, String charset) throws Exception {
|
||||
return get(url, charset, connTimeout, readTimeout);
|
||||
}
|
||||
|
||||
public static String getParameters(String url, Map<String, String> params) throws Exception {
|
||||
URIBuilder builder = new URIBuilder(url);
|
||||
if (params != null) {
|
||||
for (String key : params.keySet()) {
|
||||
builder.addParameter(key, params.get(key));
|
||||
}
|
||||
}
|
||||
URI uri = builder.build();
|
||||
return get(uri.toString(), charset, null, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送一个 Post 请求, 使用指定的字符集编码.
|
||||
*
|
||||
* @param url
|
||||
* @param body RequestBody
|
||||
* @param charset 编码
|
||||
* @param connTimeout 建立链接超时时间,毫秒.
|
||||
* @param readTimeout 响应超时时间,毫秒.
|
||||
* @return ResponseBody, 使用指定的字符集编码.
|
||||
* @throws ConnectTimeoutException 建立链接超时异常
|
||||
* @throws SocketTimeoutException 响应超时
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String postJson(String url, String body, String charset, Integer connTimeout, Integer readTimeout) throws Exception {
|
||||
HttpClient client = null;
|
||||
HttpPost post = new HttpPost(url);
|
||||
String result = "";
|
||||
try {
|
||||
if (StringUtils.isNotBlank(body)) {
|
||||
HttpEntity entity = new StringEntity(body, ContentType.APPLICATION_JSON);
|
||||
post.setEntity(entity);
|
||||
}
|
||||
|
||||
// 设置参数
|
||||
Builder customReqConf = RequestConfig.custom();
|
||||
if (connTimeout != null) {
|
||||
customReqConf.setConnectTimeout(connTimeout);
|
||||
}
|
||||
if (readTimeout != null) {
|
||||
customReqConf.setSocketTimeout(readTimeout);
|
||||
}
|
||||
post.setConfig(customReqConf.build());
|
||||
|
||||
HttpResponse res;
|
||||
if (url.startsWith("https")) {
|
||||
// 执行 Https 请求.
|
||||
client = createSSLInsecureClient();
|
||||
res = client.execute(post);
|
||||
} else {
|
||||
// 执行 Http 请求.
|
||||
client = HttpClientUtils.client;
|
||||
res = client.execute(post);
|
||||
}
|
||||
result = EntityUtils.toString(res.getEntity(), charset);
|
||||
} catch (Exception ex) {
|
||||
log.error("HttpClient request error!", ex);
|
||||
throw ex;
|
||||
} finally {
|
||||
post.releaseConnection();
|
||||
if (url.startsWith("https") && client != null && client instanceof CloseableHttpClient) {
|
||||
((CloseableHttpClient) client).close();
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送一个 Post 请求, 使用指定的字符集编码.
|
||||
*
|
||||
* @param url
|
||||
* @param body RequestBody
|
||||
* @param mimeType 例如 application/xml "application/x-www-form-urlencoded" a=1&b=2&c=3
|
||||
* @param charset 编码
|
||||
* @param connTimeout 建立链接超时时间,毫秒.
|
||||
* @param readTimeout 响应超时时间,毫秒.
|
||||
* @return ResponseBody, 使用指定的字符集编码.
|
||||
* @throws ConnectTimeoutException 建立链接超时异常
|
||||
* @throws SocketTimeoutException 响应超时
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String post(String url, String body, String mimeType, String charset, Integer connTimeout, Integer readTimeout)
|
||||
throws ConnectTimeoutException, SocketTimeoutException, Exception {
|
||||
HttpClient client = null;
|
||||
HttpPost post = new HttpPost(url);
|
||||
String result = "";
|
||||
try {
|
||||
if (StringUtils.isNotBlank(body)) {
|
||||
HttpEntity entity = new StringEntity(body, ContentType.create(mimeType, charset));
|
||||
post.setEntity(entity);
|
||||
}
|
||||
// 设置参数
|
||||
Builder customReqConf = RequestConfig.custom();
|
||||
if (connTimeout != null) {
|
||||
customReqConf.setConnectTimeout(connTimeout);
|
||||
}
|
||||
if (readTimeout != null) {
|
||||
customReqConf.setSocketTimeout(readTimeout);
|
||||
}
|
||||
post.setConfig(customReqConf.build());
|
||||
|
||||
HttpResponse res;
|
||||
if (url.startsWith("https")) {
|
||||
// 执行 Https 请求.
|
||||
client = createSSLInsecureClient();
|
||||
res = client.execute(post);
|
||||
} else {
|
||||
// 执行 Http 请求.
|
||||
client = HttpClientUtils.client;
|
||||
res = client.execute(post);
|
||||
}
|
||||
result = EntityUtils.toString(res.getEntity(), charset);
|
||||
} catch (Exception ex) {
|
||||
log.error("HttpClient request error!", ex);
|
||||
throw ex;
|
||||
} finally {
|
||||
post.releaseConnection();
|
||||
if (url.startsWith("https") && client != null && client instanceof CloseableHttpClient) {
|
||||
((CloseableHttpClient) client).close();
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交form表单
|
||||
*
|
||||
* @param url
|
||||
* @param params
|
||||
* @param connTimeout
|
||||
* @param readTimeout
|
||||
* @return
|
||||
* @throws ConnectTimeoutException
|
||||
* @throws SocketTimeoutException
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String postForm(String url, Map<String, String> params, Map<String, String> headers, Integer connTimeout, Integer readTimeout) throws ConnectTimeoutException,
|
||||
SocketTimeoutException, Exception {
|
||||
|
||||
HttpClient client = null;
|
||||
HttpPost post = new HttpPost(url);
|
||||
try {
|
||||
if (params != null && !params.isEmpty()) {
|
||||
List<NameValuePair> formParams = new ArrayList<NameValuePair>();
|
||||
Set<Entry<String, String>> entrySet = params.entrySet();
|
||||
for (Entry<String, String> entry : entrySet) {
|
||||
formParams.add(new BasicNameValuePair(entry.getKey(), entry.getValue()));
|
||||
}
|
||||
UrlEncodedFormEntity entity = new UrlEncodedFormEntity(formParams, Consts.UTF_8);
|
||||
post.setEntity(entity);
|
||||
}
|
||||
|
||||
if (headers != null && !headers.isEmpty()) {
|
||||
for (Entry<String, String> entry : headers.entrySet()) {
|
||||
post.addHeader(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
// 设置参数
|
||||
Builder customReqConf = RequestConfig.custom();
|
||||
if (connTimeout != null) {
|
||||
customReqConf.setConnectTimeout(connTimeout);
|
||||
}
|
||||
if (readTimeout != null) {
|
||||
customReqConf.setSocketTimeout(readTimeout);
|
||||
}
|
||||
post.setConfig(customReqConf.build());
|
||||
HttpResponse res = null;
|
||||
if (url.startsWith("https")) {
|
||||
// 执行 Https 请求.
|
||||
client = createSSLInsecureClient();
|
||||
res = client.execute(post);
|
||||
} else {
|
||||
// 执行 Http 请求.
|
||||
client = HttpClientUtils.client;
|
||||
res = client.execute(post);
|
||||
}
|
||||
return EntityUtils.toString(res.getEntity(), charset);
|
||||
} catch (Exception ex) {
|
||||
log.error("HttpClient request error!", ex);
|
||||
throw ex;
|
||||
} finally {
|
||||
post.releaseConnection();
|
||||
if (url.startsWith("https") && client != null
|
||||
&& client instanceof CloseableHttpClient) {
|
||||
((CloseableHttpClient) client).close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送一个 GET 请求
|
||||
*
|
||||
* @param url
|
||||
* @param charset
|
||||
* @param connTimeout 建立链接超时时间,毫秒.
|
||||
* @param readTimeout 响应超时时间,毫秒.
|
||||
* @return
|
||||
* @throws ConnectTimeoutException 建立链接超时
|
||||
* @throws SocketTimeoutException 响应超时
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String get(String url, String charset, Integer connTimeout, Integer readTimeout)
|
||||
throws ConnectTimeoutException, SocketTimeoutException, Exception {
|
||||
|
||||
HttpClient client = null;
|
||||
HttpGet get = new HttpGet(url);
|
||||
String result = "";
|
||||
try {
|
||||
// 设置参数
|
||||
Builder customReqConf = RequestConfig.custom();
|
||||
if (connTimeout != null) {
|
||||
customReqConf.setConnectTimeout(connTimeout);
|
||||
}
|
||||
if (readTimeout != null) {
|
||||
customReqConf.setSocketTimeout(readTimeout);
|
||||
}
|
||||
get.setConfig(customReqConf.build());
|
||||
|
||||
HttpResponse res = null;
|
||||
|
||||
if (url.startsWith("https")) {
|
||||
// 执行 Https 请求.
|
||||
client = createSSLInsecureClient();
|
||||
res = client.execute(get);
|
||||
} else {
|
||||
// 执行 Http 请求.
|
||||
client = HttpClientUtils.client;
|
||||
res = client.execute(get);
|
||||
}
|
||||
result = EntityUtils.toString(res.getEntity(), charset);
|
||||
} catch (Exception ex) {
|
||||
log.error("HttpClient request error!", ex);
|
||||
throw ex;
|
||||
} finally {
|
||||
get.releaseConnection();
|
||||
if (url.startsWith("https") && client != null && client instanceof CloseableHttpClient) {
|
||||
((CloseableHttpClient) client).close();
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 从 response 里获取 charset
|
||||
*
|
||||
* @param ressponse
|
||||
* @return
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
private static String getCharsetFromResponse(HttpResponse ressponse) {
|
||||
// Content-Type:text/html; charset=GBK
|
||||
if (ressponse.getEntity() != null && ressponse.getEntity().getContentType() != null && ressponse.getEntity().getContentType().getValue() != null) {
|
||||
String contentType = ressponse.getEntity().getContentType().getValue();
|
||||
if (contentType.contains("charset=")) {
|
||||
return contentType.substring(contentType.indexOf("charset=") + 8);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建 SSL连接
|
||||
*
|
||||
* @return
|
||||
* @throws GeneralSecurityException
|
||||
*/
|
||||
private static CloseableHttpClient createSSLInsecureClient() throws GeneralSecurityException {
|
||||
try {
|
||||
SSLContext sslContext = new SSLContextBuilder().loadTrustMaterial(null, new TrustStrategy() {
|
||||
public boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException {
|
||||
return true;
|
||||
}
|
||||
}).build();
|
||||
SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext, new X509HostnameVerifier() {
|
||||
|
||||
@Override
|
||||
public boolean verify(String arg0, SSLSession arg1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void verify(String host, SSLSocket ssl)
|
||||
throws IOException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void verify(String host, X509Certificate cert)
|
||||
throws SSLException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void verify(String host, String[] cns,
|
||||
String[] subjectAlts) throws SSLException {
|
||||
}
|
||||
});
|
||||
return HttpClients.custom().setSSLSocketFactory(sslsf).build();
|
||||
} catch (GeneralSecurityException e) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,118 +1,117 @@
|
||||
package com.flossom.common.core.web.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
|
||||
/**
|
||||
* Entity基类
|
||||
*
|
||||
* @author flossom
|
||||
*/
|
||||
public class BaseEntity implements Serializable
|
||||
{
|
||||
public class BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 搜索值 */
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@JsonIgnore
|
||||
private String searchValue;
|
||||
|
||||
/** 创建者 */
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String createBy;
|
||||
|
||||
/** 创建时间 */
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/** 更新者 */
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
/** 更新时间 */
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
/** 备注 */
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/** 请求参数 */
|
||||
/**
|
||||
* 请求参数
|
||||
*/
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private Map<String, Object> params;
|
||||
|
||||
public String getSearchValue()
|
||||
{
|
||||
public String getSearchValue() {
|
||||
return searchValue;
|
||||
}
|
||||
|
||||
public void setSearchValue(String searchValue)
|
||||
{
|
||||
public void setSearchValue(String searchValue) {
|
||||
this.searchValue = searchValue;
|
||||
}
|
||||
|
||||
public String getCreateBy()
|
||||
{
|
||||
public String getCreateBy() {
|
||||
return createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy)
|
||||
{
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public Date getCreateTime()
|
||||
{
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime)
|
||||
{
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getUpdateBy()
|
||||
{
|
||||
public String getUpdateBy() {
|
||||
return updateBy;
|
||||
}
|
||||
|
||||
public void setUpdateBy(String updateBy)
|
||||
{
|
||||
public void setUpdateBy(String updateBy) {
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
public Date getUpdateTime()
|
||||
{
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime)
|
||||
{
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public String getRemark()
|
||||
{
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark)
|
||||
{
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public Map<String, Object> getParams()
|
||||
{
|
||||
if (params == null)
|
||||
{
|
||||
public Map<String, Object> getParams() {
|
||||
if (params == null) {
|
||||
params = new HashMap<>();
|
||||
}
|
||||
return params;
|
||||
}
|
||||
|
||||
public void setParams(Map<String, Object> params)
|
||||
{
|
||||
public void setParams(Map<String, Object> params) {
|
||||
this.params = params;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,218 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.flossom.common.core.mapper.WxFindCarouselMapper">
|
||||
|
||||
<resultMap type="com.flossom.common.core.domain.entity.WxFindCarousel" id="WxFindCarouselResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="title" column="title" />
|
||||
<result property="fileUrl" column="file_url" />
|
||||
<result property="siteStartTime" column="site_start_time" />
|
||||
<result property="siteEndTime" column="site_end_time" />
|
||||
<result property="userRegisterStartTime" column="user_register_start_time" />
|
||||
<result property="userRegisterEndTime" column="user_register_end_time" />
|
||||
<result property="showWechatTagId" column="show_wechat_tag_id" />
|
||||
<result property="showCompanyTagId" column="show_company_tag_id" />
|
||||
<result property="forbidWechatTagId" column="forbid_wechat_tag_id" />
|
||||
<result property="forbidCompanyTagId" column="forbid_company_tag_id" />
|
||||
<result property="handlerCompanyTagId" column="handler_company_tag_id" />
|
||||
<result property="handlerWechatTagId" column="handler_wechat_tag_id" />
|
||||
<result property="channelId" column="channel_id" />
|
||||
<result property="instrumentId" column="instrument_id" />
|
||||
<result property="operate" column="operate" />
|
||||
<result property="signNumber" column="sign_number" />
|
||||
<result property="userType" column="user_type" />
|
||||
<result property="orderNumber" column="order_number" />
|
||||
<result property="type" column="type" />
|
||||
<result property="link" column="link" />
|
||||
<result property="linkParams" column="link_params" />
|
||||
<result property="redirectAppid" column="redirect_appid" />
|
||||
<result property="redirectUrl" column="redirect_url" />
|
||||
<result property="videoNo" column="video_no" />
|
||||
<result property="feedId" column="feed_id" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWxFindCarouselVo">
|
||||
select id, title, file_url, site_start_time, site_end_time, user_register_start_time, user_register_end_time, show_wechat_tag_id, show_company_tag_id, forbid_wechat_tag_id, forbid_company_tag_id, handler_company_tag_id, handler_wechat_tag_id, channel_id, instrument_id, operate, sign_number, user_type, order_number, type, link, link_params, redirect_appid, redirect_url, video_no, feed_id, create_by, create_time, update_by, update_time, del_flag from wx_find_carousel
|
||||
</sql>
|
||||
|
||||
<select id="selectWxFindCarouselList" parameterType="com.flossom.common.core.domain.entity.WxFindCarousel" resultMap="WxFindCarouselResult">
|
||||
<include refid="selectWxFindCarouselVo"/>
|
||||
<where>
|
||||
del_flag = 0
|
||||
<if test="title != null and title != ''"> and title = #{title}</if>
|
||||
<if test="fileUrl != null and fileUrl != ''"> and file_url = #{fileUrl}</if>
|
||||
<if test="siteStartTime != null "> and site_start_time >= #{siteStartTime}</if>
|
||||
<if test="siteEndTime != null "> and site_end_time <= #{siteEndTime}</if>
|
||||
<if test="userRegisterStartTime != null "> and user_register_start_time >= #{userRegisterStartTime}</if>
|
||||
<if test="userRegisterEndTime != null "> and user_register_end_time <= #{userRegisterEndTime}</if>
|
||||
<if test="showWechatTagId != null and showWechatTagId != ''"> and show_wechat_tag_id = #{showWechatTagId}</if>
|
||||
<if test="showCompanyTagId != null and showCompanyTagId != ''"> and show_company_tag_id = #{showCompanyTagId}</if>
|
||||
<if test="forbidWechatTagId != null and forbidWechatTagId != ''"> and forbid_wechat_tag_id = #{forbidWechatTagId}</if>
|
||||
<if test="forbidCompanyTagId != null and forbidCompanyTagId != ''"> and forbid_company_tag_id = #{forbidCompanyTagId}</if>
|
||||
<if test="handlerCompanyTagId != null and handlerCompanyTagId != ''"> and handler_company_tag_id = #{handlerCompanyTagId}</if>
|
||||
<if test="handlerWechatTagId != null and handlerWechatTagId != ''"> and handler_wechat_tag_id = #{handlerWechatTagId}</if>
|
||||
<if test="channelId != null and channelId != ''"> and channel_id = #{channelId}</if>
|
||||
<if test="instrumentId != null and instrumentId != ''"> and instrument_id = #{instrumentId}</if>
|
||||
<if test="operate != null "> and operate = #{operate}</if>
|
||||
<if test="signNumber != null "> and sign_number = #{signNumber}</if>
|
||||
<if test="userType != null "> and user_type = #{userType}</if>
|
||||
<if test="orderNumber != null "> and order_number = #{orderNumber}</if>
|
||||
<if test="type != null "> and type = #{type}</if>
|
||||
<if test="link != null and link != ''"> and link = #{link}</if>
|
||||
<if test="linkParams != null and linkParams != ''"> and link_params = #{linkParams}</if>
|
||||
<if test="redirectAppid != null and redirectAppid != ''"> and redirect_appid = #{redirectAppid}</if>
|
||||
<if test="redirectUrl != null and redirectUrl != ''"> and redirect_url = #{redirectUrl}</if>
|
||||
<if test="videoNo != null and videoNo != ''"> and video_no = #{videoNo}</if>
|
||||
<if test="feedId != null and feedId != ''"> and feed_id = #{feedId}</if>
|
||||
</where>
|
||||
order by order_number desc, coalesce(update_time, create_time) desc
|
||||
</select>
|
||||
|
||||
<select id="selectWxFindCarouselById" parameterType="Long" resultMap="WxFindCarouselResult">
|
||||
<include refid="selectWxFindCarouselVo"/>
|
||||
where id = #{id} and del_flag = 0 limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertWxFindCarousel" parameterType="com.flossom.common.core.domain.entity.WxFindCarousel" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into wx_find_carousel
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="title != null">title,</if>
|
||||
<if test="fileUrl != null">file_url,</if>
|
||||
<if test="siteStartTime != null">site_start_time,</if>
|
||||
<if test="siteEndTime != null">site_end_time,</if>
|
||||
<if test="userRegisterStartTime != null">user_register_start_time,</if>
|
||||
<if test="userRegisterEndTime != null">user_register_end_time,</if>
|
||||
<if test="showWechatTagId != null">show_wechat_tag_id,</if>
|
||||
<if test="showCompanyTagId != null">show_company_tag_id,</if>
|
||||
<if test="forbidWechatTagId != null">forbid_wechat_tag_id,</if>
|
||||
<if test="forbidCompanyTagId != null">forbid_company_tag_id,</if>
|
||||
<if test="handlerCompanyTagId != null">handler_company_tag_id,</if>
|
||||
<if test="handlerWechatTagId != null">handler_wechat_tag_id,</if>
|
||||
<if test="channelId != null">channel_id,</if>
|
||||
<if test="instrumentId != null">instrument_id,</if>
|
||||
<if test="operate != null">operate,</if>
|
||||
<if test="signNumber != null">sign_number,</if>
|
||||
<if test="userType != null">user_type,</if>
|
||||
<if test="orderNumber != null">order_number,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="link != null">link,</if>
|
||||
<if test="linkParams != null">link_params,</if>
|
||||
<if test="redirectAppid != null">redirect_appid,</if>
|
||||
<if test="redirectUrl != null">redirect_url,</if>
|
||||
<if test="videoNo != null">video_no,</if>
|
||||
<if test="feedId != null">feed_id,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="title != null">#{title},</if>
|
||||
<if test="fileUrl != null">#{fileUrl},</if>
|
||||
<if test="siteStartTime != null">#{siteStartTime},</if>
|
||||
<if test="siteEndTime != null">#{siteEndTime},</if>
|
||||
<if test="userRegisterStartTime != null">#{userRegisterStartTime},</if>
|
||||
<if test="userRegisterEndTime != null">#{userRegisterEndTime},</if>
|
||||
<if test="showWechatTagId != null">#{showWechatTagId},</if>
|
||||
<if test="showCompanyTagId != null">#{showCompanyTagId},</if>
|
||||
<if test="forbidWechatTagId != null">#{forbidWechatTagId},</if>
|
||||
<if test="forbidCompanyTagId != null">#{forbidCompanyTagId},</if>
|
||||
<if test="handlerCompanyTagId != null">#{handlerCompanyTagId},</if>
|
||||
<if test="handlerWechatTagId != null">#{handlerWechatTagId},</if>
|
||||
<if test="channelId != null">#{channelId},</if>
|
||||
<if test="instrumentId != null">#{instrumentId},</if>
|
||||
<if test="operate != null">#{operate},</if>
|
||||
<if test="signNumber != null">#{signNumber},</if>
|
||||
<if test="userType != null">#{userType},</if>
|
||||
<if test="orderNumber != null">#{orderNumber},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="link != null">#{link},</if>
|
||||
<if test="linkParams != null">#{linkParams},</if>
|
||||
<if test="redirectAppid != null">#{redirectAppid},</if>
|
||||
<if test="redirectUrl != null">#{redirectUrl},</if>
|
||||
<if test="videoNo != null">#{videoNo},</if>
|
||||
<if test="feedId != null">#{feedId},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWxFindCarousel" parameterType="com.flossom.common.core.domain.entity.WxFindCarousel">
|
||||
update wx_find_carousel
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="title != null">title = #{title},</if>
|
||||
<if test="fileUrl != null">file_url = #{fileUrl},</if>
|
||||
<if test="siteStartTime != null">site_start_time = #{siteStartTime},</if>
|
||||
<if test="siteEndTime != null">site_end_time = #{siteEndTime},</if>
|
||||
<if test="userRegisterStartTime != null">user_register_start_time = #{userRegisterStartTime},</if>
|
||||
<if test="userRegisterEndTime != null">user_register_end_time = #{userRegisterEndTime},</if>
|
||||
<if test="showWechatTagId != null">show_wechat_tag_id = #{showWechatTagId},</if>
|
||||
<if test="showCompanyTagId != null">show_company_tag_id = #{showCompanyTagId},</if>
|
||||
<if test="forbidWechatTagId != null">forbid_wechat_tag_id = #{forbidWechatTagId},</if>
|
||||
<if test="forbidCompanyTagId != null">forbid_company_tag_id = #{forbidCompanyTagId},</if>
|
||||
<if test="handlerCompanyTagId != null">handler_company_tag_id = #{handlerCompanyTagId},</if>
|
||||
<if test="handlerWechatTagId != null">handler_wechat_tag_id = #{handlerWechatTagId},</if>
|
||||
<if test="channelId != null">channel_id = #{channelId},</if>
|
||||
<if test="instrumentId != null">instrument_id = #{instrumentId},</if>
|
||||
<if test="operate != null">operate = #{operate},</if>
|
||||
<if test="signNumber != null">sign_number = #{signNumber},</if>
|
||||
<if test="userType != null">user_type = #{userType},</if>
|
||||
<if test="orderNumber != null">order_number = #{orderNumber},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="link != null">link = #{link},</if>
|
||||
<if test="linkParams != null">link_params = #{linkParams},</if>
|
||||
<if test="redirectAppid != null">redirect_appid = #{redirectAppid},</if>
|
||||
<if test="redirectUrl != null">redirect_url = #{redirectUrl},</if>
|
||||
<if test="videoNo != null">video_no = #{videoNo},</if>
|
||||
<if test="feedId != null">feed_id = #{feedId},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWxFindCarouselById">
|
||||
update wx_find_carousel
|
||||
set update_by = #{updateName},
|
||||
update_time = #{updateDate},
|
||||
del_flag = 2
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<!-- 修改排序 -->
|
||||
<update id="updateSortOrOpen">
|
||||
update wx_find_carousel
|
||||
set
|
||||
order_number = #{orderNumber},
|
||||
operate = #{operate},
|
||||
update_by = #{updateName},
|
||||
update_time = #{updateDate}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
<delete id="deleteWxFindCarouselByIds">
|
||||
update wx_find_carousel
|
||||
set update_by = #{updateName},
|
||||
update_time = #{updateDate},
|
||||
del_flag = 2
|
||||
where id in
|
||||
<foreach item="id" collection="ids" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.flossom.common.core.mapper.WxFindInstrumentMapper">
|
||||
|
||||
<resultMap type="com.flossom.common.core.domain.entity.WxFindInstrument" id="WxFindInstrumentResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="wxFindId" column="wx_find_id" />
|
||||
<result property="wxFindType" column="wx_find_type" />
|
||||
<result property="instrumentId" column="instrument_id" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWxFindInstrumentVo">
|
||||
select id, wx_find_id, wx_find_type, instrument_id, create_by, create_time, update_by, update_time, del_flag from wx_find_instrument
|
||||
</sql>
|
||||
|
||||
<select id="selectWxFindInstrumentList" parameterType="com.flossom.common.core.domain.entity.WxFindInstrument" resultMap="WxFindInstrumentResult">
|
||||
<include refid="selectWxFindInstrumentVo"/>
|
||||
<where>
|
||||
del_flag = 0
|
||||
<if test="wxFindId != null "> and wx_find_id = #{wxFindId}</if>
|
||||
<if test="wxFindType != null "> and wx_find_type = #{wxFindType}</if>
|
||||
<if test="instrumentId != null "> and instrument_id = #{instrumentId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectWxFindInstrumentById" parameterType="Long" resultMap="WxFindInstrumentResult">
|
||||
<include refid="selectWxFindInstrumentVo"/>
|
||||
where id = #{id} and del_flag = 0 limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertWxFindInstrument" parameterType="com.flossom.common.core.domain.entity.WxFindInstrument" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into wx_find_instrument
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="wxFindId != null">wx_find_id,</if>
|
||||
<if test="wxFindType != null ">wx_find_type,</if>
|
||||
<if test="instrumentId != null">instrument_id,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="wxFindId != null">#{wxFindId},</if>
|
||||
<if test="wxFindType != null ">#{wxFindType},</if>
|
||||
<if test="instrumentId != null">#{instrumentId},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWxFindInstrument" parameterType="com.flossom.common.core.domain.entity.WxFindInstrument">
|
||||
update wx_find_instrument
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="wxFindId != null">wx_find_id = #{wxFindId},</if>
|
||||
<if test="wxFindType != null ">wx_find_type = #{wxFindType},</if>
|
||||
<if test="instrumentId != null">instrument_id = #{instrumentId},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWxFindInstrumentById" parameterType="Long">
|
||||
update wx_find_instrument set delFlag = 2 where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWxFindInstrumentByIds" parameterType="String">
|
||||
update wx_find_instrument set delFlag = 2 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 根据发现管理id软删除数据 -->
|
||||
<update id="deleteWxFindInstrumentByWxFindId">
|
||||
update wx_find_instrument
|
||||
set update_by = #{updateName},
|
||||
update_time = #{updateDate},
|
||||
del_flag = 2
|
||||
where wx_find_id = #{wxFindId} and wx_find_type = #{wxFindType}
|
||||
</update>
|
||||
</mapper>
|
||||
@ -0,0 +1,217 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.flossom.common.core.mapper.WxFindProductStrategyMapper">
|
||||
|
||||
<resultMap type="com.flossom.common.core.domain.entity.WxFindProductStrategy" id="WxFindProductStrategyResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="title" column="title" />
|
||||
<result property="fileUrl" column="file_url" />
|
||||
<result property="siteStartTime" column="site_start_time" />
|
||||
<result property="siteEndTime" column="site_end_time" />
|
||||
<result property="userRegisterStartTime" column="user_register_start_time" />
|
||||
<result property="userRegisterEndTime" column="user_register_end_time" />
|
||||
<result property="showWechatTagId" column="show_wechat_tag_id" />
|
||||
<result property="showCompanyTagId" column="show_company_tag_id" />
|
||||
<result property="forbidWechatTagId" column="forbid_wechat_tag_id" />
|
||||
<result property="forbidCompanyTagId" column="forbid_company_tag_id" />
|
||||
<result property="handlerCompanyTagId" column="handler_company_tag_id" />
|
||||
<result property="handlerWechatTagId" column="handler_wechat_tag_id" />
|
||||
<result property="channelId" column="channel_id" />
|
||||
<result property="instrumentId" column="instrument_id" />
|
||||
<result property="operate" column="operate" />
|
||||
<result property="signNumber" column="sign_number" />
|
||||
<result property="userType" column="user_type" />
|
||||
<result property="orderNumber" column="order_number" />
|
||||
<result property="type" column="type" />
|
||||
<result property="link" column="link" />
|
||||
<result property="linkParams" column="link_params" />
|
||||
<result property="redirectAppid" column="redirect_appid" />
|
||||
<result property="redirectUrl" column="redirect_url" />
|
||||
<result property="videoNo" column="video_no" />
|
||||
<result property="feedId" column="feed_id" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWxFindProductStrategyVo">
|
||||
select id, title, file_url, site_start_time, site_end_time, user_register_start_time, user_register_end_time, show_wechat_tag_id, show_company_tag_id, forbid_wechat_tag_id, forbid_company_tag_id, handler_company_tag_id, handler_wechat_tag_id, channel_id, instrument_id, operate, sign_number, user_type, order_number, type, link, link_params, redirect_appid, redirect_url, video_no, feed_id, create_by, create_time, update_by, update_time, del_flag from wx_find_product_strategy
|
||||
</sql>
|
||||
|
||||
<select id="selectWxFindProductStrategyList" parameterType="com.flossom.common.core.domain.entity.WxFindProductStrategy" resultMap="WxFindProductStrategyResult">
|
||||
<include refid="selectWxFindProductStrategyVo"/>
|
||||
<where>
|
||||
del_flag = 0
|
||||
<if test="title != null and title != ''"> and title = #{title}</if>
|
||||
<if test="fileUrl != null and fileUrl != ''"> and file_url = #{fileUrl}</if>
|
||||
<if test="siteStartTime != null "> and site_start_time >= #{siteStartTime}</if>
|
||||
<if test="siteEndTime != null "> and site_end_time <= #{siteEndTime}</if>
|
||||
<if test="userRegisterStartTime != null "> and user_register_start_time >= #{userRegisterStartTime}</if>
|
||||
<if test="userRegisterEndTime != null "> and user_register_end_time <= #{userRegisterEndTime}</if>
|
||||
<if test="showWechatTagId != null and showWechatTagId != ''"> and show_wechat_tag_id = #{showWechatTagId}</if>
|
||||
<if test="showCompanyTagId != null and showCompanyTagId != ''"> and show_company_tag_id = #{showCompanyTagId}</if>
|
||||
<if test="forbidWechatTagId != null and forbidWechatTagId != ''"> and forbid_wechat_tag_id = #{forbidWechatTagId}</if>
|
||||
<if test="forbidCompanyTagId != null and forbidCompanyTagId != ''"> and forbid_company_tag_id = #{forbidCompanyTagId}</if>
|
||||
<if test="handlerCompanyTagId != null and handlerCompanyTagId != ''"> and handler_company_tag_id = #{handlerCompanyTagId}</if>
|
||||
<if test="handlerWechatTagId != null and handlerWechatTagId != ''"> and handler_wechat_tag_id = #{handlerWechatTagId}</if>
|
||||
<if test="channelId != null and channelId != ''"> and channel_id = #{channelId}</if>
|
||||
<if test="instrumentId != null and instrumentId != ''"> and instrument_id = #{instrumentId}</if>
|
||||
<if test="operate != null "> and operate = #{operate}</if>
|
||||
<if test="signNumber != null "> and sign_number = #{signNumber}</if>
|
||||
<if test="userType != null "> and user_type = #{userType}</if>
|
||||
<if test="orderNumber != null "> and order_number = #{orderNumber}</if>
|
||||
<if test="type != null "> and type = #{type}</if>
|
||||
<if test="link != null and link != ''"> and link = #{link}</if>
|
||||
<if test="linkParams != null and linkParams != ''"> and link_params = #{linkParams}</if>
|
||||
<if test="redirectAppid != null and redirectAppid != ''"> and redirect_appid = #{redirectAppid}</if>
|
||||
<if test="redirectUrl != null and redirectUrl != ''"> and redirect_url = #{redirectUrl}</if>
|
||||
<if test="videoNo != null and videoNo != ''"> and video_no = #{videoNo}</if>
|
||||
<if test="feedId != null and feedId != ''"> and feed_id = #{feedId}</if>
|
||||
</where>
|
||||
order by order_number desc , coalesce(update_time, create_time) desc
|
||||
</select>
|
||||
|
||||
<select id="selectWxFindProductStrategyById" parameterType="Long" resultMap="WxFindProductStrategyResult">
|
||||
<include refid="selectWxFindProductStrategyVo"/>
|
||||
where id = #{id} and del_flag = 0 limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertWxFindProductStrategy" parameterType="com.flossom.common.core.domain.entity.WxFindProductStrategy" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into wx_find_product_strategy
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="title != null">title,</if>
|
||||
<if test="fileUrl != null">file_url,</if>
|
||||
<if test="siteStartTime != null">site_start_time,</if>
|
||||
<if test="siteEndTime != null">site_end_time,</if>
|
||||
<if test="userRegisterStartTime != null">user_register_start_time,</if>
|
||||
<if test="userRegisterEndTime != null">user_register_end_time,</if>
|
||||
<if test="showWechatTagId != null">show_wechat_tag_id,</if>
|
||||
<if test="showCompanyTagId != null">show_company_tag_id,</if>
|
||||
<if test="forbidWechatTagId != null">forbid_wechat_tag_id,</if>
|
||||
<if test="forbidCompanyTagId != null">forbid_company_tag_id,</if>
|
||||
<if test="handlerCompanyTagId != null">handler_company_tag_id,</if>
|
||||
<if test="handlerWechatTagId != null">handler_wechat_tag_id,</if>
|
||||
<if test="channelId != null">channel_id,</if>
|
||||
<if test="instrumentId != null">instrument_id,</if>
|
||||
<if test="operate != null">operate,</if>
|
||||
<if test="signNumber != null">sign_number,</if>
|
||||
<if test="userType != null">user_type,</if>
|
||||
<if test="orderNumber != null">order_number,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="link != null">link,</if>
|
||||
<if test="linkParams != null">link_params,</if>
|
||||
<if test="redirectAppid != null">redirect_appid,</if>
|
||||
<if test="redirectUrl != null">redirect_url,</if>
|
||||
<if test="videoNo != null">video_no,</if>
|
||||
<if test="feedId != null">feed_id,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="title != null">#{title},</if>
|
||||
<if test="fileUrl != null">#{fileUrl},</if>
|
||||
<if test="siteStartTime != null">#{siteStartTime},</if>
|
||||
<if test="siteEndTime != null">#{siteEndTime},</if>
|
||||
<if test="userRegisterStartTime != null">#{userRegisterStartTime},</if>
|
||||
<if test="userRegisterEndTime != null">#{userRegisterEndTime},</if>
|
||||
<if test="showWechatTagId != null">#{showWechatTagId},</if>
|
||||
<if test="showCompanyTagId != null">#{showCompanyTagId},</if>
|
||||
<if test="forbidWechatTagId != null">#{forbidWechatTagId},</if>
|
||||
<if test="forbidCompanyTagId != null">#{forbidCompanyTagId},</if>
|
||||
<if test="handlerCompanyTagId != null">#{handlerCompanyTagId},</if>
|
||||
<if test="handlerWechatTagId != null">#{handlerWechatTagId},</if>
|
||||
<if test="channelId != null">#{channelId},</if>
|
||||
<if test="instrumentId != null">#{instrumentId},</if>
|
||||
<if test="operate != null">#{operate},</if>
|
||||
<if test="signNumber != null">#{signNumber},</if>
|
||||
<if test="userType != null">#{userType},</if>
|
||||
<if test="orderNumber != null">#{orderNumber},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="link != null">#{link},</if>
|
||||
<if test="linkParams != null">#{linkParams},</if>
|
||||
<if test="redirectAppid != null">#{redirectAppid},</if>
|
||||
<if test="redirectUrl != null">#{redirectUrl},</if>
|
||||
<if test="videoNo != null">#{videoNo},</if>
|
||||
<if test="feedId != null">#{feedId},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWxFindProductStrategy" parameterType="com.flossom.common.core.domain.entity.WxFindProductStrategy">
|
||||
update wx_find_product_strategy
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="title != null">title = #{title},</if>
|
||||
<if test="fileUrl != null">file_url = #{fileUrl},</if>
|
||||
<if test="siteStartTime != null">site_start_time = #{siteStartTime},</if>
|
||||
<if test="siteEndTime != null">site_end_time = #{siteEndTime},</if>
|
||||
<if test="userRegisterStartTime != null">user_register_start_time = #{userRegisterStartTime},</if>
|
||||
<if test="userRegisterEndTime != null">user_register_end_time = #{userRegisterEndTime},</if>
|
||||
<if test="showWechatTagId != null">show_wechat_tag_id = #{showWechatTagId},</if>
|
||||
<if test="showCompanyTagId != null">show_company_tag_id = #{showCompanyTagId},</if>
|
||||
<if test="forbidWechatTagId != null">forbid_wechat_tag_id = #{forbidWechatTagId},</if>
|
||||
<if test="forbidCompanyTagId != null">forbid_company_tag_id = #{forbidCompanyTagId},</if>
|
||||
<if test="handlerCompanyTagId != null">handler_company_tag_id = #{handlerCompanyTagId},</if>
|
||||
<if test="handlerWechatTagId != null">handler_wechat_tag_id = #{handlerWechatTagId},</if>
|
||||
<if test="channelId != null">channel_id = #{channelId},</if>
|
||||
<if test="instrumentId != null">instrument_id = #{instrumentId},</if>
|
||||
<if test="operate != null">operate = #{operate},</if>
|
||||
<if test="signNumber != null">sign_number = #{signNumber},</if>
|
||||
<if test="userType != null">user_type = #{userType},</if>
|
||||
<if test="orderNumber != null">order_number = #{orderNumber},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="link != null">link = #{link},</if>
|
||||
<if test="linkParams != null">link_params = #{linkParams},</if>
|
||||
<if test="redirectAppid != null">redirect_appid = #{redirectAppid},</if>
|
||||
<if test="redirectUrl != null">redirect_url = #{redirectUrl},</if>
|
||||
<if test="videoNo != null">video_no = #{videoNo},</if>
|
||||
<if test="feedId != null">feed_id = #{feedId},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWxFindProductStrategyById">
|
||||
update wx_find_product_strategy
|
||||
set update_by = #{updateName},
|
||||
update_time = #{updateDate},
|
||||
del_flag = 2
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWxFindProductStrategyByIds">
|
||||
update wx_find_product_strategy
|
||||
set update_by = #{updateName},
|
||||
update_time = #{updateDate},
|
||||
del_flag = 2
|
||||
where id in
|
||||
<foreach item="id" collection="ids" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 修改排序 -->
|
||||
<update id="updateSort">
|
||||
update wx_find_product_strategy
|
||||
set
|
||||
order_number = #{orderNumber},
|
||||
operate = #{operate},
|
||||
update_by = #{updateName},
|
||||
update_time = #{updateDate}
|
||||
where id = #{id}
|
||||
</update>
|
||||
</mapper>
|
||||
@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.flossom.common.core.mapper.WxFindTagMapper">
|
||||
|
||||
<resultMap type="com.flossom.common.core.domain.entity.WxFindTag" id="WxFindTagResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="wxFindId" column="wx_find_id" />
|
||||
<result property="wxFindType" column="wx_find_type" />
|
||||
<result property="tagId" column="tag_id" />
|
||||
<result property="tagType" column="tag_type" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWxFindTagVo">
|
||||
select id, wx_find_id, wx_find_type, tag_id, tag_type, status, create_by, create_time, update_by, update_time, remark, del_flag from wx_find_tag
|
||||
</sql>
|
||||
|
||||
<select id="selectWxFindTagList" parameterType="com.flossom.common.core.domain.entity.WxFindTag" resultMap="WxFindTagResult">
|
||||
<include refid="selectWxFindTagVo"/>
|
||||
<where>
|
||||
del_flag = 0
|
||||
<if test="wxFindId != null "> and wx_find_id = #{wxFindId}</if>
|
||||
<if test="wxFindType != null "> and wx_find_type = #{wxFindType}</if>
|
||||
<if test="tagId != null "> and tag_id = #{tagId}</if>
|
||||
<if test="tagType != null "> and tag_type = #{tagType}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectWxFindTagById" parameterType="Long" resultMap="WxFindTagResult">
|
||||
<include refid="selectWxFindTagVo"/>
|
||||
where id = #{id} and del_flag = 0 limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertWxFindTag" parameterType="com.flossom.common.core.domain.entity.WxFindTag" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into wx_find_tag
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="wxFindId != null">wx_find_id,</if>
|
||||
<if test="wxFindType != null ">wx_find_type,</if>
|
||||
<if test="tagId != null">tag_id,</if>
|
||||
<if test="tagType != null">tag_type,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="wxFindId != null">#{wxFindId},</if>
|
||||
<if test="wxFindType != null ">#{wxFindType},</if>
|
||||
<if test="tagId != null">#{tagId},</if>
|
||||
<if test="tagType != null">#{tagType},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<!-- 持久化 -->
|
||||
<insert id="inserts" parameterType="java.util.List" >
|
||||
insert into wx_find_tag
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
wx_find_id, wx_find_type, tag_id, tag_type, status, create_by, create_time, update_by, update_time, remark, del_flag
|
||||
</trim>
|
||||
VALUES
|
||||
<foreach collection="wxFindTagList" item="item" separator="," >
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
#{item.wxFindId}, #{item.wxFindType}, #{item.tagId}, #{item.tagType}, #{item.status}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark},#{item.delFlag},
|
||||
</trim>
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="updateWxFindTag" parameterType="com.flossom.common.core.domain.entity.WxFindTag">
|
||||
update wx_find_tag
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="wxFindId != null">wx_find_id = #{wxFindId},</if>
|
||||
<if test="wxFindType != null ">wx_find_type = #{wxFindType},</if>
|
||||
<if test="tagId != null">tag_id = #{tagId},</if>
|
||||
<if test="tagType != null">tag_type = #{tagType},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 根据发现管理id软删除数据 -->
|
||||
<update id="deleteWxFindTagByWxFindId">
|
||||
update wx_find_tag
|
||||
set update_by = #{updateName},
|
||||
update_time = #{updateDate},
|
||||
del_flag = 2
|
||||
where wx_find_id = #{wxFindId} and wx_find_type = #{wxFindType}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWxFindTagById" parameterType="Long">
|
||||
update wx_find_tag set delFlag = 2 where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWxFindTagByIds" parameterType="String">
|
||||
update wx_find_tag set delFlag = 2 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,104 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.flossom.common.core.mapper.WxInterfaceRequestLogMapper">
|
||||
|
||||
<resultMap type="com.flossom.common.core.domain.entity.WxInterfaceRequestLog" id="WxInterfaceRequestLogResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="belonging" column="belonging" />
|
||||
<result property="url" column="url" />
|
||||
<result property="method" column="method" />
|
||||
<result property="requestParams" column="request_params" />
|
||||
<result property="requestBody" column="request_body" />
|
||||
<result property="responseCode" column="response_code" />
|
||||
<result property="times" column="times" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="responseData" column="response_data" />
|
||||
<result property="errorMessage" column="error_message" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWxInterfaceRequestLogVo">
|
||||
select id, belonging, url, method, request_params, request_body, response_code, times, create_by, create_time, response_data, error_message from wx_interface_request_log
|
||||
</sql>
|
||||
|
||||
<select id="selectWxInterfaceRequestLogList" parameterType="com.flossom.common.core.domain.entity.WxInterfaceRequestLog" resultMap="WxInterfaceRequestLogResult">
|
||||
<include refid="selectWxInterfaceRequestLogVo"/>
|
||||
<where>
|
||||
<if test="belonging != null and belonging != ''"> and belonging = #{belonging}</if>
|
||||
<if test="url != null and url != ''"> and url = #{url}</if>
|
||||
<if test="method != null and method != ''"> and method = #{method}</if>
|
||||
<if test="requestParams != null and requestParams != ''"> and request_params = #{requestParams}</if>
|
||||
<if test="requestBody != null and requestBody != ''"> and request_body = #{requestBody}</if>
|
||||
<if test="responseCode != null "> and response_code = #{responseCode}</if>
|
||||
<if test="times != null and times != ''"> and times = #{times}</if>
|
||||
<if test="responseData != null and responseData != ''"> and response_data = #{responseData}</if>
|
||||
<if test="errorMessage != null and errorMessage != ''"> and error_message = #{errorMessage}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectWxInterfaceRequestLogById" parameterType="Long" resultMap="WxInterfaceRequestLogResult">
|
||||
<include refid="selectWxInterfaceRequestLogVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertWxInterfaceRequestLog" parameterType="com.flossom.common.core.domain.entity.WxInterfaceRequestLog" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into wx_interface_request_log
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="belonging != null">belonging,</if>
|
||||
<if test="url != null">url,</if>
|
||||
<if test="method != null">method,</if>
|
||||
<if test="requestParams != null">request_params,</if>
|
||||
<if test="requestBody != null">request_body,</if>
|
||||
<if test="responseCode != null">response_code,</if>
|
||||
<if test="times != null">times,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="responseData != null">response_data,</if>
|
||||
<if test="errorMessage != null">error_message,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="belonging != null">#{belonging},</if>
|
||||
<if test="url != null">#{url},</if>
|
||||
<if test="method != null">#{method},</if>
|
||||
<if test="requestParams != null">#{requestParams},</if>
|
||||
<if test="requestBody != null">#{requestBody},</if>
|
||||
<if test="responseCode != null">#{responseCode},</if>
|
||||
<if test="times != null">#{times},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="responseData != null">#{responseData},</if>
|
||||
<if test="errorMessage != null">#{errorMessage},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWxInterfaceRequestLog" parameterType="com.flossom.common.core.domain.entity.WxInterfaceRequestLog">
|
||||
update wx_interface_request_log
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="belonging != null">belonging = #{belonging},</if>
|
||||
<if test="url != null">url = #{url},</if>
|
||||
<if test="method != null">method = #{method},</if>
|
||||
<if test="requestParams != null">request_params = #{requestParams},</if>
|
||||
<if test="requestBody != null">request_body = #{requestBody},</if>
|
||||
<if test="responseCode != null">response_code = #{responseCode},</if>
|
||||
<if test="times != null">times = #{times},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="responseData != null">response_data = #{responseData},</if>
|
||||
<if test="errorMessage != null">error_message = #{errorMessage},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWxInterfaceRequestLogById" parameterType="Long">
|
||||
delete from wx_interface_request_log where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWxInterfaceRequestLogByIds" parameterType="String">
|
||||
delete from wx_interface_request_log where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue