Commit 2b23b989 authored by shiyu's avatar shiyu

Merge branch 'quanku_v3.4' into quanku_v3.5

# Conflicts:
#	ch-dao/src/main/resources/generatorConfig_new.xml
parents 0c5c33f5 82b549e4
package com.wwdz.ch.db.dao.distribution;
import com.wwdz.ch.db.domain.distribution.AppletPageConfig;
import com.wwdz.ch.db.dto.request.distribution.AppletPageConfigRequestDto;
public interface AppletPageConfigDao {
boolean insert(AppletPageConfig appletPageConfig);
AppletPageConfig findList(AppletPageConfigRequestDto dto);
}
package com.wwdz.ch.db.domain.distribution;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import com.xxdxxs.entity.Entity;
import lombok.Data;
/**
* @author shiyu
* @date 2024/11/06
*/
@Data
public class AppletPageConfig implements Entity {
private Integer id;
/**
* 标题
*/
private String title;
/**
* 图片
*/
private String image;
/**
* 跳转链接
*/
private String link;
/**
* 对应小程序的页面
*/
private String appletPage;
/**
* 类型
*/
private Integer type;
/**
* 是否有效
*/
private Boolean isValid;
private static final long serialVersionUID = 1L;
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", title=").append(title);
sb.append(", image=").append(image);
sb.append(", link=").append(link);
sb.append(", appletPage=").append(appletPage);
sb.append(", type=").append(type);
sb.append(", isValid=").append(isValid);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
AppletPageConfig other = (AppletPageConfig) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
&& (this.getImage() == null ? other.getImage() == null : this.getImage().equals(other.getImage()))
&& (this.getLink() == null ? other.getLink() == null : this.getLink().equals(other.getLink()))
&& (this.getAppletPage() == null ? other.getAppletPage() == null : this.getAppletPage().equals(other.getAppletPage()))
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
&& (this.getIsValid() == null ? other.getIsValid() == null : this.getIsValid().equals(other.getIsValid()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
result = prime * result + ((getImage() == null) ? 0 : getImage().hashCode());
result = prime * result + ((getLink() == null) ? 0 : getLink().hashCode());
result = prime * result + ((getAppletPage() == null) ? 0 : getAppletPage().hashCode());
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
result = prime * result + ((getIsValid() == null) ? 0 : getIsValid().hashCode());
return result;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table applet_page_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public enum Column {
id("id", "id", "INTEGER", false),
title("title", "title", "VARCHAR", false),
image("image", "image", "VARCHAR", false),
link("link", "link", "VARCHAR", false),
appletPage("applet_page", "appletPage", "VARCHAR", false),
type("type", "type", "INTEGER", true),
isValid("is_valid", "isValid", "BIT", false);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table applet_page_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String BEGINNING_DELIMITER = "`";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table applet_page_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String ENDING_DELIMITER = "`";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table applet_page_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String column;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table applet_page_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final boolean isColumnNameDelimited;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table applet_page_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String javaProperty;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table applet_page_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String jdbcType;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table applet_page_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String value() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table applet_page_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getValue() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table applet_page_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJavaProperty() {
return this.javaProperty;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table applet_page_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJdbcType() {
return this.jdbcType;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table applet_page_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
this.column = column;
this.javaProperty = javaProperty;
this.jdbcType = jdbcType;
this.isColumnNameDelimited = isColumnNameDelimited;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table applet_page_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String desc() {
return this.getEscapedColumnName() + " DESC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table applet_page_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String asc() {
return this.getEscapedColumnName() + " ASC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table applet_page_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Column[] excludes(Column ... excludes) {
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
if (excludes != null && excludes.length > 0) {
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
}
return columns.toArray(new Column[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table applet_page_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getEscapedColumnName() {
if (this.isColumnNameDelimited) {
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
} else {
return this.column;
}
}
}
}
\ No newline at end of file
package com.wwdz.ch.db.dto.request.distribution;
import com.xxdxxs.entity.Entity;
import lombok.Data;
@Data
public class AppletPageConfigRequestDto implements Entity {
/**
* 标题
*/
private String title;
/**
* 图片
*/
private String image;
/**
* 跳转链接
*/
private String link;
/**
* 对应小程序的页面
*/
private String appletPage;
/**
* 类型
*/
private Integer type;
/**
* 是否有效
*/
private Boolean isValid;
}
package com.wwdz.ch.db.impl.distribution;
import com.wwdz.ch.db.dao.distribution.AppletPageConfigDao;
import com.wwdz.ch.db.domain.distribution.AppletPageConfig;
import com.wwdz.ch.db.domain.distribution.AppletPageConfigExample;
import com.wwdz.ch.db.dto.request.distribution.AppletPageConfigRequestDto;
import com.wwdz.ch.db.mapper.distribution.AppletPageConfigMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
@Repository
public class AppletPageConfigDaoImpl implements AppletPageConfigDao {
@Autowired
AppletPageConfigMapper appletPageConfigMapper;
@Override
public boolean insert(AppletPageConfig appletPageConfig) {
return appletPageConfigMapper.insert(appletPageConfig) > 0;
}
@Override
public AppletPageConfig findList(AppletPageConfigRequestDto dto) {
AppletPageConfigExample example = new AppletPageConfigExample();
AppletPageConfigExample.Criteria criteria = example.createCriteria();
return appletPageConfigMapper.selectOneByExample(example);
}
}
package com.wwdz.ch.db.mapper.distribution;
import com.wwdz.ch.db.domain.distribution.AppletPageConfig;
import com.wwdz.ch.db.domain.distribution.AppletPageConfigExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface AppletPageConfigMapper {
long countByExample(AppletPageConfigExample example);
int deleteByExample(AppletPageConfigExample example);
int deleteByPrimaryKey(Integer id);
int insert(AppletPageConfig record);
int insertSelective(AppletPageConfig record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table applet_page_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
AppletPageConfig selectOneByExample(AppletPageConfigExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table applet_page_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
AppletPageConfig selectOneByExampleSelective(@Param("example") AppletPageConfigExample example, @Param("selective") AppletPageConfig.Column ... selective);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table applet_page_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List<AppletPageConfig> selectByExampleSelective(@Param("example") AppletPageConfigExample example, @Param("selective") AppletPageConfig.Column ... selective);
List<AppletPageConfig> selectByExample(AppletPageConfigExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table applet_page_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
AppletPageConfig selectByPrimaryKeySelective(@Param("id") Integer id, @Param("selective") AppletPageConfig.Column ... selective);
AppletPageConfig selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") AppletPageConfig record, @Param("example") AppletPageConfigExample example);
int updateByExample(@Param("record") AppletPageConfig record, @Param("example") AppletPageConfigExample example);
int updateByPrimaryKeySelective(AppletPageConfig record);
int updateByPrimaryKey(AppletPageConfig record);
}
\ No newline at end of file
......@@ -49,9 +49,10 @@ public class WebMvcConfiguration implements WebMvcConfigurer {
"/wx/supplierItem/**","/wx/specialPerformance/**","/wx/groupPurchase/**","/wx/disposableSubscribeRecord/**", "/wx/auctionRecord/findList",
"/wx/selfPage/countIntroduceAmount",
"/wx/exchange/findExchangeItem", "/wx/specialPerformance/findInfos", "/wx/specialPerformance/findItemList",
"/wx/groupPurchase/findList", "/wx/groupPurchase/findItemDetail", "/wx/exchangeApplyOrder/handleApplyOrder", "/wx/supplierItem/findDiscountList"
"/wx/groupPurchase/findList", "/wx/groupPurchase/findItemDetail", "/wx/exchangeApplyOrder/handleApplyOrder", "/wx/supplierItem/findDiscountList",
"/wx/appletPageConfig/**"
//下列路径上线注释
,"/wx/itemTagOperate/**", "/wx/openShop/**"
// ,"/wx/itemTagOperate/**", "/wx/openShop/**"
/* ,"/wx/specialPerformance/**"
, "/wx/supplierItem/**", "/wx/shareRecord/**", "/wx/distributionOrder/**", "/wx/selfPage/**", "/wx/auctionRecord/**",
"/wx/shareRecord/**","/wx/collectionBook/**", "/wx/collectedRecord/**", "/wx/collectionItemsRelation/**","/wx/collectionShareRecord/**"
......
package com.wwdz.ch.wx.impl.distribution;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.db.dao.distribution.AppletPageConfigDao;
import com.wwdz.ch.db.domain.distribution.AppletPageConfig;
import com.wwdz.ch.db.dto.request.distribution.AppletPageConfigRequestDto;
import com.wwdz.ch.wx.service.distribution.AppletPageConfigService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class AppletPageConfigServiceImpl implements AppletPageConfigService {
private static final Logger logger = LoggerFactory.getLogger(AppletPageConfigServiceImpl.class);
@Autowired
AppletPageConfigDao appletPageConfigDao;
@Override
public Result getPageConfig(AppletPageConfigRequestDto dto) {
try {
AppletPageConfig appletPageConfig = appletPageConfigDao.findList(dto);
return Result.success(appletPageConfig);
} catch (Exception e) {
logger.error("获取页面配置 error : {}", e);
}
return Result.failed();
}
}
package com.wwdz.ch.wx.service.distribution;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.db.dto.request.distribution.AppletPageConfigRequestDto;
public interface AppletPageConfigService {
/**
* 获取页面配置
* @param dto
* @return
*/
Result getPageConfig(AppletPageConfigRequestDto dto);
}
package com.wwdz.ch.wx.web.distribution;
import com.alibaba.fastjson.JSON;
import com.wwdz.ch.core.consts.CommConsts;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.db.dto.request.distribution.AppletPageConfigRequestDto;
import com.wwdz.ch.db.dto.request.distribution.AuctionRecordRequestDto;
import com.wwdz.ch.wx.service.distribution.AppletPageConfigService;
import com.wwdz.ch.wx.service.distribution.AuctionRecordService;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/wx/appletPageConfig")
public class AppletPageConfigController {
private static final Logger logger = LoggerFactory.getLogger(SupplierItemController.class);
@Autowired
AppletPageConfigService appletPageConfigService;
@ApiOperation(value = "获取页面配置")
@PostMapping("/getPageConfig")
public Result getPageConfig(@RequestBody AppletPageConfigRequestDto dto) {
logger.info("获取页面配置,请求参数:{}", JSON.toJSONString(dto));
return appletPageConfigService.getPageConfig(dto);
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment