Commit a06674d3 authored by xiaoyao's avatar xiaoyao

fix

parent 155bd764
...@@ -41,7 +41,7 @@ public class AdminFeedbackController { ...@@ -41,7 +41,7 @@ public class AdminFeedbackController {
@RequiresPermissions("admin:feedback:list") @RequiresPermissions("admin:feedback:list")
@RequiresPermissionsDesc(menu = { "用户管理", "意见反馈" }, button = "查询") @RequiresPermissionsDesc(menu = { "用户管理", "意见反馈" }, button = "查询")
@GetMapping("/list") @GetMapping("/list")
public Object list(Integer userId, String username, @RequestParam(defaultValue = "1") Integer page, public Object list(Long userId, String username, @RequestParam(defaultValue = "1") Integer page,
@RequestParam(defaultValue = "10") Integer limit, @RequestParam(defaultValue = "10") Integer limit,
@Sort @RequestParam(defaultValue = "add_time") String sort, @Sort @RequestParam(defaultValue = "add_time") String sort,
@Order @RequestParam(defaultValue = "desc") String order) { @Order @RequestParam(defaultValue = "desc") String order) {
......
...@@ -26,7 +26,7 @@ import java.util.stream.Collectors; ...@@ -26,7 +26,7 @@ import java.util.stream.Collectors;
@Api @Api
public class BidRecordController { public class BidRecordController {
private static final Logger logger = LoggerFactory.getLogger(CategoryController.class); private static final Logger logger = LoggerFactory.getLogger(BidRecordController.class);
@Autowired @Autowired
private BidRecordService bidRecordService; private BidRecordService bidRecordService;
......
package com.wwdz.ch.admin.web;
public class UgcCoinController {
}
...@@ -94,6 +94,17 @@ ...@@ -94,6 +94,17 @@
<artifactId>commons-email</artifactId> <artifactId>commons-email</artifactId>
<version>1.5</version> <version>1.5</version>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
<version>2.0</version>
</dependency>
</dependencies> </dependencies>
</project> </project>
...@@ -10,6 +10,11 @@ public class SimpleResult<T> extends BaseResult{ ...@@ -10,6 +10,11 @@ public class SimpleResult<T> extends BaseResult{
this.data = data; this.data = data;
} }
public SimpleResult(String msg, T data) {
this.data = data;
this.msg = msg;
}
public T getData() { public T getData() {
return data; return data;
} }
......
...@@ -52,6 +52,20 @@ public class JacksonUtil { ...@@ -52,6 +52,20 @@ public class JacksonUtil {
return null; return null;
} }
public static Long parseLong(String body, String field) {
ObjectMapper mapper = new ObjectMapper();
JsonNode node = null;
try {
node = mapper.readTree(body);
JsonNode leaf = node.get(field);
if (leaf != null)
return leaf.asLong();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
public static List<Integer> parseIntegerList(String body, String field) { public static List<Integer> parseIntegerList(String body, String field) {
ObjectMapper mapper = new ObjectMapper(); ObjectMapper mapper = new ObjectMapper();
JsonNode node = null; JsonNode node = null;
......
package com.wwdz.ch.core.util;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
public final class TimeUtil {
public static Long localDateTimeToTimestamp(LocalDateTime localDateTime) {
ZoneId zone = ZoneId.systemDefault();
Instant instant = localDateTime.atZone(zone).toInstant();
return instant.toEpochMilli();
}
public static LocalDateTime timestampToLocalDateTime(long timestamp) {
Instant instant = Instant.ofEpochMilli(timestamp);
ZoneId zone = ZoneId.systemDefault();
return LocalDateTime.ofInstant(instant, zone);
}
}
...@@ -16,8 +16,9 @@ import java.util.*; ...@@ -16,8 +16,9 @@ import java.util.*;
public class ZincUtil { public class ZincUtil {
private static final String BASE_URL = "http://172.16.48.14:4080/"; // private static final String BASE_URL = "http://172.16.48.14:4080/";
private static final String BASE_URL = "https://zinc.wanwudezhi.com/";
private static final String USER_NAME = "wwdz"; private static final String USER_NAME = "wwdz";
private static final String PASSWD = "zhuangdian123"; private static final String PASSWD = "zhuangdian123";
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<javaClientGenerator type="XMLMAPPER" targetPackage="com.wwdz.ch.db.dao" <javaClientGenerator type="XMLMAPPER" targetPackage="com.wwdz.ch.db.dao"
targetProject="src/main/java"/> targetProject="src/main/java"/>
<!--表名--> <!--表名-->
<table tableName="ugc_coin"> <table tableName="dts_feedback">
<generatedKey column="id" sqlStatement="MySql" identity="true"/> <generatedKey column="id" sqlStatement="MySql" identity="true"/>
</table> </table>
<!-- <table tableName="book">--> <!-- <table tableName="book">-->
......
...@@ -28,7 +28,7 @@ public interface DtsCollectMapper { ...@@ -28,7 +28,7 @@ public interface DtsCollectMapper {
* *
* @mbg.generated * @mbg.generated
*/ */
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Long id);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
...@@ -88,7 +88,7 @@ public interface DtsCollectMapper { ...@@ -88,7 +88,7 @@ public interface DtsCollectMapper {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
DtsCollect selectByPrimaryKeySelective(@Param("id") Integer id, @Param("selective") DtsCollect.Column ... selective); DtsCollect selectByPrimaryKeySelective(@Param("id") Long id, @Param("selective") DtsCollect.Column ... selective);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
...@@ -96,7 +96,7 @@ public interface DtsCollectMapper { ...@@ -96,7 +96,7 @@ public interface DtsCollectMapper {
* *
* @mbg.generated * @mbg.generated
*/ */
DtsCollect selectByPrimaryKey(Integer id); DtsCollect selectByPrimaryKey(Long id);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
...@@ -105,7 +105,7 @@ public interface DtsCollectMapper { ...@@ -105,7 +105,7 @@ public interface DtsCollectMapper {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
DtsCollect selectByPrimaryKeyWithLogicalDelete(@Param("id") Integer id, @Param("andLogicalDeleted") boolean andLogicalDeleted); DtsCollect selectByPrimaryKeyWithLogicalDelete(@Param("id") Long id, @Param("andLogicalDeleted") boolean andLogicalDeleted);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
...@@ -155,5 +155,5 @@ public interface DtsCollectMapper { ...@@ -155,5 +155,5 @@ public interface DtsCollectMapper {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
int logicalDeleteByPrimaryKey(Integer id); int logicalDeleteByPrimaryKey(Long id);
} }
\ No newline at end of file
...@@ -28,7 +28,7 @@ public interface DtsFeedbackMapper { ...@@ -28,7 +28,7 @@ public interface DtsFeedbackMapper {
* *
* @mbg.generated * @mbg.generated
*/ */
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Long id);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
...@@ -88,7 +88,7 @@ public interface DtsFeedbackMapper { ...@@ -88,7 +88,7 @@ public interface DtsFeedbackMapper {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
DtsFeedback selectByPrimaryKeySelective(@Param("id") Integer id, @Param("selective") DtsFeedback.Column ... selective); DtsFeedback selectByPrimaryKeySelective(@Param("id") Long id, @Param("selective") DtsFeedback.Column ... selective);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
...@@ -96,7 +96,7 @@ public interface DtsFeedbackMapper { ...@@ -96,7 +96,7 @@ public interface DtsFeedbackMapper {
* *
* @mbg.generated * @mbg.generated
*/ */
DtsFeedback selectByPrimaryKey(Integer id); DtsFeedback selectByPrimaryKey(Long id);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
...@@ -105,7 +105,7 @@ public interface DtsFeedbackMapper { ...@@ -105,7 +105,7 @@ public interface DtsFeedbackMapper {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
DtsFeedback selectByPrimaryKeyWithLogicalDelete(@Param("id") Integer id, @Param("andLogicalDeleted") boolean andLogicalDeleted); DtsFeedback selectByPrimaryKeyWithLogicalDelete(@Param("id") Long id, @Param("andLogicalDeleted") boolean andLogicalDeleted);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
...@@ -155,5 +155,5 @@ public interface DtsFeedbackMapper { ...@@ -155,5 +155,5 @@ public interface DtsFeedbackMapper {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
int logicalDeleteByPrimaryKey(Integer id); int logicalDeleteByPrimaryKey(Long id);
} }
\ No newline at end of file
...@@ -28,7 +28,7 @@ public interface DtsFootprintMapper { ...@@ -28,7 +28,7 @@ public interface DtsFootprintMapper {
* *
* @mbg.generated * @mbg.generated
*/ */
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Long id);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
...@@ -88,7 +88,7 @@ public interface DtsFootprintMapper { ...@@ -88,7 +88,7 @@ public interface DtsFootprintMapper {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
DtsFootprint selectByPrimaryKeySelective(@Param("id") Integer id, @Param("selective") DtsFootprint.Column ... selective); DtsFootprint selectByPrimaryKeySelective(@Param("id") Long id, @Param("selective") DtsFootprint.Column ... selective);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
...@@ -96,7 +96,7 @@ public interface DtsFootprintMapper { ...@@ -96,7 +96,7 @@ public interface DtsFootprintMapper {
* *
* @mbg.generated * @mbg.generated
*/ */
DtsFootprint selectByPrimaryKey(Integer id); DtsFootprint selectByPrimaryKey(Long id);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
...@@ -105,7 +105,7 @@ public interface DtsFootprintMapper { ...@@ -105,7 +105,7 @@ public interface DtsFootprintMapper {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
DtsFootprint selectByPrimaryKeyWithLogicalDelete(@Param("id") Integer id, @Param("andLogicalDeleted") boolean andLogicalDeleted); DtsFootprint selectByPrimaryKeyWithLogicalDelete(@Param("id") Long id, @Param("andLogicalDeleted") boolean andLogicalDeleted);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
...@@ -155,5 +155,5 @@ public interface DtsFootprintMapper { ...@@ -155,5 +155,5 @@ public interface DtsFootprintMapper {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
int logicalDeleteByPrimaryKey(Integer id); int logicalDeleteByPrimaryKey(Long id);
} }
\ No newline at end of file
...@@ -28,7 +28,7 @@ public interface DtsSearchHistoryMapper { ...@@ -28,7 +28,7 @@ public interface DtsSearchHistoryMapper {
* *
* @mbg.generated * @mbg.generated
*/ */
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Long id);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
...@@ -88,7 +88,7 @@ public interface DtsSearchHistoryMapper { ...@@ -88,7 +88,7 @@ public interface DtsSearchHistoryMapper {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
DtsSearchHistory selectByPrimaryKeySelective(@Param("id") Integer id, @Param("selective") DtsSearchHistory.Column ... selective); DtsSearchHistory selectByPrimaryKeySelective(@Param("id") Long id, @Param("selective") DtsSearchHistory.Column ... selective);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
...@@ -96,7 +96,7 @@ public interface DtsSearchHistoryMapper { ...@@ -96,7 +96,7 @@ public interface DtsSearchHistoryMapper {
* *
* @mbg.generated * @mbg.generated
*/ */
DtsSearchHistory selectByPrimaryKey(Integer id); DtsSearchHistory selectByPrimaryKey(Long id);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
...@@ -105,7 +105,7 @@ public interface DtsSearchHistoryMapper { ...@@ -105,7 +105,7 @@ public interface DtsSearchHistoryMapper {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
DtsSearchHistory selectByPrimaryKeyWithLogicalDelete(@Param("id") Integer id, @Param("andLogicalDeleted") boolean andLogicalDeleted); DtsSearchHistory selectByPrimaryKeyWithLogicalDelete(@Param("id") Long id, @Param("andLogicalDeleted") boolean andLogicalDeleted);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
...@@ -155,5 +155,5 @@ public interface DtsSearchHistoryMapper { ...@@ -155,5 +155,5 @@ public interface DtsSearchHistoryMapper {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
int logicalDeleteByPrimaryKey(Integer id); int logicalDeleteByPrimaryKey(Long id);
} }
\ No newline at end of file
...@@ -28,7 +28,7 @@ public interface DtsUserMapper { ...@@ -28,7 +28,7 @@ public interface DtsUserMapper {
* *
* @mbg.generated * @mbg.generated
*/ */
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Long id);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
...@@ -88,7 +88,7 @@ public interface DtsUserMapper { ...@@ -88,7 +88,7 @@ public interface DtsUserMapper {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
DtsUser selectByPrimaryKeySelective(@Param("id") Integer id, @Param("selective") DtsUser.Column ... selective); DtsUser selectByPrimaryKeySelective(@Param("id") Long id, @Param("selective") DtsUser.Column ... selective);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
...@@ -96,7 +96,7 @@ public interface DtsUserMapper { ...@@ -96,7 +96,7 @@ public interface DtsUserMapper {
* *
* @mbg.generated * @mbg.generated
*/ */
DtsUser selectByPrimaryKey(Integer id); DtsUser selectByPrimaryKey(Long id);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
...@@ -105,7 +105,7 @@ public interface DtsUserMapper { ...@@ -105,7 +105,7 @@ public interface DtsUserMapper {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
DtsUser selectByPrimaryKeyWithLogicalDelete(@Param("id") Integer id, @Param("andLogicalDeleted") boolean andLogicalDeleted); DtsUser selectByPrimaryKeyWithLogicalDelete(@Param("id") Long id, @Param("andLogicalDeleted") boolean andLogicalDeleted);
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
...@@ -155,5 +155,5 @@ public interface DtsUserMapper { ...@@ -155,5 +155,5 @@ public interface DtsUserMapper {
* @mbg.generated * @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
int logicalDeleteByPrimaryKey(Integer id); int logicalDeleteByPrimaryKey(Long id);
} }
\ No newline at end of file
...@@ -30,7 +30,7 @@ public class DtsCollect { ...@@ -30,7 +30,7 @@ public class DtsCollect {
* *
* @mbg.generated * @mbg.generated
*/ */
private Integer id; private Long id;
/** /**
* *
...@@ -39,7 +39,7 @@ public class DtsCollect { ...@@ -39,7 +39,7 @@ public class DtsCollect {
* *
* @mbg.generated * @mbg.generated
*/ */
private Integer userId; private Long userId;
/** /**
* *
...@@ -48,7 +48,7 @@ public class DtsCollect { ...@@ -48,7 +48,7 @@ public class DtsCollect {
* *
* @mbg.generated * @mbg.generated
*/ */
private Integer valueId; private Long valueId;
/** /**
* *
...@@ -94,7 +94,7 @@ public class DtsCollect { ...@@ -94,7 +94,7 @@ public class DtsCollect {
* *
* @mbg.generated * @mbg.generated
*/ */
public Integer getId() { public Long getId() {
return id; return id;
} }
...@@ -106,7 +106,7 @@ public class DtsCollect { ...@@ -106,7 +106,7 @@ public class DtsCollect {
* *
* @mbg.generated * @mbg.generated
*/ */
public void setId(Integer id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
...@@ -118,7 +118,7 @@ public class DtsCollect { ...@@ -118,7 +118,7 @@ public class DtsCollect {
* *
* @mbg.generated * @mbg.generated
*/ */
public Integer getUserId() { public Long getUserId() {
return userId; return userId;
} }
...@@ -130,7 +130,7 @@ public class DtsCollect { ...@@ -130,7 +130,7 @@ public class DtsCollect {
* *
* @mbg.generated * @mbg.generated
*/ */
public void setUserId(Integer userId) { public void setUserId(Long userId) {
this.userId = userId; this.userId = userId;
} }
...@@ -142,7 +142,7 @@ public class DtsCollect { ...@@ -142,7 +142,7 @@ public class DtsCollect {
* *
* @mbg.generated * @mbg.generated
*/ */
public Integer getValueId() { public Long getValueId() {
return valueId; return valueId;
} }
...@@ -154,7 +154,7 @@ public class DtsCollect { ...@@ -154,7 +154,7 @@ public class DtsCollect {
* *
* @mbg.generated * @mbg.generated
*/ */
public void setValueId(Integer valueId) { public void setValueId(Long valueId) {
this.valueId = valueId; this.valueId = valueId;
} }
...@@ -343,9 +343,9 @@ public class DtsCollect { ...@@ -343,9 +343,9 @@ public class DtsCollect {
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public enum Column { public enum Column {
id("id", "id", "INTEGER", false), id("id", "id", "BIGINT", false),
userId("user_id", "userId", "INTEGER", false), userId("user_id", "userId", "BIGINT", false),
valueId("value_id", "valueId", "INTEGER", false), valueId("value_id", "valueId", "BIGINT", false),
type("type", "type", "TINYINT", true), type("type", "type", "TINYINT", true),
addTime("add_time", "addTime", "TIMESTAMP", false), addTime("add_time", "addTime", "TIMESTAMP", false),
updateTime("update_time", "updateTime", "TIMESTAMP", false), updateTime("update_time", "updateTime", "TIMESTAMP", false),
......
...@@ -248,7 +248,7 @@ public class DtsCollectExample { ...@@ -248,7 +248,7 @@ public class DtsCollectExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdEqualTo(Integer value) { public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id"); addCriterion("id =", value, "id");
return (Criteria) this; return (Criteria) this;
} }
...@@ -265,7 +265,7 @@ public class DtsCollectExample { ...@@ -265,7 +265,7 @@ public class DtsCollectExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdNotEqualTo(Integer value) { public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id"); addCriterion("id <>", value, "id");
return (Criteria) this; return (Criteria) this;
} }
...@@ -282,7 +282,7 @@ public class DtsCollectExample { ...@@ -282,7 +282,7 @@ public class DtsCollectExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdGreaterThan(Integer value) { public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id"); addCriterion("id >", value, "id");
return (Criteria) this; return (Criteria) this;
} }
...@@ -299,7 +299,7 @@ public class DtsCollectExample { ...@@ -299,7 +299,7 @@ public class DtsCollectExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdGreaterThanOrEqualTo(Integer value) { public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id"); addCriterion("id >=", value, "id");
return (Criteria) this; return (Criteria) this;
} }
...@@ -316,7 +316,7 @@ public class DtsCollectExample { ...@@ -316,7 +316,7 @@ public class DtsCollectExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdLessThan(Integer value) { public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id"); addCriterion("id <", value, "id");
return (Criteria) this; return (Criteria) this;
} }
...@@ -333,7 +333,7 @@ public class DtsCollectExample { ...@@ -333,7 +333,7 @@ public class DtsCollectExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdLessThanOrEqualTo(Integer value) { public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id"); addCriterion("id <=", value, "id");
return (Criteria) this; return (Criteria) this;
} }
...@@ -350,22 +350,22 @@ public class DtsCollectExample { ...@@ -350,22 +350,22 @@ public class DtsCollectExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdIn(List<Integer> values) { public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id"); addCriterion("id in", values, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdNotIn(List<Integer> values) { public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id"); addCriterion("id not in", values, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdBetween(Integer value1, Integer value2) { public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id"); addCriterion("id between", value1, value2, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdNotBetween(Integer value1, Integer value2) { public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id"); addCriterion("id not between", value1, value2, "id");
return (Criteria) this; return (Criteria) this;
} }
...@@ -380,7 +380,7 @@ public class DtsCollectExample { ...@@ -380,7 +380,7 @@ public class DtsCollectExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserIdEqualTo(Integer value) { public Criteria andUserIdEqualTo(Long value) {
addCriterion("user_id =", value, "userId"); addCriterion("user_id =", value, "userId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -397,7 +397,7 @@ public class DtsCollectExample { ...@@ -397,7 +397,7 @@ public class DtsCollectExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserIdNotEqualTo(Integer value) { public Criteria andUserIdNotEqualTo(Long value) {
addCriterion("user_id <>", value, "userId"); addCriterion("user_id <>", value, "userId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -414,7 +414,7 @@ public class DtsCollectExample { ...@@ -414,7 +414,7 @@ public class DtsCollectExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserIdGreaterThan(Integer value) { public Criteria andUserIdGreaterThan(Long value) {
addCriterion("user_id >", value, "userId"); addCriterion("user_id >", value, "userId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -431,7 +431,7 @@ public class DtsCollectExample { ...@@ -431,7 +431,7 @@ public class DtsCollectExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserIdGreaterThanOrEqualTo(Integer value) { public Criteria andUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("user_id >=", value, "userId"); addCriterion("user_id >=", value, "userId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -448,7 +448,7 @@ public class DtsCollectExample { ...@@ -448,7 +448,7 @@ public class DtsCollectExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserIdLessThan(Integer value) { public Criteria andUserIdLessThan(Long value) {
addCriterion("user_id <", value, "userId"); addCriterion("user_id <", value, "userId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -465,7 +465,7 @@ public class DtsCollectExample { ...@@ -465,7 +465,7 @@ public class DtsCollectExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserIdLessThanOrEqualTo(Integer value) { public Criteria andUserIdLessThanOrEqualTo(Long value) {
addCriterion("user_id <=", value, "userId"); addCriterion("user_id <=", value, "userId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -482,22 +482,22 @@ public class DtsCollectExample { ...@@ -482,22 +482,22 @@ public class DtsCollectExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserIdIn(List<Integer> values) { public Criteria andUserIdIn(List<Long> values) {
addCriterion("user_id in", values, "userId"); addCriterion("user_id in", values, "userId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserIdNotIn(List<Integer> values) { public Criteria andUserIdNotIn(List<Long> values) {
addCriterion("user_id not in", values, "userId"); addCriterion("user_id not in", values, "userId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserIdBetween(Integer value1, Integer value2) { public Criteria andUserIdBetween(Long value1, Long value2) {
addCriterion("user_id between", value1, value2, "userId"); addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserIdNotBetween(Integer value1, Integer value2) { public Criteria andUserIdNotBetween(Long value1, Long value2) {
addCriterion("user_id not between", value1, value2, "userId"); addCriterion("user_id not between", value1, value2, "userId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -512,7 +512,7 @@ public class DtsCollectExample { ...@@ -512,7 +512,7 @@ public class DtsCollectExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andValueIdEqualTo(Integer value) { public Criteria andValueIdEqualTo(Long value) {
addCriterion("value_id =", value, "valueId"); addCriterion("value_id =", value, "valueId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -529,7 +529,7 @@ public class DtsCollectExample { ...@@ -529,7 +529,7 @@ public class DtsCollectExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andValueIdNotEqualTo(Integer value) { public Criteria andValueIdNotEqualTo(Long value) {
addCriterion("value_id <>", value, "valueId"); addCriterion("value_id <>", value, "valueId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -546,7 +546,7 @@ public class DtsCollectExample { ...@@ -546,7 +546,7 @@ public class DtsCollectExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andValueIdGreaterThan(Integer value) { public Criteria andValueIdGreaterThan(Long value) {
addCriterion("value_id >", value, "valueId"); addCriterion("value_id >", value, "valueId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -563,7 +563,7 @@ public class DtsCollectExample { ...@@ -563,7 +563,7 @@ public class DtsCollectExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andValueIdGreaterThanOrEqualTo(Integer value) { public Criteria andValueIdGreaterThanOrEqualTo(Long value) {
addCriterion("value_id >=", value, "valueId"); addCriterion("value_id >=", value, "valueId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -580,7 +580,7 @@ public class DtsCollectExample { ...@@ -580,7 +580,7 @@ public class DtsCollectExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andValueIdLessThan(Integer value) { public Criteria andValueIdLessThan(Long value) {
addCriterion("value_id <", value, "valueId"); addCriterion("value_id <", value, "valueId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -597,7 +597,7 @@ public class DtsCollectExample { ...@@ -597,7 +597,7 @@ public class DtsCollectExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andValueIdLessThanOrEqualTo(Integer value) { public Criteria andValueIdLessThanOrEqualTo(Long value) {
addCriterion("value_id <=", value, "valueId"); addCriterion("value_id <=", value, "valueId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -614,22 +614,22 @@ public class DtsCollectExample { ...@@ -614,22 +614,22 @@ public class DtsCollectExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andValueIdIn(List<Integer> values) { public Criteria andValueIdIn(List<Long> values) {
addCriterion("value_id in", values, "valueId"); addCriterion("value_id in", values, "valueId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andValueIdNotIn(List<Integer> values) { public Criteria andValueIdNotIn(List<Long> values) {
addCriterion("value_id not in", values, "valueId"); addCriterion("value_id not in", values, "valueId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andValueIdBetween(Integer value1, Integer value2) { public Criteria andValueIdBetween(Long value1, Long value2) {
addCriterion("value_id between", value1, value2, "valueId"); addCriterion("value_id between", value1, value2, "valueId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andValueIdNotBetween(Integer value1, Integer value2) { public Criteria andValueIdNotBetween(Long value1, Long value2) {
addCriterion("value_id not between", value1, value2, "valueId"); addCriterion("value_id not between", value1, value2, "valueId");
return (Criteria) this; return (Criteria) this;
} }
......
...@@ -30,7 +30,7 @@ public class DtsFeedback { ...@@ -30,7 +30,7 @@ public class DtsFeedback {
* *
* @mbg.generated * @mbg.generated
*/ */
private Integer id; private Long id;
/** /**
* *
...@@ -39,7 +39,7 @@ public class DtsFeedback { ...@@ -39,7 +39,7 @@ public class DtsFeedback {
* *
* @mbg.generated * @mbg.generated
*/ */
private Integer userId; private Long userId;
/** /**
* *
...@@ -102,7 +102,7 @@ public class DtsFeedback { ...@@ -102,7 +102,7 @@ public class DtsFeedback {
* *
* @mbg.generated * @mbg.generated
*/ */
private String[] picUrls; private String picUrls;
/** /**
* *
...@@ -139,7 +139,7 @@ public class DtsFeedback { ...@@ -139,7 +139,7 @@ public class DtsFeedback {
* *
* @mbg.generated * @mbg.generated
*/ */
public Integer getId() { public Long getId() {
return id; return id;
} }
...@@ -151,7 +151,7 @@ public class DtsFeedback { ...@@ -151,7 +151,7 @@ public class DtsFeedback {
* *
* @mbg.generated * @mbg.generated
*/ */
public void setId(Integer id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
...@@ -163,7 +163,7 @@ public class DtsFeedback { ...@@ -163,7 +163,7 @@ public class DtsFeedback {
* *
* @mbg.generated * @mbg.generated
*/ */
public Integer getUserId() { public Long getUserId() {
return userId; return userId;
} }
...@@ -175,7 +175,7 @@ public class DtsFeedback { ...@@ -175,7 +175,7 @@ public class DtsFeedback {
* *
* @mbg.generated * @mbg.generated
*/ */
public void setUserId(Integer userId) { public void setUserId(Long userId) {
this.userId = userId; this.userId = userId;
} }
...@@ -331,7 +331,7 @@ public class DtsFeedback { ...@@ -331,7 +331,7 @@ public class DtsFeedback {
* *
* @mbg.generated * @mbg.generated
*/ */
public String[] getPicUrls() { public String getPicUrls() {
return picUrls; return picUrls;
} }
...@@ -343,7 +343,7 @@ public class DtsFeedback { ...@@ -343,7 +343,7 @@ public class DtsFeedback {
* *
* @mbg.generated * @mbg.generated
*/ */
public void setPicUrls(String[] picUrls) { public void setPicUrls(String picUrls) {
this.picUrls = picUrls; this.picUrls = picUrls;
} }
...@@ -473,7 +473,7 @@ public class DtsFeedback { ...@@ -473,7 +473,7 @@ public class DtsFeedback {
&& (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent())) && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getHasPicture() == null ? other.getHasPicture() == null : this.getHasPicture().equals(other.getHasPicture())) && (this.getHasPicture() == null ? other.getHasPicture() == null : this.getHasPicture().equals(other.getHasPicture()))
&& (Arrays.equals(this.getPicUrls(), other.getPicUrls())) && (this.getPicUrls() == null ? other.getPicUrls() == null : this.getPicUrls().equals(other.getPicUrls()))
&& (this.getAddTime() == null ? other.getAddTime() == null : this.getAddTime().equals(other.getAddTime())) && (this.getAddTime() == null ? other.getAddTime() == null : this.getAddTime().equals(other.getAddTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted())); && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()));
...@@ -497,7 +497,7 @@ public class DtsFeedback { ...@@ -497,7 +497,7 @@ public class DtsFeedback {
result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode()); result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getHasPicture() == null) ? 0 : getHasPicture().hashCode()); result = prime * result + ((getHasPicture() == null) ? 0 : getHasPicture().hashCode());
result = prime * result + (Arrays.hashCode(getPicUrls())); result = prime * result + ((getPicUrls() == null) ? 0 : getPicUrls().hashCode());
result = prime * result + ((getAddTime() == null) ? 0 : getAddTime().hashCode()); result = prime * result + ((getAddTime() == null) ? 0 : getAddTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode()); result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
...@@ -523,8 +523,8 @@ public class DtsFeedback { ...@@ -523,8 +523,8 @@ public class DtsFeedback {
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public enum Column { public enum Column {
id("id", "id", "INTEGER", false), id("id", "id", "BIGINT", false),
userId("user_id", "userId", "INTEGER", false), userId("user_id", "userId", "BIGINT", false),
username("username", "username", "VARCHAR", false), username("username", "username", "VARCHAR", false),
mobile("mobile", "mobile", "VARCHAR", false), mobile("mobile", "mobile", "VARCHAR", false),
feedType("feed_type", "feedType", "VARCHAR", false), feedType("feed_type", "feedType", "VARCHAR", false),
......
...@@ -30,7 +30,7 @@ public class DtsFootprint { ...@@ -30,7 +30,7 @@ public class DtsFootprint {
* *
* @mbg.generated * @mbg.generated
*/ */
private Integer id; private Long id;
/** /**
* *
...@@ -39,7 +39,7 @@ public class DtsFootprint { ...@@ -39,7 +39,7 @@ public class DtsFootprint {
* *
* @mbg.generated * @mbg.generated
*/ */
private Integer userId; private Long userId;
/** /**
* *
...@@ -48,7 +48,7 @@ public class DtsFootprint { ...@@ -48,7 +48,7 @@ public class DtsFootprint {
* *
* @mbg.generated * @mbg.generated
*/ */
private Integer goodsId; private Long goodsId;
/** /**
* *
...@@ -85,7 +85,7 @@ public class DtsFootprint { ...@@ -85,7 +85,7 @@ public class DtsFootprint {
* *
* @mbg.generated * @mbg.generated
*/ */
public Integer getId() { public Long getId() {
return id; return id;
} }
...@@ -97,7 +97,7 @@ public class DtsFootprint { ...@@ -97,7 +97,7 @@ public class DtsFootprint {
* *
* @mbg.generated * @mbg.generated
*/ */
public void setId(Integer id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
...@@ -109,7 +109,7 @@ public class DtsFootprint { ...@@ -109,7 +109,7 @@ public class DtsFootprint {
* *
* @mbg.generated * @mbg.generated
*/ */
public Integer getUserId() { public Long getUserId() {
return userId; return userId;
} }
...@@ -121,7 +121,7 @@ public class DtsFootprint { ...@@ -121,7 +121,7 @@ public class DtsFootprint {
* *
* @mbg.generated * @mbg.generated
*/ */
public void setUserId(Integer userId) { public void setUserId(Long userId) {
this.userId = userId; this.userId = userId;
} }
...@@ -133,7 +133,7 @@ public class DtsFootprint { ...@@ -133,7 +133,7 @@ public class DtsFootprint {
* *
* @mbg.generated * @mbg.generated
*/ */
public Integer getGoodsId() { public Long getGoodsId() {
return goodsId; return goodsId;
} }
...@@ -145,7 +145,7 @@ public class DtsFootprint { ...@@ -145,7 +145,7 @@ public class DtsFootprint {
* *
* @mbg.generated * @mbg.generated
*/ */
public void setGoodsId(Integer goodsId) { public void setGoodsId(Long goodsId) {
this.goodsId = goodsId; this.goodsId = goodsId;
} }
...@@ -307,9 +307,9 @@ public class DtsFootprint { ...@@ -307,9 +307,9 @@ public class DtsFootprint {
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public enum Column { public enum Column {
id("id", "id", "INTEGER", false), id("id", "id", "BIGINT", false),
userId("user_id", "userId", "INTEGER", false), userId("user_id", "userId", "BIGINT", false),
goodsId("goods_id", "goodsId", "INTEGER", false), goodsId("goods_id", "goodsId", "BIGINT", false),
addTime("add_time", "addTime", "TIMESTAMP", false), addTime("add_time", "addTime", "TIMESTAMP", false),
updateTime("update_time", "updateTime", "TIMESTAMP", false), updateTime("update_time", "updateTime", "TIMESTAMP", false),
deleted("deleted", "deleted", "BIT", false); deleted("deleted", "deleted", "BIT", false);
......
...@@ -248,7 +248,7 @@ public class DtsFootprintExample { ...@@ -248,7 +248,7 @@ public class DtsFootprintExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdEqualTo(Integer value) { public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id"); addCriterion("id =", value, "id");
return (Criteria) this; return (Criteria) this;
} }
...@@ -265,7 +265,7 @@ public class DtsFootprintExample { ...@@ -265,7 +265,7 @@ public class DtsFootprintExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdNotEqualTo(Integer value) { public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id"); addCriterion("id <>", value, "id");
return (Criteria) this; return (Criteria) this;
} }
...@@ -282,7 +282,7 @@ public class DtsFootprintExample { ...@@ -282,7 +282,7 @@ public class DtsFootprintExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdGreaterThan(Integer value) { public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id"); addCriterion("id >", value, "id");
return (Criteria) this; return (Criteria) this;
} }
...@@ -299,7 +299,7 @@ public class DtsFootprintExample { ...@@ -299,7 +299,7 @@ public class DtsFootprintExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdGreaterThanOrEqualTo(Integer value) { public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id"); addCriterion("id >=", value, "id");
return (Criteria) this; return (Criteria) this;
} }
...@@ -316,7 +316,7 @@ public class DtsFootprintExample { ...@@ -316,7 +316,7 @@ public class DtsFootprintExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdLessThan(Integer value) { public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id"); addCriterion("id <", value, "id");
return (Criteria) this; return (Criteria) this;
} }
...@@ -333,7 +333,7 @@ public class DtsFootprintExample { ...@@ -333,7 +333,7 @@ public class DtsFootprintExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdLessThanOrEqualTo(Integer value) { public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id"); addCriterion("id <=", value, "id");
return (Criteria) this; return (Criteria) this;
} }
...@@ -350,22 +350,22 @@ public class DtsFootprintExample { ...@@ -350,22 +350,22 @@ public class DtsFootprintExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdIn(List<Integer> values) { public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id"); addCriterion("id in", values, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdNotIn(List<Integer> values) { public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id"); addCriterion("id not in", values, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdBetween(Integer value1, Integer value2) { public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id"); addCriterion("id between", value1, value2, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdNotBetween(Integer value1, Integer value2) { public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id"); addCriterion("id not between", value1, value2, "id");
return (Criteria) this; return (Criteria) this;
} }
...@@ -380,7 +380,7 @@ public class DtsFootprintExample { ...@@ -380,7 +380,7 @@ public class DtsFootprintExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserIdEqualTo(Integer value) { public Criteria andUserIdEqualTo(Long value) {
addCriterion("user_id =", value, "userId"); addCriterion("user_id =", value, "userId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -397,7 +397,7 @@ public class DtsFootprintExample { ...@@ -397,7 +397,7 @@ public class DtsFootprintExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserIdNotEqualTo(Integer value) { public Criteria andUserIdNotEqualTo(Long value) {
addCriterion("user_id <>", value, "userId"); addCriterion("user_id <>", value, "userId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -414,7 +414,7 @@ public class DtsFootprintExample { ...@@ -414,7 +414,7 @@ public class DtsFootprintExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserIdGreaterThan(Integer value) { public Criteria andUserIdGreaterThan(Long value) {
addCriterion("user_id >", value, "userId"); addCriterion("user_id >", value, "userId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -431,7 +431,7 @@ public class DtsFootprintExample { ...@@ -431,7 +431,7 @@ public class DtsFootprintExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserIdGreaterThanOrEqualTo(Integer value) { public Criteria andUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("user_id >=", value, "userId"); addCriterion("user_id >=", value, "userId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -448,7 +448,7 @@ public class DtsFootprintExample { ...@@ -448,7 +448,7 @@ public class DtsFootprintExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserIdLessThan(Integer value) { public Criteria andUserIdLessThan(Long value) {
addCriterion("user_id <", value, "userId"); addCriterion("user_id <", value, "userId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -465,7 +465,7 @@ public class DtsFootprintExample { ...@@ -465,7 +465,7 @@ public class DtsFootprintExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserIdLessThanOrEqualTo(Integer value) { public Criteria andUserIdLessThanOrEqualTo(Long value) {
addCriterion("user_id <=", value, "userId"); addCriterion("user_id <=", value, "userId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -482,22 +482,22 @@ public class DtsFootprintExample { ...@@ -482,22 +482,22 @@ public class DtsFootprintExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserIdIn(List<Integer> values) { public Criteria andUserIdIn(List<Long> values) {
addCriterion("user_id in", values, "userId"); addCriterion("user_id in", values, "userId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserIdNotIn(List<Integer> values) { public Criteria andUserIdNotIn(List<Long> values) {
addCriterion("user_id not in", values, "userId"); addCriterion("user_id not in", values, "userId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserIdBetween(Integer value1, Integer value2) { public Criteria andUserIdBetween(Long value1, Long value2) {
addCriterion("user_id between", value1, value2, "userId"); addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserIdNotBetween(Integer value1, Integer value2) { public Criteria andUserIdNotBetween(Long value1, Long value2) {
addCriterion("user_id not between", value1, value2, "userId"); addCriterion("user_id not between", value1, value2, "userId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -512,7 +512,7 @@ public class DtsFootprintExample { ...@@ -512,7 +512,7 @@ public class DtsFootprintExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsIdEqualTo(Integer value) { public Criteria andGoodsIdEqualTo(Long value) {
addCriterion("goods_id =", value, "goodsId"); addCriterion("goods_id =", value, "goodsId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -529,7 +529,7 @@ public class DtsFootprintExample { ...@@ -529,7 +529,7 @@ public class DtsFootprintExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsIdNotEqualTo(Integer value) { public Criteria andGoodsIdNotEqualTo(Long value) {
addCriterion("goods_id <>", value, "goodsId"); addCriterion("goods_id <>", value, "goodsId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -546,7 +546,7 @@ public class DtsFootprintExample { ...@@ -546,7 +546,7 @@ public class DtsFootprintExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsIdGreaterThan(Integer value) { public Criteria andGoodsIdGreaterThan(Long value) {
addCriterion("goods_id >", value, "goodsId"); addCriterion("goods_id >", value, "goodsId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -563,7 +563,7 @@ public class DtsFootprintExample { ...@@ -563,7 +563,7 @@ public class DtsFootprintExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsIdGreaterThanOrEqualTo(Integer value) { public Criteria andGoodsIdGreaterThanOrEqualTo(Long value) {
addCriterion("goods_id >=", value, "goodsId"); addCriterion("goods_id >=", value, "goodsId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -580,7 +580,7 @@ public class DtsFootprintExample { ...@@ -580,7 +580,7 @@ public class DtsFootprintExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsIdLessThan(Integer value) { public Criteria andGoodsIdLessThan(Long value) {
addCriterion("goods_id <", value, "goodsId"); addCriterion("goods_id <", value, "goodsId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -597,7 +597,7 @@ public class DtsFootprintExample { ...@@ -597,7 +597,7 @@ public class DtsFootprintExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsIdLessThanOrEqualTo(Integer value) { public Criteria andGoodsIdLessThanOrEqualTo(Long value) {
addCriterion("goods_id <=", value, "goodsId"); addCriterion("goods_id <=", value, "goodsId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -614,22 +614,22 @@ public class DtsFootprintExample { ...@@ -614,22 +614,22 @@ public class DtsFootprintExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsIdIn(List<Integer> values) { public Criteria andGoodsIdIn(List<Long> values) {
addCriterion("goods_id in", values, "goodsId"); addCriterion("goods_id in", values, "goodsId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsIdNotIn(List<Integer> values) { public Criteria andGoodsIdNotIn(List<Long> values) {
addCriterion("goods_id not in", values, "goodsId"); addCriterion("goods_id not in", values, "goodsId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsIdBetween(Integer value1, Integer value2) { public Criteria andGoodsIdBetween(Long value1, Long value2) {
addCriterion("goods_id between", value1, value2, "goodsId"); addCriterion("goods_id between", value1, value2, "goodsId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGoodsIdNotBetween(Integer value1, Integer value2) { public Criteria andGoodsIdNotBetween(Long value1, Long value2) {
addCriterion("goods_id not between", value1, value2, "goodsId"); addCriterion("goods_id not between", value1, value2, "goodsId");
return (Criteria) this; return (Criteria) this;
} }
......
...@@ -30,7 +30,7 @@ public class DtsSearchHistory { ...@@ -30,7 +30,7 @@ public class DtsSearchHistory {
* *
* @mbg.generated * @mbg.generated
*/ */
private Integer id; private Long id;
/** /**
* *
...@@ -39,7 +39,7 @@ public class DtsSearchHistory { ...@@ -39,7 +39,7 @@ public class DtsSearchHistory {
* *
* @mbg.generated * @mbg.generated
*/ */
private Integer userId; private Long userId;
/** /**
* *
...@@ -94,7 +94,7 @@ public class DtsSearchHistory { ...@@ -94,7 +94,7 @@ public class DtsSearchHistory {
* *
* @mbg.generated * @mbg.generated
*/ */
public Integer getId() { public Long getId() {
return id; return id;
} }
...@@ -106,7 +106,7 @@ public class DtsSearchHistory { ...@@ -106,7 +106,7 @@ public class DtsSearchHistory {
* *
* @mbg.generated * @mbg.generated
*/ */
public void setId(Integer id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
...@@ -118,7 +118,7 @@ public class DtsSearchHistory { ...@@ -118,7 +118,7 @@ public class DtsSearchHistory {
* *
* @mbg.generated * @mbg.generated
*/ */
public Integer getUserId() { public Long getUserId() {
return userId; return userId;
} }
...@@ -130,7 +130,7 @@ public class DtsSearchHistory { ...@@ -130,7 +130,7 @@ public class DtsSearchHistory {
* *
* @mbg.generated * @mbg.generated
*/ */
public void setUserId(Integer userId) { public void setUserId(Long userId) {
this.userId = userId; this.userId = userId;
} }
...@@ -343,8 +343,8 @@ public class DtsSearchHistory { ...@@ -343,8 +343,8 @@ public class DtsSearchHistory {
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public enum Column { public enum Column {
id("id", "id", "INTEGER", false), id("id", "id", "BIGINT", false),
userId("user_id", "userId", "INTEGER", false), userId("user_id", "userId", "BIGINT", false),
keyword("keyword", "keyword", "VARCHAR", false), keyword("keyword", "keyword", "VARCHAR", false),
from("from", "from", "VARCHAR", true), from("from", "from", "VARCHAR", true),
addTime("add_time", "addTime", "TIMESTAMP", false), addTime("add_time", "addTime", "TIMESTAMP", false),
......
...@@ -248,7 +248,7 @@ public class DtsSearchHistoryExample { ...@@ -248,7 +248,7 @@ public class DtsSearchHistoryExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdEqualTo(Integer value) { public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id"); addCriterion("id =", value, "id");
return (Criteria) this; return (Criteria) this;
} }
...@@ -265,7 +265,7 @@ public class DtsSearchHistoryExample { ...@@ -265,7 +265,7 @@ public class DtsSearchHistoryExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdNotEqualTo(Integer value) { public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id"); addCriterion("id <>", value, "id");
return (Criteria) this; return (Criteria) this;
} }
...@@ -282,7 +282,7 @@ public class DtsSearchHistoryExample { ...@@ -282,7 +282,7 @@ public class DtsSearchHistoryExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdGreaterThan(Integer value) { public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id"); addCriterion("id >", value, "id");
return (Criteria) this; return (Criteria) this;
} }
...@@ -299,7 +299,7 @@ public class DtsSearchHistoryExample { ...@@ -299,7 +299,7 @@ public class DtsSearchHistoryExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdGreaterThanOrEqualTo(Integer value) { public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id"); addCriterion("id >=", value, "id");
return (Criteria) this; return (Criteria) this;
} }
...@@ -316,7 +316,7 @@ public class DtsSearchHistoryExample { ...@@ -316,7 +316,7 @@ public class DtsSearchHistoryExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdLessThan(Integer value) { public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id"); addCriterion("id <", value, "id");
return (Criteria) this; return (Criteria) this;
} }
...@@ -333,7 +333,7 @@ public class DtsSearchHistoryExample { ...@@ -333,7 +333,7 @@ public class DtsSearchHistoryExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdLessThanOrEqualTo(Integer value) { public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id"); addCriterion("id <=", value, "id");
return (Criteria) this; return (Criteria) this;
} }
...@@ -350,22 +350,22 @@ public class DtsSearchHistoryExample { ...@@ -350,22 +350,22 @@ public class DtsSearchHistoryExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdIn(List<Integer> values) { public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id"); addCriterion("id in", values, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdNotIn(List<Integer> values) { public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id"); addCriterion("id not in", values, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdBetween(Integer value1, Integer value2) { public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id"); addCriterion("id between", value1, value2, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdNotBetween(Integer value1, Integer value2) { public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id"); addCriterion("id not between", value1, value2, "id");
return (Criteria) this; return (Criteria) this;
} }
...@@ -380,7 +380,7 @@ public class DtsSearchHistoryExample { ...@@ -380,7 +380,7 @@ public class DtsSearchHistoryExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserIdEqualTo(Integer value) { public Criteria andUserIdEqualTo(Long value) {
addCriterion("user_id =", value, "userId"); addCriterion("user_id =", value, "userId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -397,7 +397,7 @@ public class DtsSearchHistoryExample { ...@@ -397,7 +397,7 @@ public class DtsSearchHistoryExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserIdNotEqualTo(Integer value) { public Criteria andUserIdNotEqualTo(Long value) {
addCriterion("user_id <>", value, "userId"); addCriterion("user_id <>", value, "userId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -414,7 +414,7 @@ public class DtsSearchHistoryExample { ...@@ -414,7 +414,7 @@ public class DtsSearchHistoryExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserIdGreaterThan(Integer value) { public Criteria andUserIdGreaterThan(Long value) {
addCriterion("user_id >", value, "userId"); addCriterion("user_id >", value, "userId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -431,7 +431,7 @@ public class DtsSearchHistoryExample { ...@@ -431,7 +431,7 @@ public class DtsSearchHistoryExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserIdGreaterThanOrEqualTo(Integer value) { public Criteria andUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("user_id >=", value, "userId"); addCriterion("user_id >=", value, "userId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -448,7 +448,7 @@ public class DtsSearchHistoryExample { ...@@ -448,7 +448,7 @@ public class DtsSearchHistoryExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserIdLessThan(Integer value) { public Criteria andUserIdLessThan(Long value) {
addCriterion("user_id <", value, "userId"); addCriterion("user_id <", value, "userId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -465,7 +465,7 @@ public class DtsSearchHistoryExample { ...@@ -465,7 +465,7 @@ public class DtsSearchHistoryExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserIdLessThanOrEqualTo(Integer value) { public Criteria andUserIdLessThanOrEqualTo(Long value) {
addCriterion("user_id <=", value, "userId"); addCriterion("user_id <=", value, "userId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -482,22 +482,22 @@ public class DtsSearchHistoryExample { ...@@ -482,22 +482,22 @@ public class DtsSearchHistoryExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserIdIn(List<Integer> values) { public Criteria andUserIdIn(List<Long> values) {
addCriterion("user_id in", values, "userId"); addCriterion("user_id in", values, "userId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserIdNotIn(List<Integer> values) { public Criteria andUserIdNotIn(List<Long> values) {
addCriterion("user_id not in", values, "userId"); addCriterion("user_id not in", values, "userId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserIdBetween(Integer value1, Integer value2) { public Criteria andUserIdBetween(Long value1, Long value2) {
addCriterion("user_id between", value1, value2, "userId"); addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andUserIdNotBetween(Integer value1, Integer value2) { public Criteria andUserIdNotBetween(Long value1, Long value2) {
addCriterion("user_id not between", value1, value2, "userId"); addCriterion("user_id not between", value1, value2, "userId");
return (Criteria) this; return (Criteria) this;
} }
......
...@@ -31,7 +31,7 @@ public class DtsUser { ...@@ -31,7 +31,7 @@ public class DtsUser {
* *
* @mbg.generated * @mbg.generated
*/ */
private Integer id; private Long id;
/** /**
* *
...@@ -175,7 +175,7 @@ public class DtsUser { ...@@ -175,7 +175,7 @@ public class DtsUser {
* *
* @mbg.generated * @mbg.generated
*/ */
private Integer shareUserId; private Long shareUserId;
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
...@@ -185,7 +185,7 @@ public class DtsUser { ...@@ -185,7 +185,7 @@ public class DtsUser {
* *
* @mbg.generated * @mbg.generated
*/ */
public Integer getId() { public Long getId() {
return id; return id;
} }
...@@ -197,7 +197,7 @@ public class DtsUser { ...@@ -197,7 +197,7 @@ public class DtsUser {
* *
* @mbg.generated * @mbg.generated
*/ */
public void setId(Integer id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
...@@ -569,7 +569,7 @@ public class DtsUser { ...@@ -569,7 +569,7 @@ public class DtsUser {
* *
* @mbg.generated * @mbg.generated
*/ */
public Integer getShareUserId() { public Long getShareUserId() {
return shareUserId; return shareUserId;
} }
...@@ -581,7 +581,7 @@ public class DtsUser { ...@@ -581,7 +581,7 @@ public class DtsUser {
* *
* @mbg.generated * @mbg.generated
*/ */
public void setShareUserId(Integer shareUserId) { public void setShareUserId(Long shareUserId) {
this.shareUserId = shareUserId; this.shareUserId = shareUserId;
} }
...@@ -704,7 +704,7 @@ public class DtsUser { ...@@ -704,7 +704,7 @@ public class DtsUser {
* @project https://github.com/itfsw/mybatis-generator-plugin * @project https://github.com/itfsw/mybatis-generator-plugin
*/ */
public enum Column { public enum Column {
id("id", "id", "INTEGER", false), id("id", "id", "BIGINT", false),
username("username", "username", "VARCHAR", false), username("username", "username", "VARCHAR", false),
password("password", "password", "VARCHAR", true), password("password", "password", "VARCHAR", true),
gender("gender", "gender", "TINYINT", false), gender("gender", "gender", "TINYINT", false),
...@@ -720,7 +720,7 @@ public class DtsUser { ...@@ -720,7 +720,7 @@ public class DtsUser {
addTime("add_time", "addTime", "TIMESTAMP", false), addTime("add_time", "addTime", "TIMESTAMP", false),
updateTime("update_time", "updateTime", "TIMESTAMP", false), updateTime("update_time", "updateTime", "TIMESTAMP", false),
deleted("deleted", "deleted", "BIT", false), deleted("deleted", "deleted", "BIT", false),
shareUserId("share_user_id", "shareUserId", "INTEGER", false); shareUserId("share_user_id", "shareUserId", "BIGINT", false);
/** /**
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
......
...@@ -249,7 +249,7 @@ public class DtsUserExample { ...@@ -249,7 +249,7 @@ public class DtsUserExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdEqualTo(Integer value) { public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id"); addCriterion("id =", value, "id");
return (Criteria) this; return (Criteria) this;
} }
...@@ -266,7 +266,7 @@ public class DtsUserExample { ...@@ -266,7 +266,7 @@ public class DtsUserExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdNotEqualTo(Integer value) { public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id"); addCriterion("id <>", value, "id");
return (Criteria) this; return (Criteria) this;
} }
...@@ -283,7 +283,7 @@ public class DtsUserExample { ...@@ -283,7 +283,7 @@ public class DtsUserExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdGreaterThan(Integer value) { public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id"); addCriterion("id >", value, "id");
return (Criteria) this; return (Criteria) this;
} }
...@@ -300,7 +300,7 @@ public class DtsUserExample { ...@@ -300,7 +300,7 @@ public class DtsUserExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdGreaterThanOrEqualTo(Integer value) { public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id"); addCriterion("id >=", value, "id");
return (Criteria) this; return (Criteria) this;
} }
...@@ -317,7 +317,7 @@ public class DtsUserExample { ...@@ -317,7 +317,7 @@ public class DtsUserExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdLessThan(Integer value) { public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id"); addCriterion("id <", value, "id");
return (Criteria) this; return (Criteria) this;
} }
...@@ -334,7 +334,7 @@ public class DtsUserExample { ...@@ -334,7 +334,7 @@ public class DtsUserExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdLessThanOrEqualTo(Integer value) { public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id"); addCriterion("id <=", value, "id");
return (Criteria) this; return (Criteria) this;
} }
...@@ -351,22 +351,22 @@ public class DtsUserExample { ...@@ -351,22 +351,22 @@ public class DtsUserExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdIn(List<Integer> values) { public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id"); addCriterion("id in", values, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdNotIn(List<Integer> values) { public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id"); addCriterion("id not in", values, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdBetween(Integer value1, Integer value2) { public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id"); addCriterion("id between", value1, value2, "id");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIdNotBetween(Integer value1, Integer value2) { public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id"); addCriterion("id not between", value1, value2, "id");
return (Criteria) this; return (Criteria) this;
} }
...@@ -2431,7 +2431,7 @@ public class DtsUserExample { ...@@ -2431,7 +2431,7 @@ public class DtsUserExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andShareUserIdEqualTo(Integer value) { public Criteria andShareUserIdEqualTo(Long value) {
addCriterion("share_user_id =", value, "shareUserId"); addCriterion("share_user_id =", value, "shareUserId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -2448,7 +2448,7 @@ public class DtsUserExample { ...@@ -2448,7 +2448,7 @@ public class DtsUserExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andShareUserIdNotEqualTo(Integer value) { public Criteria andShareUserIdNotEqualTo(Long value) {
addCriterion("share_user_id <>", value, "shareUserId"); addCriterion("share_user_id <>", value, "shareUserId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -2465,7 +2465,7 @@ public class DtsUserExample { ...@@ -2465,7 +2465,7 @@ public class DtsUserExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andShareUserIdGreaterThan(Integer value) { public Criteria andShareUserIdGreaterThan(Long value) {
addCriterion("share_user_id >", value, "shareUserId"); addCriterion("share_user_id >", value, "shareUserId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -2482,7 +2482,7 @@ public class DtsUserExample { ...@@ -2482,7 +2482,7 @@ public class DtsUserExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andShareUserIdGreaterThanOrEqualTo(Integer value) { public Criteria andShareUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("share_user_id >=", value, "shareUserId"); addCriterion("share_user_id >=", value, "shareUserId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -2499,7 +2499,7 @@ public class DtsUserExample { ...@@ -2499,7 +2499,7 @@ public class DtsUserExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andShareUserIdLessThan(Integer value) { public Criteria andShareUserIdLessThan(Long value) {
addCriterion("share_user_id <", value, "shareUserId"); addCriterion("share_user_id <", value, "shareUserId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -2516,7 +2516,7 @@ public class DtsUserExample { ...@@ -2516,7 +2516,7 @@ public class DtsUserExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andShareUserIdLessThanOrEqualTo(Integer value) { public Criteria andShareUserIdLessThanOrEqualTo(Long value) {
addCriterion("share_user_id <=", value, "shareUserId"); addCriterion("share_user_id <=", value, "shareUserId");
return (Criteria) this; return (Criteria) this;
} }
...@@ -2533,22 +2533,22 @@ public class DtsUserExample { ...@@ -2533,22 +2533,22 @@ public class DtsUserExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andShareUserIdIn(List<Integer> values) { public Criteria andShareUserIdIn(List<Long> values) {
addCriterion("share_user_id in", values, "shareUserId"); addCriterion("share_user_id in", values, "shareUserId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andShareUserIdNotIn(List<Integer> values) { public Criteria andShareUserIdNotIn(List<Long> values) {
addCriterion("share_user_id not in", values, "shareUserId"); addCriterion("share_user_id not in", values, "shareUserId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andShareUserIdBetween(Integer value1, Integer value2) { public Criteria andShareUserIdBetween(Long value1, Long value2) {
addCriterion("share_user_id between", value1, value2, "shareUserId"); addCriterion("share_user_id between", value1, value2, "shareUserId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andShareUserIdNotBetween(Integer value1, Integer value2) { public Criteria andShareUserIdNotBetween(Long value1, Long value2) {
addCriterion("share_user_id not between", value1, value2, "shareUserId"); addCriterion("share_user_id not between", value1, value2, "shareUserId");
return (Criteria) this; return (Criteria) this;
} }
......
...@@ -17,13 +17,13 @@ public class DtsCollectService { ...@@ -17,13 +17,13 @@ public class DtsCollectService {
@Resource @Resource
private DtsCollectMapper collectMapper; private DtsCollectMapper collectMapper;
public int count(int uid, Integer gid) { public int count(Long uid, Long gid) {
DtsCollectExample example = new DtsCollectExample(); DtsCollectExample example = new DtsCollectExample();
example.or().andUserIdEqualTo(uid).andValueIdEqualTo(gid).andDeletedEqualTo(false); example.or().andUserIdEqualTo(uid).andValueIdEqualTo(gid).andDeletedEqualTo(false);
return (int) collectMapper.countByExample(example); return (int) collectMapper.countByExample(example);
} }
public List<DtsCollect> queryByType(Integer userId, Byte type, Integer page, Integer size) { public List<DtsCollect> queryByType(Long userId, Byte type, Integer page, Integer size) {
DtsCollectExample example = new DtsCollectExample(); DtsCollectExample example = new DtsCollectExample();
example.or().andUserIdEqualTo(userId).andTypeEqualTo(type).andDeletedEqualTo(false); example.or().andUserIdEqualTo(userId).andTypeEqualTo(type).andDeletedEqualTo(false);
example.setOrderByClause(DtsCollect.Column.addTime.desc()); example.setOrderByClause(DtsCollect.Column.addTime.desc());
...@@ -31,19 +31,19 @@ public class DtsCollectService { ...@@ -31,19 +31,19 @@ public class DtsCollectService {
return collectMapper.selectByExample(example); return collectMapper.selectByExample(example);
} }
public int countByType(Integer userId, Byte type) { public int countByType(Long userId, Byte type) {
DtsCollectExample example = new DtsCollectExample(); DtsCollectExample example = new DtsCollectExample();
example.or().andUserIdEqualTo(userId).andTypeEqualTo(type).andDeletedEqualTo(false); example.or().andUserIdEqualTo(userId).andTypeEqualTo(type).andDeletedEqualTo(false);
return (int) collectMapper.countByExample(example); return (int) collectMapper.countByExample(example);
} }
public DtsCollect queryByTypeAndValue(Integer userId, Byte type, Integer valueId) { public DtsCollect queryByTypeAndValue(Long userId, Byte type, Long valueId) {
DtsCollectExample example = new DtsCollectExample(); DtsCollectExample example = new DtsCollectExample();
example.or().andUserIdEqualTo(userId).andValueIdEqualTo(valueId).andTypeEqualTo(type).andDeletedEqualTo(false); example.or().andUserIdEqualTo(userId).andValueIdEqualTo(valueId).andTypeEqualTo(type).andDeletedEqualTo(false);
return collectMapper.selectOneByExample(example); return collectMapper.selectOneByExample(example);
} }
public void deleteById(Integer id) { public void deleteById(Long id) {
collectMapper.logicalDeleteByPrimaryKey(id); collectMapper.logicalDeleteByPrimaryKey(id);
} }
...@@ -59,10 +59,10 @@ public class DtsCollectService { ...@@ -59,10 +59,10 @@ public class DtsCollectService {
DtsCollectExample.Criteria criteria = example.createCriteria(); DtsCollectExample.Criteria criteria = example.createCriteria();
if (!StringUtils.isEmpty(userId)) { if (!StringUtils.isEmpty(userId)) {
criteria.andUserIdEqualTo(Integer.valueOf(userId)); criteria.andUserIdEqualTo(Long.valueOf(userId));
} }
if (!StringUtils.isEmpty(valueId)) { if (!StringUtils.isEmpty(valueId)) {
criteria.andValueIdEqualTo(Integer.valueOf(valueId)); criteria.andValueIdEqualTo(Long.valueOf(valueId));
} }
criteria.andDeletedEqualTo(false); criteria.andDeletedEqualTo(false);
......
...@@ -27,7 +27,7 @@ public class DtsFeedbackService { ...@@ -27,7 +27,7 @@ public class DtsFeedbackService {
return feedbackMapper.insertSelective(feedback); return feedbackMapper.insertSelective(feedback);
} }
public List<DtsFeedback> querySelective(Integer userId, String username, Integer page, Integer limit, String sort, public List<DtsFeedback> querySelective(Long userId, String username, Integer page, Integer limit, String sort,
String order) { String order) {
DtsFeedbackExample example = new DtsFeedbackExample(); DtsFeedbackExample example = new DtsFeedbackExample();
DtsFeedbackExample.Criteria criteria = example.createCriteria(); DtsFeedbackExample.Criteria criteria = example.createCriteria();
......
...@@ -17,7 +17,7 @@ public class DtsFootprintService { ...@@ -17,7 +17,7 @@ public class DtsFootprintService {
@Resource @Resource
private DtsFootprintMapper footprintMapper; private DtsFootprintMapper footprintMapper;
public List<DtsFootprint> queryByAddTime(Integer userId, Integer page, Integer size) { public List<DtsFootprint> queryByAddTime(Long userId, Integer page, Integer size) {
DtsFootprintExample example = new DtsFootprintExample(); DtsFootprintExample example = new DtsFootprintExample();
example.or().andUserIdEqualTo(userId).andDeletedEqualTo(false); example.or().andUserIdEqualTo(userId).andDeletedEqualTo(false);
example.setOrderByClause(DtsFootprint.Column.addTime.desc()); example.setOrderByClause(DtsFootprint.Column.addTime.desc());
...@@ -25,11 +25,11 @@ public class DtsFootprintService { ...@@ -25,11 +25,11 @@ public class DtsFootprintService {
return footprintMapper.selectByExample(example); return footprintMapper.selectByExample(example);
} }
public DtsFootprint findById(Integer id) { public DtsFootprint findById(Long id) {
return footprintMapper.selectByPrimaryKey(id); return footprintMapper.selectByPrimaryKey(id);
} }
public void deleteById(Integer id) { public void deleteById(Long id) {
footprintMapper.logicalDeleteByPrimaryKey(id); footprintMapper.logicalDeleteByPrimaryKey(id);
} }
...@@ -45,10 +45,10 @@ public class DtsFootprintService { ...@@ -45,10 +45,10 @@ public class DtsFootprintService {
DtsFootprintExample.Criteria criteria = example.createCriteria(); DtsFootprintExample.Criteria criteria = example.createCriteria();
if (!StringUtils.isEmpty(userId)) { if (!StringUtils.isEmpty(userId)) {
criteria.andUserIdEqualTo(Integer.valueOf(userId)); criteria.andUserIdEqualTo(Long.valueOf(userId));
} }
if (!StringUtils.isEmpty(goodsId)) { if (!StringUtils.isEmpty(goodsId)) {
criteria.andGoodsIdEqualTo(Integer.valueOf(goodsId)); criteria.andGoodsIdEqualTo(Long.valueOf(goodsId));
} }
criteria.andDeletedEqualTo(false); criteria.andDeletedEqualTo(false);
......
...@@ -23,14 +23,14 @@ public class DtsSearchHistoryService { ...@@ -23,14 +23,14 @@ public class DtsSearchHistoryService {
searchHistoryMapper.insertSelective(searchHistory); searchHistoryMapper.insertSelective(searchHistory);
} }
public List<DtsSearchHistory> queryByUid(int uid) { public List<DtsSearchHistory> queryByUid(Long uid) {
DtsSearchHistoryExample example = new DtsSearchHistoryExample(); DtsSearchHistoryExample example = new DtsSearchHistoryExample();
example.or().andUserIdEqualTo(uid).andDeletedEqualTo(false); example.or().andUserIdEqualTo(uid).andDeletedEqualTo(false);
example.setDistinct(true); example.setDistinct(true);
return searchHistoryMapper.selectByExampleSelective(example, DtsSearchHistory.Column.keyword); return searchHistoryMapper.selectByExampleSelective(example, DtsSearchHistory.Column.keyword);
} }
public void deleteByUid(int uid) { public void deleteByUid(Long uid) {
DtsSearchHistoryExample example = new DtsSearchHistoryExample(); DtsSearchHistoryExample example = new DtsSearchHistoryExample();
example.or().andUserIdEqualTo(uid); example.or().andUserIdEqualTo(uid);
searchHistoryMapper.logicalDeleteByExample(example); searchHistoryMapper.logicalDeleteByExample(example);
...@@ -42,7 +42,7 @@ public class DtsSearchHistoryService { ...@@ -42,7 +42,7 @@ public class DtsSearchHistoryService {
DtsSearchHistoryExample.Criteria criteria = example.createCriteria(); DtsSearchHistoryExample.Criteria criteria = example.createCriteria();
if (!StringUtils.isEmpty(userId)) { if (!StringUtils.isEmpty(userId)) {
criteria.andUserIdEqualTo(Integer.valueOf(userId)); criteria.andUserIdEqualTo(Long.valueOf(userId));
} }
if (!StringUtils.isEmpty(keyword)) { if (!StringUtils.isEmpty(keyword)) {
criteria.andKeywordLike("%" + keyword + "%"); criteria.andKeywordLike("%" + keyword + "%");
......
...@@ -31,11 +31,11 @@ public class DtsUserService { ...@@ -31,11 +31,11 @@ public class DtsUserService {
@Resource @Resource
private StatMapper statMapper; private StatMapper statMapper;
public DtsUser findById(Integer userId) { public DtsUser findById(Long userId) {
return userMapper.selectByPrimaryKey(userId); return userMapper.selectByPrimaryKey(userId);
} }
public UserVo findUserVoById(Integer userId) { public UserVo findUserVoById(Long userId) {
DtsUser user = findById(userId); DtsUser user = findById(userId);
UserVo userVo = new UserVo(); UserVo userVo = new UserVo();
userVo.setNickname(user.getNickname()); userVo.setNickname(user.getNickname());
...@@ -112,59 +112,11 @@ public class DtsUserService { ...@@ -112,59 +112,11 @@ public class DtsUserService {
return userMapper.selectByExample(example); return userMapper.selectByExample(example);
} }
public void deleteById(Integer id) { public void deleteById(Long id) {
userMapper.logicalDeleteByPrimaryKey(id); userMapper.logicalDeleteByPrimaryKey(id);
} }
/**
* 审批代理申请
* @param userAccount
*/
public void approveAgency(Integer userId,Integer settlementRate,String shareUrl) {
//获取账户数据
DtsUserAccountExample example = new DtsUserAccountExample();
example.or().andUserIdEqualTo(userId);
DtsUserAccount dbAccount = userAccountMapper.selectOneByExample(example);
if (dbAccount == null) {
throw new RuntimeException("申请账户不存在");
}
dbAccount.setShareUrl(shareUrl);
if (!StringUtils.isEmpty(settlementRate)) {
dbAccount.setSettlementRate(settlementRate);
}
dbAccount.setModifyTime(LocalDateTime.now());
userAccountMapper.updateByPrimaryKey(dbAccount);
//更新会员状态和类型
DtsUser user = findById(userId);
user.setUserLevel((byte) 2);//区域代理用户
user.setStatus((byte) 0);//正常状态
updateById(user);
}
public DtsUserAccount detailApproveByUserId(Integer userId) {
// 获取账户数据
DtsUserAccountExample example = new DtsUserAccountExample();
example.or().andUserIdEqualTo(userId);
DtsUserAccount dbAccount = userAccountMapper.selectOneByExample(example);
return dbAccount;
}
public List<DtsUser> queryDtsUserListByNickname(String username,String mobile) {
DtsUserExample example = new DtsUserExample();
DtsUserExample.Criteria criteria = example.createCriteria();
if (!StringUtils.isEmpty(username)) {
criteria.andNicknameLike("%" + username + "%");
}
if (!StringUtils.isEmpty(mobile)) {
criteria.andMobileEqualTo(mobile);
}
criteria.andDeletedEqualTo(false);
return userMapper.selectByExample(example);
}
public List<DayStatis> recentCount(int statisDaysRang) { public List<DayStatis> recentCount(int statisDaysRang) {
return statMapper.statisIncreaseUserCnt(statisDaysRang); return statMapper.statisIncreaseUserCnt(statisDaysRang);
......
...@@ -15,19 +15,25 @@ public class UgcCoinService { ...@@ -15,19 +15,25 @@ public class UgcCoinService {
@Resource @Resource
private UgcCoinMapper ugcCoinMapper; private UgcCoinMapper ugcCoinMapper;
public List<UgcCoin> queryByUserId(Long userId, Integer page, Integer size) { public List<UgcCoinWithBLOBs> queryByUserId(Long userId, Integer page, Integer size) {
UgcCoinExample example = new UgcCoinExample(); UgcCoinExample example = new UgcCoinExample();
example.or().andUidEqualTo(userId).andIsDeletedEqualTo(false); example.or().andUidEqualTo(userId).andIsDeletedEqualTo(false);
page = null != page ? page : 1; page = null != page ? page : 1;
size = null != size ? size : 10; size = null != size ? size : 10;
PageHelper.startPage(page, size); PageHelper.startPage(page, size);
return ugcCoinMapper.selectByExample(example); return ugcCoinMapper.selectByExampleWithBLOBs(example);
}
public Long countByUserId(Long userId) {
UgcCoinExample example = new UgcCoinExample();
example.or().andUidEqualTo(userId).andIsDeletedEqualTo(false);
return ugcCoinMapper.countByExample(example);
} }
public void add(UgcCoinWithBLOBs coin) { public void add(UgcCoinWithBLOBs coin) {
coin.setCreated(LocalDateTime.now()); coin.setCreated(LocalDateTime.now());
coin.setUpdated(LocalDateTime.now()); coin.setUpdated(LocalDateTime.now());
ugcCoinMapper.insertSelective(coin); ugcCoinMapper.insert(coin);
} }
public int updateById(UgcCoinWithBLOBs coin) { public int updateById(UgcCoinWithBLOBs coin) {
...@@ -38,4 +44,8 @@ public class UgcCoinService { ...@@ -38,4 +44,8 @@ public class UgcCoinService {
public void deleteById(Long id) { public void deleteById(Long id) {
ugcCoinMapper.logicalDeleteByPrimaryKey(id); ugcCoinMapper.logicalDeleteByPrimaryKey(id);
} }
public UgcCoinWithBLOBs getById(Long id) {
return ugcCoinMapper.selectByPrimaryKey(id);
}
} }
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
<id column="id" jdbcType="INTEGER" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="user_id" jdbcType="INTEGER" property="userId" /> <result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="value_id" jdbcType="INTEGER" property="valueId" /> <result column="value_id" jdbcType="BIGINT" property="valueId" />
<result column="type" jdbcType="TINYINT" property="type" /> <result column="type" jdbcType="TINYINT" property="type" />
<result column="add_time" jdbcType="TIMESTAMP" property="addTime" /> <result column="add_time" jdbcType="TIMESTAMP" property="addTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
order by ${example.orderByClause} order by ${example.orderByClause}
</if> </if>
</select> </select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from dts_collect from dts_collect
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}
</select> </select>
<select id="selectByPrimaryKeyWithLogicalDelete" parameterType="map" resultMap="BaseResultMap"> <select id="selectByPrimaryKeyWithLogicalDelete" parameterType="map" resultMap="BaseResultMap">
<!-- <!--
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from dts_collect from dts_collect
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}
and deleted = and deleted =
<choose> <choose>
<when test="andLogicalDeleted"> <when test="andLogicalDeleted">
...@@ -185,15 +185,15 @@ ...@@ -185,15 +185,15 @@
</otherwise> </otherwise>
</choose> </choose>
from dts_collect from dts_collect
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
delete from dts_collect delete from dts_collect
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}
</delete> </delete>
<delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.DtsCollectExample"> <delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.DtsCollectExample">
<!-- <!--
...@@ -210,13 +210,13 @@ ...@@ -210,13 +210,13 @@
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into dts_collect (user_id, value_id, `type`, insert into dts_collect (user_id, value_id, `type`,
add_time, update_time, deleted add_time, update_time, deleted
) )
values (#{userId,jdbcType=INTEGER}, #{valueId,jdbcType=INTEGER}, #{type,jdbcType=TINYINT}, values (#{userId,jdbcType=BIGINT}, #{valueId,jdbcType=BIGINT}, #{type,jdbcType=TINYINT},
#{addTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT} #{addTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT}
) )
</insert> </insert>
...@@ -225,7 +225,7 @@ ...@@ -225,7 +225,7 @@
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into dts_collect insert into dts_collect
...@@ -251,10 +251,10 @@ ...@@ -251,10 +251,10 @@
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null"> <if test="userId != null">
#{userId,jdbcType=INTEGER}, #{userId,jdbcType=BIGINT},
</if> </if>
<if test="valueId != null"> <if test="valueId != null">
#{valueId,jdbcType=INTEGER}, #{valueId,jdbcType=BIGINT},
</if> </if>
<if test="type != null"> <if test="type != null">
#{type,jdbcType=TINYINT}, #{type,jdbcType=TINYINT},
...@@ -288,13 +288,13 @@ ...@@ -288,13 +288,13 @@
update dts_collect update dts_collect
<set> <set>
<if test="record.id != null"> <if test="record.id != null">
id = #{record.id,jdbcType=INTEGER}, id = #{record.id,jdbcType=BIGINT},
</if> </if>
<if test="record.userId != null"> <if test="record.userId != null">
user_id = #{record.userId,jdbcType=INTEGER}, user_id = #{record.userId,jdbcType=BIGINT},
</if> </if>
<if test="record.valueId != null"> <if test="record.valueId != null">
value_id = #{record.valueId,jdbcType=INTEGER}, value_id = #{record.valueId,jdbcType=BIGINT},
</if> </if>
<if test="record.type != null"> <if test="record.type != null">
`type` = #{record.type,jdbcType=TINYINT}, `type` = #{record.type,jdbcType=TINYINT},
...@@ -319,9 +319,9 @@ ...@@ -319,9 +319,9 @@
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
update dts_collect update dts_collect
set id = #{record.id,jdbcType=INTEGER}, set id = #{record.id,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=INTEGER}, user_id = #{record.userId,jdbcType=BIGINT},
value_id = #{record.valueId,jdbcType=INTEGER}, value_id = #{record.valueId,jdbcType=BIGINT},
`type` = #{record.type,jdbcType=TINYINT}, `type` = #{record.type,jdbcType=TINYINT},
add_time = #{record.addTime,jdbcType=TIMESTAMP}, add_time = #{record.addTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, update_time = #{record.updateTime,jdbcType=TIMESTAMP},
...@@ -338,10 +338,10 @@ ...@@ -338,10 +338,10 @@
update dts_collect update dts_collect
<set> <set>
<if test="userId != null"> <if test="userId != null">
user_id = #{userId,jdbcType=INTEGER}, user_id = #{userId,jdbcType=BIGINT},
</if> </if>
<if test="valueId != null"> <if test="valueId != null">
value_id = #{valueId,jdbcType=INTEGER}, value_id = #{valueId,jdbcType=BIGINT},
</if> </if>
<if test="type != null"> <if test="type != null">
`type` = #{type,jdbcType=TINYINT}, `type` = #{type,jdbcType=TINYINT},
...@@ -356,7 +356,7 @@ ...@@ -356,7 +356,7 @@
deleted = #{deleted,jdbcType=BIT}, deleted = #{deleted,jdbcType=BIT},
</if> </if>
</set> </set>
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.DtsCollect"> <update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.DtsCollect">
<!-- <!--
...@@ -364,13 +364,13 @@ ...@@ -364,13 +364,13 @@
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
update dts_collect update dts_collect
set user_id = #{userId,jdbcType=INTEGER}, set user_id = #{userId,jdbcType=BIGINT},
value_id = #{valueId,jdbcType=INTEGER}, value_id = #{valueId,jdbcType=BIGINT},
`type` = #{type,jdbcType=TINYINT}, `type` = #{type,jdbcType=TINYINT},
add_time = #{addTime,jdbcType=TIMESTAMP}, add_time = #{addTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
deleted = #{deleted,jdbcType=BIT} deleted = #{deleted,jdbcType=BIT}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}
</update> </update>
<select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.DtsCollectExample" resultMap="BaseResultMap"> <select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.DtsCollectExample" resultMap="BaseResultMap">
<!-- <!--
...@@ -426,13 +426,13 @@ ...@@ -426,13 +426,13 @@
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
</update> </update>
<update id="logicalDeleteByPrimaryKey" parameterType="java.lang.Integer"> <update id="logicalDeleteByPrimaryKey" parameterType="java.lang.Long">
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin @project https://github.com/itfsw/mybatis-generator-plugin
--> -->
update dts_collect set deleted = 1 update dts_collect set deleted = 1
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}
</update> </update>
</mapper> </mapper>
\ No newline at end of file
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
<id column="id" jdbcType="INTEGER" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="user_id" jdbcType="INTEGER" property="userId" /> <result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="goods_id" jdbcType="INTEGER" property="goodsId" /> <result column="goods_id" jdbcType="BIGINT" property="goodsId" />
<result column="add_time" jdbcType="TIMESTAMP" property="addTime" /> <result column="add_time" jdbcType="TIMESTAMP" property="addTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="deleted" jdbcType="BIT" property="deleted" /> <result column="deleted" jdbcType="BIT" property="deleted" />
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
order by ${example.orderByClause} order by ${example.orderByClause}
</if> </if>
</select> </select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from dts_footprint from dts_footprint
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}
</select> </select>
<select id="selectByPrimaryKeyWithLogicalDelete" parameterType="map" resultMap="BaseResultMap"> <select id="selectByPrimaryKeyWithLogicalDelete" parameterType="map" resultMap="BaseResultMap">
<!-- <!--
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from dts_footprint from dts_footprint
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}
and deleted = and deleted =
<choose> <choose>
<when test="andLogicalDeleted"> <when test="andLogicalDeleted">
...@@ -184,15 +184,15 @@ ...@@ -184,15 +184,15 @@
</otherwise> </otherwise>
</choose> </choose>
from dts_footprint from dts_footprint
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
delete from dts_footprint delete from dts_footprint
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}
</delete> </delete>
<delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.DtsFootprintExample"> <delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.DtsFootprintExample">
<!-- <!--
...@@ -209,12 +209,12 @@ ...@@ -209,12 +209,12 @@
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into dts_footprint (user_id, goods_id, add_time, insert into dts_footprint (user_id, goods_id, add_time,
update_time, deleted) update_time, deleted)
values (#{userId,jdbcType=INTEGER}, #{goodsId,jdbcType=INTEGER}, #{addTime,jdbcType=TIMESTAMP}, values (#{userId,jdbcType=BIGINT}, #{goodsId,jdbcType=BIGINT}, #{addTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT}) #{updateTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT})
</insert> </insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.DtsFootprint"> <insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.DtsFootprint">
...@@ -222,7 +222,7 @@ ...@@ -222,7 +222,7 @@
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into dts_footprint insert into dts_footprint
...@@ -245,10 +245,10 @@ ...@@ -245,10 +245,10 @@
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null"> <if test="userId != null">
#{userId,jdbcType=INTEGER}, #{userId,jdbcType=BIGINT},
</if> </if>
<if test="goodsId != null"> <if test="goodsId != null">
#{goodsId,jdbcType=INTEGER}, #{goodsId,jdbcType=BIGINT},
</if> </if>
<if test="addTime != null"> <if test="addTime != null">
#{addTime,jdbcType=TIMESTAMP}, #{addTime,jdbcType=TIMESTAMP},
...@@ -279,13 +279,13 @@ ...@@ -279,13 +279,13 @@
update dts_footprint update dts_footprint
<set> <set>
<if test="record.id != null"> <if test="record.id != null">
id = #{record.id,jdbcType=INTEGER}, id = #{record.id,jdbcType=BIGINT},
</if> </if>
<if test="record.userId != null"> <if test="record.userId != null">
user_id = #{record.userId,jdbcType=INTEGER}, user_id = #{record.userId,jdbcType=BIGINT},
</if> </if>
<if test="record.goodsId != null"> <if test="record.goodsId != null">
goods_id = #{record.goodsId,jdbcType=INTEGER}, goods_id = #{record.goodsId,jdbcType=BIGINT},
</if> </if>
<if test="record.addTime != null"> <if test="record.addTime != null">
add_time = #{record.addTime,jdbcType=TIMESTAMP}, add_time = #{record.addTime,jdbcType=TIMESTAMP},
...@@ -307,9 +307,9 @@ ...@@ -307,9 +307,9 @@
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
update dts_footprint update dts_footprint
set id = #{record.id,jdbcType=INTEGER}, set id = #{record.id,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=INTEGER}, user_id = #{record.userId,jdbcType=BIGINT},
goods_id = #{record.goodsId,jdbcType=INTEGER}, goods_id = #{record.goodsId,jdbcType=BIGINT},
add_time = #{record.addTime,jdbcType=TIMESTAMP}, add_time = #{record.addTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, update_time = #{record.updateTime,jdbcType=TIMESTAMP},
deleted = #{record.deleted,jdbcType=BIT} deleted = #{record.deleted,jdbcType=BIT}
...@@ -325,10 +325,10 @@ ...@@ -325,10 +325,10 @@
update dts_footprint update dts_footprint
<set> <set>
<if test="userId != null"> <if test="userId != null">
user_id = #{userId,jdbcType=INTEGER}, user_id = #{userId,jdbcType=BIGINT},
</if> </if>
<if test="goodsId != null"> <if test="goodsId != null">
goods_id = #{goodsId,jdbcType=INTEGER}, goods_id = #{goodsId,jdbcType=BIGINT},
</if> </if>
<if test="addTime != null"> <if test="addTime != null">
add_time = #{addTime,jdbcType=TIMESTAMP}, add_time = #{addTime,jdbcType=TIMESTAMP},
...@@ -340,7 +340,7 @@ ...@@ -340,7 +340,7 @@
deleted = #{deleted,jdbcType=BIT}, deleted = #{deleted,jdbcType=BIT},
</if> </if>
</set> </set>
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.DtsFootprint"> <update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.DtsFootprint">
<!-- <!--
...@@ -348,12 +348,12 @@ ...@@ -348,12 +348,12 @@
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
update dts_footprint update dts_footprint
set user_id = #{userId,jdbcType=INTEGER}, set user_id = #{userId,jdbcType=BIGINT},
goods_id = #{goodsId,jdbcType=INTEGER}, goods_id = #{goodsId,jdbcType=BIGINT},
add_time = #{addTime,jdbcType=TIMESTAMP}, add_time = #{addTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
deleted = #{deleted,jdbcType=BIT} deleted = #{deleted,jdbcType=BIT}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}
</update> </update>
<select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.DtsFootprintExample" resultMap="BaseResultMap"> <select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.DtsFootprintExample" resultMap="BaseResultMap">
<!-- <!--
...@@ -409,13 +409,13 @@ ...@@ -409,13 +409,13 @@
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
</update> </update>
<update id="logicalDeleteByPrimaryKey" parameterType="java.lang.Integer"> <update id="logicalDeleteByPrimaryKey" parameterType="java.lang.Long">
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin @project https://github.com/itfsw/mybatis-generator-plugin
--> -->
update dts_footprint set deleted = 1 update dts_footprint set deleted = 1
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}
</update> </update>
</mapper> </mapper>
\ No newline at end of file
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
<id column="id" jdbcType="INTEGER" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="user_id" jdbcType="INTEGER" property="userId" /> <result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="keyword" jdbcType="VARCHAR" property="keyword" /> <result column="keyword" jdbcType="VARCHAR" property="keyword" />
<result column="from" jdbcType="VARCHAR" property="from" /> <result column="from" jdbcType="VARCHAR" property="from" />
<result column="add_time" jdbcType="TIMESTAMP" property="addTime" /> <result column="add_time" jdbcType="TIMESTAMP" property="addTime" />
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
order by ${example.orderByClause} order by ${example.orderByClause}
</if> </if>
</select> </select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from dts_search_history from dts_search_history
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}
</select> </select>
<select id="selectByPrimaryKeyWithLogicalDelete" parameterType="map" resultMap="BaseResultMap"> <select id="selectByPrimaryKeyWithLogicalDelete" parameterType="map" resultMap="BaseResultMap">
<!-- <!--
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from dts_search_history from dts_search_history
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}
and deleted = and deleted =
<choose> <choose>
<when test="andLogicalDeleted"> <when test="andLogicalDeleted">
...@@ -185,15 +185,15 @@ ...@@ -185,15 +185,15 @@
</otherwise> </otherwise>
</choose> </choose>
from dts_search_history from dts_search_history
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
delete from dts_search_history delete from dts_search_history
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}
</delete> </delete>
<delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.DtsSearchHistoryExample"> <delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.DtsSearchHistoryExample">
<!-- <!--
...@@ -210,13 +210,13 @@ ...@@ -210,13 +210,13 @@
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into dts_search_history (user_id, keyword, `from`, insert into dts_search_history (user_id, keyword, `from`,
add_time, update_time, deleted add_time, update_time, deleted
) )
values (#{userId,jdbcType=INTEGER}, #{keyword,jdbcType=VARCHAR}, #{from,jdbcType=VARCHAR}, values (#{userId,jdbcType=BIGINT}, #{keyword,jdbcType=VARCHAR}, #{from,jdbcType=VARCHAR},
#{addTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT} #{addTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT}
) )
</insert> </insert>
...@@ -225,7 +225,7 @@ ...@@ -225,7 +225,7 @@
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into dts_search_history insert into dts_search_history
...@@ -251,7 +251,7 @@ ...@@ -251,7 +251,7 @@
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null"> <if test="userId != null">
#{userId,jdbcType=INTEGER}, #{userId,jdbcType=BIGINT},
</if> </if>
<if test="keyword != null"> <if test="keyword != null">
#{keyword,jdbcType=VARCHAR}, #{keyword,jdbcType=VARCHAR},
...@@ -288,10 +288,10 @@ ...@@ -288,10 +288,10 @@
update dts_search_history update dts_search_history
<set> <set>
<if test="record.id != null"> <if test="record.id != null">
id = #{record.id,jdbcType=INTEGER}, id = #{record.id,jdbcType=BIGINT},
</if> </if>
<if test="record.userId != null"> <if test="record.userId != null">
user_id = #{record.userId,jdbcType=INTEGER}, user_id = #{record.userId,jdbcType=BIGINT},
</if> </if>
<if test="record.keyword != null"> <if test="record.keyword != null">
keyword = #{record.keyword,jdbcType=VARCHAR}, keyword = #{record.keyword,jdbcType=VARCHAR},
...@@ -319,8 +319,8 @@ ...@@ -319,8 +319,8 @@
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
update dts_search_history update dts_search_history
set id = #{record.id,jdbcType=INTEGER}, set id = #{record.id,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=INTEGER}, user_id = #{record.userId,jdbcType=BIGINT},
keyword = #{record.keyword,jdbcType=VARCHAR}, keyword = #{record.keyword,jdbcType=VARCHAR},
`from` = #{record.from,jdbcType=VARCHAR}, `from` = #{record.from,jdbcType=VARCHAR},
add_time = #{record.addTime,jdbcType=TIMESTAMP}, add_time = #{record.addTime,jdbcType=TIMESTAMP},
...@@ -338,7 +338,7 @@ ...@@ -338,7 +338,7 @@
update dts_search_history update dts_search_history
<set> <set>
<if test="userId != null"> <if test="userId != null">
user_id = #{userId,jdbcType=INTEGER}, user_id = #{userId,jdbcType=BIGINT},
</if> </if>
<if test="keyword != null"> <if test="keyword != null">
keyword = #{keyword,jdbcType=VARCHAR}, keyword = #{keyword,jdbcType=VARCHAR},
...@@ -356,7 +356,7 @@ ...@@ -356,7 +356,7 @@
deleted = #{deleted,jdbcType=BIT}, deleted = #{deleted,jdbcType=BIT},
</if> </if>
</set> </set>
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.DtsSearchHistory"> <update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.DtsSearchHistory">
<!-- <!--
...@@ -364,13 +364,13 @@ ...@@ -364,13 +364,13 @@
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
update dts_search_history update dts_search_history
set user_id = #{userId,jdbcType=INTEGER}, set user_id = #{userId,jdbcType=BIGINT},
keyword = #{keyword,jdbcType=VARCHAR}, keyword = #{keyword,jdbcType=VARCHAR},
`from` = #{from,jdbcType=VARCHAR}, `from` = #{from,jdbcType=VARCHAR},
add_time = #{addTime,jdbcType=TIMESTAMP}, add_time = #{addTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
deleted = #{deleted,jdbcType=BIT} deleted = #{deleted,jdbcType=BIT}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}
</update> </update>
<select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.DtsSearchHistoryExample" resultMap="BaseResultMap"> <select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.DtsSearchHistoryExample" resultMap="BaseResultMap">
<!-- <!--
...@@ -426,13 +426,13 @@ ...@@ -426,13 +426,13 @@
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
</update> </update>
<update id="logicalDeleteByPrimaryKey" parameterType="java.lang.Integer"> <update id="logicalDeleteByPrimaryKey" parameterType="java.lang.Long">
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin @project https://github.com/itfsw/mybatis-generator-plugin
--> -->
update dts_search_history set deleted = 1 update dts_search_history set deleted = 1
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}
</update> </update>
</mapper> </mapper>
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
<id column="id" jdbcType="INTEGER" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="username" jdbcType="VARCHAR" property="username" /> <result column="username" jdbcType="VARCHAR" property="username" />
<result column="password" jdbcType="VARCHAR" property="password" /> <result column="password" jdbcType="VARCHAR" property="password" />
<result column="gender" jdbcType="TINYINT" property="gender" /> <result column="gender" jdbcType="TINYINT" property="gender" />
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<result column="add_time" jdbcType="TIMESTAMP" property="addTime" /> <result column="add_time" jdbcType="TIMESTAMP" property="addTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="deleted" jdbcType="BIT" property="deleted" /> <result column="deleted" jdbcType="BIT" property="deleted" />
<result column="share_user_id" jdbcType="INTEGER" property="shareUserId" /> <result column="share_user_id" jdbcType="BIGINT" property="shareUserId" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<!-- <!--
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
order by ${example.orderByClause} order by ${example.orderByClause}
</if> </if>
</select> </select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from dts_user from dts_user
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}
</select> </select>
<select id="selectByPrimaryKeyWithLogicalDelete" parameterType="map" resultMap="BaseResultMap"> <select id="selectByPrimaryKeyWithLogicalDelete" parameterType="map" resultMap="BaseResultMap">
<!-- <!--
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from dts_user from dts_user
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}
and deleted = and deleted =
<choose> <choose>
<when test="andLogicalDeleted"> <when test="andLogicalDeleted">
...@@ -201,15 +201,15 @@ ...@@ -201,15 +201,15 @@
</otherwise> </otherwise>
</choose> </choose>
from dts_user from dts_user
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
delete from dts_user delete from dts_user
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}
</delete> </delete>
<delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.DtsUserExample"> <delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.DtsUserExample">
<!-- <!--
...@@ -226,7 +226,7 @@ ...@@ -226,7 +226,7 @@
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into dts_user (username, `password`, gender, insert into dts_user (username, `password`, gender,
...@@ -240,14 +240,14 @@ ...@@ -240,14 +240,14 @@
#{userLevel,jdbcType=TINYINT}, #{nickname,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, #{userLevel,jdbcType=TINYINT}, #{nickname,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR},
#{avatar,jdbcType=VARCHAR}, #{weixinOpenid,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT}, #{avatar,jdbcType=VARCHAR}, #{weixinOpenid,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT},
#{addTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT}, #{addTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT},
#{shareUserId,jdbcType=INTEGER}) #{shareUserId,jdbcType=BIGINT})
</insert> </insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.DtsUser"> <insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.DtsUser">
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into dts_user insert into dts_user
...@@ -348,7 +348,7 @@ ...@@ -348,7 +348,7 @@
#{deleted,jdbcType=BIT}, #{deleted,jdbcType=BIT},
</if> </if>
<if test="shareUserId != null"> <if test="shareUserId != null">
#{shareUserId,jdbcType=INTEGER}, #{shareUserId,jdbcType=BIGINT},
</if> </if>
</trim> </trim>
</insert> </insert>
...@@ -370,7 +370,7 @@ ...@@ -370,7 +370,7 @@
update dts_user update dts_user
<set> <set>
<if test="record.id != null"> <if test="record.id != null">
id = #{record.id,jdbcType=INTEGER}, id = #{record.id,jdbcType=BIGINT},
</if> </if>
<if test="record.username != null"> <if test="record.username != null">
username = #{record.username,jdbcType=VARCHAR}, username = #{record.username,jdbcType=VARCHAR},
...@@ -418,7 +418,7 @@ ...@@ -418,7 +418,7 @@
deleted = #{record.deleted,jdbcType=BIT}, deleted = #{record.deleted,jdbcType=BIT},
</if> </if>
<if test="record.shareUserId != null"> <if test="record.shareUserId != null">
share_user_id = #{record.shareUserId,jdbcType=INTEGER}, share_user_id = #{record.shareUserId,jdbcType=BIGINT},
</if> </if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
...@@ -431,7 +431,7 @@ ...@@ -431,7 +431,7 @@
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
update dts_user update dts_user
set id = #{record.id,jdbcType=INTEGER}, set id = #{record.id,jdbcType=BIGINT},
username = #{record.username,jdbcType=VARCHAR}, username = #{record.username,jdbcType=VARCHAR},
`password` = #{record.password,jdbcType=VARCHAR}, `password` = #{record.password,jdbcType=VARCHAR},
gender = #{record.gender,jdbcType=TINYINT}, gender = #{record.gender,jdbcType=TINYINT},
...@@ -447,7 +447,7 @@ ...@@ -447,7 +447,7 @@
add_time = #{record.addTime,jdbcType=TIMESTAMP}, add_time = #{record.addTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, update_time = #{record.updateTime,jdbcType=TIMESTAMP},
deleted = #{record.deleted,jdbcType=BIT}, deleted = #{record.deleted,jdbcType=BIT},
share_user_id = #{record.shareUserId,jdbcType=INTEGER} share_user_id = #{record.shareUserId,jdbcType=BIGINT}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
...@@ -505,10 +505,10 @@ ...@@ -505,10 +505,10 @@
deleted = #{deleted,jdbcType=BIT}, deleted = #{deleted,jdbcType=BIT},
</if> </if>
<if test="shareUserId != null"> <if test="shareUserId != null">
share_user_id = #{shareUserId,jdbcType=INTEGER}, share_user_id = #{shareUserId,jdbcType=BIGINT},
</if> </if>
</set> </set>
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.DtsUser"> <update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.DtsUser">
<!-- <!--
...@@ -531,8 +531,8 @@ ...@@ -531,8 +531,8 @@
add_time = #{addTime,jdbcType=TIMESTAMP}, add_time = #{addTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
deleted = #{deleted,jdbcType=BIT}, deleted = #{deleted,jdbcType=BIT},
share_user_id = #{shareUserId,jdbcType=INTEGER} share_user_id = #{shareUserId,jdbcType=BIGINT}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}
</update> </update>
<select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.DtsUserExample" resultMap="BaseResultMap"> <select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.DtsUserExample" resultMap="BaseResultMap">
<!-- <!--
...@@ -590,13 +590,13 @@ ...@@ -590,13 +590,13 @@
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
</update> </update>
<update id="logicalDeleteByPrimaryKey" parameterType="java.lang.Integer"> <update id="logicalDeleteByPrimaryKey" parameterType="java.lang.Long">
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin @project https://github.com/itfsw/mybatis-generator-plugin
--> -->
update dts_user set deleted = 1 update dts_user set deleted = 1
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}
</update> </update>
</mapper> </mapper>
\ No newline at end of file
...@@ -54,6 +54,18 @@ ...@@ -54,6 +54,18 @@
<artifactId>weixin-java-miniapp</artifactId> <artifactId>weixin-java-miniapp</artifactId>
</dependency> </dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.9.2</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
package com.wwdz.ch.wx.annotation.support; package com.wwdz.ch.wx.annotation.support;
import com.wwdz.ch.wx.service.UserTokenManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.MethodParameter; import org.springframework.core.MethodParameter;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.support.WebDataBinderFactory; import org.springframework.web.bind.support.WebDataBinderFactory;
import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.NativeWebRequest;
import org.springframework.web.method.support.HandlerMethodArgumentResolver; import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.method.support.ModelAndViewContainer; import org.springframework.web.method.support.ModelAndViewContainer;
import com.wwdz.ch.wx.annotation.LoginUser; import com.wwdz.ch.wx.annotation.LoginUser;
import com.wwdz.ch.wx.service.UserTokenManager;
@Component
public class LoginUserHandlerMethodArgumentResolver implements HandlerMethodArgumentResolver { public class LoginUserHandlerMethodArgumentResolver implements HandlerMethodArgumentResolver {
public static final String LOGIN_TOKEN_KEY = "X-Dts-Token"; public static final String LOGIN_TOKEN_KEY = "X-Dts-Token";
@Autowired
private UserTokenManager userTokenManager;
@Override @Override
public boolean supportsParameter(MethodParameter parameter) { public boolean supportsParameter(MethodParameter parameter) {
return parameter.getParameterType().isAssignableFrom(Integer.class) return parameter.getParameterType().isAssignableFrom(Long.class)
&& parameter.hasParameterAnnotation(LoginUser.class); && parameter.hasParameterAnnotation(LoginUser.class);
} }
...@@ -28,6 +34,6 @@ public class LoginUserHandlerMethodArgumentResolver implements HandlerMethodArgu ...@@ -28,6 +34,6 @@ public class LoginUserHandlerMethodArgumentResolver implements HandlerMethodArgu
return null; return null;
} }
return UserTokenManager.getUserId(token); return userTokenManager.getUserId(token);
} }
} }
package com.wwdz.ch.wx.config;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.type.TypeFactory;
import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.data.redis.serializer.SerializationException;
import com.alibaba.fastjson.parser.ParserConfig;
import org.springframework.util.Assert;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
/**
* FastJson2JsonRedisSerializer
* Redis使用FastJson序列化
* by zhengkai.blog.csdn.net
*/
public class FastJson2JsonRedisSerializer<T> implements RedisSerializer<T> {
private ObjectMapper objectMapper = new ObjectMapper();
public static final Charset DEFAULT_CHARSET = Charset.forName("UTF-8");
private Class<T> clazz;
static {
ParserConfig.getGlobalInstance().setAutoTypeSupport(true);
//如果遇到反序列化autoType is not support错误,请添加并修改一下包名到bean文件路径
// ParserConfig.getGlobalInstance().addAccept("com.xxxxx.xxx");
}
public FastJson2JsonRedisSerializer(Class<T> clazz) {
super();
this.clazz = clazz;
}
public byte[] serialize(T t) throws SerializationException {
if (t == null) {
return new byte[0];
}
return JSON.toJSONString(t, SerializerFeature.WriteClassName).getBytes(DEFAULT_CHARSET);
}
public T deserialize(byte[] bytes) throws SerializationException {
if (bytes == null || bytes.length <= 0) {
return null;
}
String str = new String(bytes, DEFAULT_CHARSET);
return JSON.parseObject(str, clazz);
}
public void setObjectMapper(ObjectMapper objectMapper) {
Assert.notNull(objectMapper, "'objectMapper' must not be null");
this.objectMapper = objectMapper;
}
protected JavaType getJavaType(Class<?> clazz) {
return TypeFactory.defaultInstance().constructType(clazz);
}
}
package com.wwdz.ch.wx.config;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.cache.annotation.CachingConfigurerSupport;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.StringRedisSerializer;
@Configuration
@EnableCaching
public class RedisConfig extends CachingConfigurerSupport
{
@Bean
@SuppressWarnings(value = { "unchecked", "rawtypes" })
public RedisTemplate<Object, Object> redisTemplate(RedisConnectionFactory connectionFactory)
{
RedisTemplate<Object, Object> template = new RedisTemplate<>();
template.setConnectionFactory(connectionFactory);
FastJson2JsonRedisSerializer serializer = new FastJson2JsonRedisSerializer(Object.class);
ObjectMapper mapper = new ObjectMapper();
mapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
mapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
serializer.setObjectMapper(mapper);
template.setValueSerializer(serializer);
// 使用StringRedisSerializer来序列化和反序列化redis的key值
template.setKeySerializer(new StringRedisSerializer());
template.afterPropertiesSet();
return template;
}
}
package com.wwdz.ch.wx.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import java.util.ArrayList;
@Configuration
@EnableSwagger2
public class SwaggerConfig {
@Bean
public Docket docket(Environment environment) {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo())
.select()
//指定包名 basePackage
.apis(RequestHandlerSelectors.basePackage("com.wwdz.ch.wx.web"))
//再次过滤(根据接口过滤)
.paths(PathSelectors.any())
.build();
}
private ApiInfo apiInfo() {
//contact 维护接口人信息
Contact contact = new Contact("xiaoyao", "", "");
return new ApiInfo(
//标题
"泉库小程序接口文档",
//描述
"增加注释,实时更新,在线测试",
//版本
"v1.0",
//服务条款网址
"urn:tos",
//维护人信息
contact,
//许可
"Apache 2.0",
//许可链接
"http://www.apache.org/licenses/LICENSE-2.0",
new ArrayList());
}
}
...@@ -3,14 +3,18 @@ package com.wwdz.ch.wx.config; ...@@ -3,14 +3,18 @@ package com.wwdz.ch.wx.config;
import java.util.List; import java.util.List;
import com.wwdz.ch.wx.annotation.support.LoginUserHandlerMethodArgumentResolver; import com.wwdz.ch.wx.annotation.support.LoginUserHandlerMethodArgumentResolver;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.web.method.support.HandlerMethodArgumentResolver; import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration @Configuration
public class WxWebMvcConfiguration implements WebMvcConfigurer { public class WxWebMvcConfiguration implements WebMvcConfigurer {
@Autowired
private LoginUserHandlerMethodArgumentResolver loginUserHandlerMethodArgumentResolver;
@Override @Override
public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) { public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
argumentResolvers.add(new LoginUserHandlerMethodArgumentResolver()); argumentResolvers.add(loginUserHandlerMethodArgumentResolver);
} }
} }
package com.wwdz.ch.wx.dao;
import com.google.common.collect.Lists;
import com.qiniu.util.StringUtils;
import com.wwdz.ch.core.util.TimeUtil;
import com.wwdz.ch.db.domain.BidRecord;
import com.wwdz.ch.db.domain.UgcCoin;
import com.wwdz.ch.db.domain.UgcCoinWithBLOBs;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.sql.Time;
import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.List;
@ApiModel(value = "UgcCoinVo", description = "用户钱币前端交互VO")
public class UgcCoinVo implements Serializable {
private static final long serialVersionUID = 7621695618641670201L;
@ApiModelProperty(value = "钱币id", name = "id")
private Long id;
@ApiModelProperty(value = "用户id", name = "uid")
private Long uid;
@ApiModelProperty(value = "钱币名称", name = "name")
private String name;
@ApiModelProperty(value = "标签", name = "tags")
private List<String> tags;
@ApiModelProperty(value = "价格", name = "price")
private Long price;
@ApiModelProperty(value = "购买时间", name="bidTime")
private Long bidTime;
@ApiModelProperty(value = "创建时间", name="created")
private Long created;
@ApiModelProperty(value = "更新时间", name="updated")
private Long updated;
@ApiModelProperty(value = "图片", name="images")
private List<String> images;
@ApiModelProperty(value = "详情", name="detail")
private String detail;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getUid() {
return uid;
}
public void setUid(Long uid) {
this.uid = uid;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public List<String> getTags() {
return tags;
}
public void setTags(List<String> tags) {
this.tags = tags;
}
public Long getPrice() {
return price;
}
public void setPrice(Long price) {
this.price = price;
}
public Long getBidTime() {
return bidTime;
}
public void setBidTime(Long bidTime) {
this.bidTime = bidTime;
}
public Long getCreated() {
return created;
}
public void setCreated(Long created) {
this.created = created;
}
public Long getUpdated() {
return updated;
}
public void setUpdated(Long updated) {
this.updated = updated;
}
public List<String> getImages() {
return images;
}
public void setImages(List<String> images) {
this.images = images;
}
public String getDetail() {
return detail;
}
public void setDetail(String detail) {
this.detail = detail;
}
public UgcCoinVo() {}
public UgcCoinVo(UgcCoinWithBLOBs coin) {
this.id = coin.getId();
this.bidTime = TimeUtil.localDateTimeToTimestamp(coin.getBidTime());
this.created = TimeUtil.localDateTimeToTimestamp(coin.getCreated());
this.updated = TimeUtil.localDateTimeToTimestamp(coin.getUpdated());
this.detail = coin.getDetail();
this.images = Arrays.asList(coin.getImages().split(";"));
this.price = coin.getPrice();
this.name = coin.getName();
this.tags = Arrays.asList(coin.getTags().split("|"));
}
public UgcCoinWithBLOBs toDO() {
UgcCoinWithBLOBs finalCoin = new UgcCoinWithBLOBs();
finalCoin.setId(this.id);
finalCoin.setDetail(this.detail);
finalCoin.setBidTime(TimeUtil.timestampToLocalDateTime(this.bidTime));
finalCoin.setImages(StringUtils.join(this.images, ";"));
finalCoin.setTags(StringUtils.join(this.tags, "|"));
finalCoin.setPrice(this.price);
finalCoin.setUid(this.uid);
finalCoin.setName(this.name);
finalCoin.setExtra("");
return finalCoin;
}
}
...@@ -12,7 +12,7 @@ public class UserInfo implements Serializable { ...@@ -12,7 +12,7 @@ public class UserInfo implements Serializable {
private static final long serialVersionUID = -5813029516433359765L; private static final long serialVersionUID = -5813029516433359765L;
private Integer userId; private Long userId;
private String nickName; private String nickName;
private String avatarUrl; private String avatarUrl;
private String country; private String country;
...@@ -83,11 +83,11 @@ public class UserInfo implements Serializable { ...@@ -83,11 +83,11 @@ public class UserInfo implements Serializable {
this.avatarUrl = avatarUrl; this.avatarUrl = avatarUrl;
} }
public Integer getUserId() { public Long getUserId() {
return userId; return userId;
} }
public void setUserId(Integer userId) { public void setUserId(Long userId) {
this.userId = userId; this.userId = userId;
} }
......
...@@ -3,7 +3,7 @@ package com.wwdz.ch.wx.dao; ...@@ -3,7 +3,7 @@ package com.wwdz.ch.wx.dao;
import java.time.LocalDateTime; import java.time.LocalDateTime;
public class UserToken { public class UserToken {
private Integer userId; private Long userId;
private String token; private String token;
private String sessionKey; private String sessionKey;
private LocalDateTime expireTime; private LocalDateTime expireTime;
...@@ -17,11 +17,11 @@ public class UserToken { ...@@ -17,11 +17,11 @@ public class UserToken {
this.sessionKey = sessionKey; this.sessionKey = sessionKey;
} }
public Integer getUserId() { public Long getUserId() {
return userId; return userId;
} }
public void setUserId(Integer userId) { public void setUserId(Long userId) {
this.userId = userId; this.userId = userId;
} }
......
...@@ -8,7 +8,7 @@ public class WxLoginInfo implements Serializable { ...@@ -8,7 +8,7 @@ public class WxLoginInfo implements Serializable {
private String code; private String code;
private UserInfo userInfo; private UserInfo userInfo;
private Integer shareUserId; private Long shareUserId;
public String getCode() { public String getCode() {
return code; return code;
...@@ -26,11 +26,11 @@ public class WxLoginInfo implements Serializable { ...@@ -26,11 +26,11 @@ public class WxLoginInfo implements Serializable {
this.userInfo = userInfo; this.userInfo = userInfo;
} }
public Integer getShareUserId() { public Long getShareUserId() {
return shareUserId; return shareUserId;
} }
public void setShareUserId(Integer shareUserId) { public void setShareUserId(Long shareUserId) {
this.shareUserId = shareUserId; this.shareUserId = shareUserId;
} }
} }
...@@ -13,7 +13,7 @@ public class UserInfoService { ...@@ -13,7 +13,7 @@ public class UserInfoService {
@Autowired @Autowired
private DtsUserService userService; private DtsUserService userService;
public UserInfo getInfo(Integer userId) { public UserInfo getInfo(Long userId) {
DtsUser user = userService.findById(userId); DtsUser user = userService.findById(userId);
Assert.state(user != null, "用户不存在"); Assert.state(user != null, "用户不存在");
UserInfo userInfo = new UserInfo(); UserInfo userInfo = new UserInfo();
......
package com.wwdz.ch.wx.service; package com.wwdz.ch.wx.service;
import com.google.gson.Gson;
import com.wwdz.ch.core.util.CharUtil;
import com.wwdz.ch.wx.dao.UserToken;
import com.wwdz.ch.wx.util.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import com.wwdz.ch.core.util.CharUtil;
import com.wwdz.ch.wx.dao.UserToken;
/** /**
* 维护用户token * 维护用户token
*/ */
@Component
public class UserTokenManager { public class UserTokenManager {
@Autowired
private RedisUtil redisUtil;
private Gson gson = new Gson();
private static final String TOKEN_PREFIX = "token_prefix:";
private static final String TOKEN_ID_PREFIX = "token_id_prefix:";
private static Map<String, UserToken> tokenMap = new HashMap<>(); private static Map<String, UserToken> tokenMap = new HashMap<>();
private static Map<Integer, UserToken> idMap = new HashMap<>(); private static Map<Long, UserToken> idMap = new HashMap<>();
public static Integer getUserId(String token) { public Long getUserId(String token) {
UserToken userToken = tokenMap.get(token); String key = TOKEN_PREFIX + token;
if (userToken == null) { Object tokenObj = redisUtil.get(key);
if (null == tokenObj) {
return null; return null;
} }
UserToken userToken = gson.fromJson(tokenObj.toString(), UserToken.class);
if (userToken.getExpireTime().isBefore(LocalDateTime.now())) { if (userToken.getExpireTime().isBefore(LocalDateTime.now())) {
tokenMap.remove(token); redisUtil.del(key);
idMap.remove(userToken.getUserId()); String idKey = TOKEN_ID_PREFIX + userToken.getUserId();
redisUtil.del(idKey);
return null; return null;
} }
return userToken.getUserId(); return userToken.getUserId();
} }
public static UserToken generateToken(Integer id) { public UserToken generateToken(Long id) {
UserToken userToken = null; UserToken userToken = null;
// userToken = idMap.get(id); // userToken = idMap.get(id);
...@@ -39,8 +56,10 @@ public class UserTokenManager { ...@@ -39,8 +56,10 @@ public class UserTokenManager {
// } // }
String token = CharUtil.getRandomString(32); String token = CharUtil.getRandomString(32);
while (tokenMap.containsKey(token)) { String key = TOKEN_PREFIX + token;
while (null != redisUtil.get(key)) {
token = CharUtil.getRandomString(32); token = CharUtil.getRandomString(32);
key = TOKEN_PREFIX + token;
} }
LocalDateTime update = LocalDateTime.now(); LocalDateTime update = LocalDateTime.now();
...@@ -51,18 +70,20 @@ public class UserTokenManager { ...@@ -51,18 +70,20 @@ public class UserTokenManager {
userToken.setUpdateTime(update); userToken.setUpdateTime(update);
userToken.setExpireTime(expire); userToken.setExpireTime(expire);
userToken.setUserId(id); userToken.setUserId(id);
tokenMap.put(token, userToken); String data = gson.toJson(userToken);
idMap.put(id, userToken); redisUtil.set(key, data);
String idKey = TOKEN_ID_PREFIX + id;
redisUtil.set(idKey, data);
return userToken; return userToken;
} }
public static String getSessionKey(Integer userId) { public String getSessionKey(Long userId) {
UserToken userToken = idMap.get(userId); String idKey = TOKEN_ID_PREFIX + userId;
if (userToken == null) { Object data = redisUtil.get(idKey);
if (null == data) {
return null; return null;
} }
UserToken userToken = gson.fromJson(data.toString(), UserToken.class);
if (userToken.getExpireTime().isBefore(LocalDateTime.now())) { if (userToken.getExpireTime().isBefore(LocalDateTime.now())) {
tokenMap.remove(userToken.getToken()); tokenMap.remove(userToken.getToken());
idMap.remove(userId); idMap.remove(userId);
...@@ -72,10 +93,15 @@ public class UserTokenManager { ...@@ -72,10 +93,15 @@ public class UserTokenManager {
return userToken.getSessionKey(); return userToken.getSessionKey();
} }
public static void removeToken(Integer userId) { public void removeToken(Long userId) {
UserToken userToken = idMap.get(userId); String idKey = TOKEN_ID_PREFIX + userId;
String token = userToken.getToken(); Object data = redisUtil.get(idKey);
idMap.remove(userId); if (null != data) {
tokenMap.remove(token); UserToken userToken = gson.fromJson(data.toString(), UserToken.class);
String token = userToken.getToken();
String key = TOKEN_PREFIX + token;
redisUtil.del(key);
redisUtil.del(idKey);
}
} }
} }
This diff is collapsed.
package com.wwdz.ch.wx.web;
import com.alibaba.druid.support.json.JSONUtils;
import com.mysql.jdbc.StringUtils;
import com.wwdz.ch.core.type.ListResult;
import com.wwdz.ch.core.type.SimpleResult;
import com.wwdz.ch.core.util.PriceUtil;
import com.wwdz.ch.core.util.ResponseUtil;
import com.wwdz.ch.db.domain.*;
import com.wwdz.ch.db.service.BidRecordService;
import com.wwdz.ch.db.service.UgcCoinService;
import com.wwdz.ch.wx.annotation.LoginUser;
import com.wwdz.ch.wx.dao.UgcCoinVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@RestController
@RequestMapping("/wx/ugc_coin")
@Validated
@Api
public class UgcCoinController {
private static final Logger logger = LoggerFactory.getLogger(UgcCoinController.class);
@Autowired
private UgcCoinService ugcCoinService;
// @RequiresPermissions("admin:category:list")
// @RequiresPermissionsDesc(menu = { "商场管理", "成交记录管理" }, button = "查询")
@GetMapping("/list")
@ApiOperation(value = "钱币列表")
public ListResult<UgcCoinVo> list(@LoginUser Long userId, @ApiParam("page") @RequestParam(defaultValue = "1") Integer page,
@ApiParam("size") @RequestParam(defaultValue = "10") Integer size) {
List<UgcCoinWithBLOBs> coins = ugcCoinService.queryByUserId(userId, page, size);
List<UgcCoinVo> data = coins.parallelStream().map(a -> new UgcCoinVo(a)).collect(Collectors.toList());
Long total = ugcCoinService.countByUserId(userId);
return new ListResult<>(data, total.intValue());
}
/**
* 商品详情
* <p>
* 用户可以不登录。 如果用户登录,则记录用户足迹以及返回用户收藏信息。
*
* @param userId
* 用户ID
* @param id
* 商品ID
* @return 商品详情
*/
@SuppressWarnings("rawtypes")
@GetMapping("detail")
@ApiOperation(value = "钱币详情")
public SimpleResult<UgcCoinVo> detail(@LoginUser Long userId, @NotNull Long id) {
logger.info("【请求开始】钱币详情,请求参数,userId:{},id:{}", userId, id);
// 商品信息
UgcCoinWithBLOBs rawCoin = ugcCoinService.getById(id);
if (null == rawCoin) {
return new SimpleResult<>("钱币不存在",null);
}
return new SimpleResult<>(new UgcCoinVo(rawCoin));
}
@PostMapping("/add")
@ApiOperation(value = "添加钱币")
public SimpleResult<Boolean> add(@LoginUser Long userId, @ApiParam("钱币数据") @RequestBody UgcCoinVo coin) {
coin.setUid(userId);
UgcCoinWithBLOBs cb = coin.toDO();
cb.setIsDeleted(false);
ugcCoinService.add(cb);
return new SimpleResult<>(true);
}
@PostMapping("/update")
@ApiOperation(value = "更新钱币")
public SimpleResult<Boolean> update(@LoginUser Long userId, @ApiParam("钱币数据") @RequestBody UgcCoinVo coin) {
coin.setUid(userId);
UgcCoinWithBLOBs cb = coin.toDO();
cb.setIsDeleted(false);
ugcCoinService.updateById(cb);
return new SimpleResult<>(true);
}
@GetMapping("/delete")
@ApiOperation(value = "删除钱币")
public SimpleResult<Boolean> delete(@ApiParam("钱币ID") @NotNull Long id) {
ugcCoinService.deleteById(id);
return new SimpleResult<>(true);
}
}
...@@ -64,6 +64,9 @@ public class WxAuthController { ...@@ -64,6 +64,9 @@ public class WxAuthController {
@Autowired @Autowired
private NotifyService notifyService; private NotifyService notifyService;
@Autowired
private UserTokenManager userTokenManager;
/** /**
* 账号登录 * 账号登录
...@@ -122,7 +125,7 @@ public class WxAuthController { ...@@ -122,7 +125,7 @@ public class WxAuthController {
// token // token
UserToken userToken = null; UserToken userToken = null;
try { try {
userToken = UserTokenManager.generateToken(user.getId()); userToken = userTokenManager.generateToken(user.getId());
} catch (Exception e) { } catch (Exception e) {
logger.error("账户登录失败,生成token失败:{}", user.getId()); logger.error("账户登录失败,生成token失败:{}", user.getId());
e.printStackTrace(); e.printStackTrace();
...@@ -157,7 +160,7 @@ public class WxAuthController { ...@@ -157,7 +160,7 @@ public class WxAuthController {
return ResponseUtil.badArgument(); return ResponseUtil.badArgument();
} }
Integer shareUserId = wxLoginInfo.getShareUserId(); Long shareUserId = wxLoginInfo.getShareUserId();
String sessionKey = null; String sessionKey = null;
String openId = null; String openId = null;
try { try {
...@@ -202,7 +205,7 @@ public class WxAuthController { ...@@ -202,7 +205,7 @@ public class WxAuthController {
// token // token
UserToken userToken = null; UserToken userToken = null;
try { try {
userToken = UserTokenManager.generateToken(user.getId()); userToken = userTokenManager.generateToken(user.getId());
} catch (Exception e) { } catch (Exception e) {
logger.error("微信登录失败,生成token失败:{}", user.getId()); logger.error("微信登录失败,生成token失败:{}", user.getId());
e.printStackTrace(); e.printStackTrace();
...@@ -369,7 +372,7 @@ public class WxAuthController { ...@@ -369,7 +372,7 @@ public class WxAuthController {
// token // token
UserToken userToken = null; UserToken userToken = null;
try { try {
userToken = UserTokenManager.generateToken(user.getId()); userToken = userTokenManager.generateToken(user.getId());
} catch (Exception e) { } catch (Exception e) {
logger.error("账号注册失败,生成token失败:{}", user.getId()); logger.error("账号注册失败,生成token失败:{}", user.getId());
e.printStackTrace(); e.printStackTrace();
...@@ -448,10 +451,10 @@ public class WxAuthController { ...@@ -448,10 +451,10 @@ public class WxAuthController {
* @return * @return
*/ */
@PostMapping("bindPhone") @PostMapping("bindPhone")
public Object bindPhone(@LoginUser Integer userId, @RequestBody String body) { public Object bindPhone(@LoginUser Long userId, @RequestBody String body) {
logger.info("【请求开始】绑定手机号码,请求参数,body:{}", body); logger.info("【请求开始】绑定手机号码,请求参数,body:{}", body);
String sessionKey = UserTokenManager.getSessionKey(userId); String sessionKey = userTokenManager.getSessionKey(userId);
String encryptedData = JacksonUtil.parseString(body, "encryptedData"); String encryptedData = JacksonUtil.parseString(body, "encryptedData");
String iv = JacksonUtil.parseString(body, "iv"); String iv = JacksonUtil.parseString(body, "iv");
WxMaPhoneNumberInfo phoneNumberInfo = null; WxMaPhoneNumberInfo phoneNumberInfo = null;
...@@ -483,13 +486,13 @@ public class WxAuthController { ...@@ -483,13 +486,13 @@ public class WxAuthController {
* @return * @return
*/ */
@PostMapping("logout") @PostMapping("logout")
public Object logout(@LoginUser Integer userId) { public Object logout(@LoginUser Long userId) {
logger.info("【请求开始】注销登录,请求参数,userId:{}", userId); logger.info("【请求开始】注销登录,请求参数,userId:{}", userId);
if (userId == null) { if (userId == null) {
return ResponseUtil.unlogin(); return ResponseUtil.unlogin();
} }
try { try {
UserTokenManager.removeToken(userId); userTokenManager.removeToken(userId);
} catch (Exception e) { } catch (Exception e) {
logger.error("注销登录出错:userId:{}", userId); logger.error("注销登录出错:userId:{}", userId);
e.printStackTrace(); e.printStackTrace();
......
...@@ -57,7 +57,7 @@ public class WxCollectController { ...@@ -57,7 +57,7 @@ public class WxCollectController {
* @return 用户收藏列表 * @return 用户收藏列表
*/ */
@GetMapping("list") @GetMapping("list")
public Object list(@LoginUser Integer userId, @NotNull Byte type, @RequestParam(defaultValue = "1") Integer page, public Object list(@LoginUser Long userId, @NotNull Byte type, @RequestParam(defaultValue = "1") Integer page,
@RequestParam(defaultValue = "10") Integer size) { @RequestParam(defaultValue = "10") Integer size) {
logger.info("【请求开始】用户收藏列表查询,请求参数,userId:{}", userId); logger.info("【请求开始】用户收藏列表查询,请求参数,userId:{}", userId);
if (userId == null) { if (userId == null) {
...@@ -104,7 +104,7 @@ public class WxCollectController { ...@@ -104,7 +104,7 @@ public class WxCollectController {
* @return 操作结果 * @return 操作结果
*/ */
@PostMapping("addordelete") @PostMapping("addordelete")
public Object addordelete(@LoginUser Integer userId, @RequestBody String body) { public Object addordelete(@LoginUser Long userId, @RequestBody String body) {
logger.info("【请求开始】用户收藏添加或删除,请求参数,userId:{},body:{}", userId, body); logger.info("【请求开始】用户收藏添加或删除,请求参数,userId:{},body:{}", userId, body);
if (userId == null) { if (userId == null) {
...@@ -113,7 +113,7 @@ public class WxCollectController { ...@@ -113,7 +113,7 @@ public class WxCollectController {
} }
Byte type = JacksonUtil.parseByte(body, "type"); Byte type = JacksonUtil.parseByte(body, "type");
Integer valueId = JacksonUtil.parseInteger(body, "valueId"); Long valueId = JacksonUtil.parseLong(body, "valueId");
if (!ObjectUtils.allNotNull(type, valueId)) { if (!ObjectUtils.allNotNull(type, valueId)) {
return ResponseUtil.badArgument(); return ResponseUtil.badArgument();
} }
......
...@@ -50,7 +50,7 @@ public class WxFeedbackController { ...@@ -50,7 +50,7 @@ public class WxFeedbackController {
Boolean hasPicture = feedback.getHasPicture(); Boolean hasPicture = feedback.getHasPicture();
if (hasPicture == null || !hasPicture) { if (hasPicture == null || !hasPicture) {
feedback.setPicUrls(new String[0]); feedback.setPicUrls("");
} }
// 测试手机号码是否正确 // 测试手机号码是否正确
...@@ -74,7 +74,7 @@ public class WxFeedbackController { ...@@ -74,7 +74,7 @@ public class WxFeedbackController {
* @return 操作结果 * @return 操作结果
*/ */
@PostMapping("submit") @PostMapping("submit")
public Object submit(@LoginUser Integer userId, @RequestBody DtsFeedback feedback) { public Object submit(@LoginUser Long userId, @RequestBody DtsFeedback feedback) {
logger.info("【请求开始】添加意见反馈,请求参数,userId:{},size:{}", userId, JSONObject.toJSONString(feedback)); logger.info("【请求开始】添加意见反馈,请求参数,userId:{},size:{}", userId, JSONObject.toJSONString(feedback));
if (userId == null) { if (userId == null) {
......
...@@ -51,7 +51,7 @@ public class WxFootprintController { ...@@ -51,7 +51,7 @@ public class WxFootprintController {
* @return 删除操作结果 * @return 删除操作结果
*/ */
@PostMapping("delete") @PostMapping("delete")
public Object delete(@LoginUser Integer userId, @RequestBody String body) { public Object delete(@LoginUser Long userId, @RequestBody String body) {
logger.info("【请求开始】删除用户足迹,请求参数,userId:{},body:{}", userId, body); logger.info("【请求开始】删除用户足迹,请求参数,userId:{},body:{}", userId, body);
if (userId == null) { if (userId == null) {
...@@ -62,7 +62,7 @@ public class WxFootprintController { ...@@ -62,7 +62,7 @@ public class WxFootprintController {
return ResponseUtil.badArgument(); return ResponseUtil.badArgument();
} }
Integer footprintId = JacksonUtil.parseInteger(body, "id"); Long footprintId = JacksonUtil.parseLong(body, "id");
if (footprintId == null) { if (footprintId == null) {
return ResponseUtil.badArgument(); return ResponseUtil.badArgument();
} }
...@@ -91,7 +91,7 @@ public class WxFootprintController { ...@@ -91,7 +91,7 @@ public class WxFootprintController {
* @return 用户足迹列表 * @return 用户足迹列表
*/ */
@GetMapping("list") @GetMapping("list")
public Object list(@LoginUser Integer userId, @RequestParam(defaultValue = "1") Integer page, public Object list(@LoginUser Long userId, @RequestParam(defaultValue = "1") Integer page,
@RequestParam(defaultValue = "10") Integer size) { @RequestParam(defaultValue = "10") Integer size) {
logger.info("【请求开始】用户足迹列表查询,请求参数,userId:{}", userId); logger.info("【请求开始】用户足迹列表查询,请求参数,userId:{}", userId);
......
...@@ -74,6 +74,7 @@ public class WxGoodsController { ...@@ -74,6 +74,7 @@ public class WxGoodsController {
private DtsGoodsSpecificationService goodsSpecificationService; private DtsGoodsSpecificationService goodsSpecificationService;
private final static ArrayBlockingQueue<Runnable> WORK_QUEUE = new ArrayBlockingQueue<>(9); private final static ArrayBlockingQueue<Runnable> WORK_QUEUE = new ArrayBlockingQueue<>(9);
private final static RejectedExecutionHandler HANDLER = new ThreadPoolExecutor.CallerRunsPolicy(); private final static RejectedExecutionHandler HANDLER = new ThreadPoolExecutor.CallerRunsPolicy();
...@@ -94,17 +95,16 @@ public class WxGoodsController { ...@@ -94,17 +95,16 @@ public class WxGoodsController {
*/ */
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
@GetMapping("detail") @GetMapping("detail")
public Object detail(@LoginUser Integer userId, @NotNull Long id) { public Object detail(@LoginUser Long userId, @NotNull Long id) {
logger.info("【请求开始】商品详情,请求参数,userId:{},id:{}", userId, id); logger.info("【请求开始】商品详情,请求参数,userId:{},id:{}", userId, id);
// 商品信息 // 商品信息
Item item = itemService.findById(id); Item item = itemService.findById(id);
// 用户收藏 // 用户收藏
int userHasCollect = 0; int userHasCollect = 0;
if (userId != null) { if (userId != null) {
userHasCollect = collectService.count(userId, id.intValue()); userHasCollect = collectService.count(userId, id);
} }
// 记录用户的足迹 异步处理 // 记录用户的足迹 异步处理
...@@ -112,7 +112,7 @@ public class WxGoodsController { ...@@ -112,7 +112,7 @@ public class WxGoodsController {
executorService.execute(() -> { executorService.execute(() -> {
DtsFootprint footprint = new DtsFootprint(); DtsFootprint footprint = new DtsFootprint();
footprint.setUserId(userId); footprint.setUserId(userId);
footprint.setGoodsId(id.intValue()); footprint.setGoodsId(id);
footprintService.add(footprint); footprintService.add(footprint);
short num = 1; short num = 1;
productService.addBrowse(id.intValue(), num);// 新增商品点击量 productService.addBrowse(id.intValue(), num);// 新增商品点击量
...@@ -227,7 +227,7 @@ public class WxGoodsController { ...@@ -227,7 +227,7 @@ public class WxGoodsController {
*/ */
@GetMapping("list") @GetMapping("list")
public Object list(Integer categoryId, String keyword, public Object list(Integer categoryId, String keyword,
@LoginUser Integer userId, @RequestParam(defaultValue = "1") Integer page, @LoginUser Long userId, @RequestParam(defaultValue = "1") Integer page,
@RequestParam(defaultValue = "10") Integer size, @RequestParam(defaultValue = "10") Integer size,
@Sort(accepts = { "sort","bid_time", "price","name"}) @RequestParam(defaultValue = "sort") String sort, @Sort(accepts = { "sort","bid_time", "price","name"}) @RequestParam(defaultValue = "sort") String sort,
@Order @RequestParam(defaultValue = "asc") String order) { @Order @RequestParam(defaultValue = "asc") String order) {
...@@ -315,6 +315,8 @@ public class WxGoodsController { ...@@ -315,6 +315,8 @@ public class WxGoodsController {
} }
public class ItemVo implements Serializable { public class ItemVo implements Serializable {
private static final long serialVersionUID = 549032631978075796L;
/** /**
* 商品ID * 商品ID
*/ */
......
...@@ -77,7 +77,7 @@ public class WxHomeController { ...@@ -77,7 +77,7 @@ public class WxHomeController {
*/ */
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
@GetMapping("/index") @GetMapping("/index")
public Object index(@LoginUser Integer userId) { public Object index(@LoginUser Long userId) {
logger.info("【请求开始】访问首页,请求参数,userId:{}", userId); logger.info("【请求开始】访问首页,请求参数,userId:{}", userId);
Map<String, Object> data = new HashMap<String, Object>(); Map<String, Object> data = new HashMap<String, Object>();
......
...@@ -51,7 +51,7 @@ public class WxSearchController { ...@@ -51,7 +51,7 @@ public class WxSearchController {
* @return 搜索页面信息 * @return 搜索页面信息
*/ */
@GetMapping("index") @GetMapping("index")
public Object index(@LoginUser Integer userId) { public Object index(@LoginUser Long userId) {
logger.info("【请求开始】搜索页面信息展示,请求参数,userId:{}", userId); logger.info("【请求开始】搜索页面信息展示,请求参数,userId:{}", userId);
// 取出输入框默认的关键词 // 取出输入框默认的关键词
...@@ -110,7 +110,7 @@ public class WxSearchController { ...@@ -110,7 +110,7 @@ public class WxSearchController {
* @return 清理是否成功 * @return 清理是否成功
*/ */
@PostMapping("clearhistory") @PostMapping("clearhistory")
public Object clearhistory(@LoginUser Integer userId) { public Object clearhistory(@LoginUser Long userId) {
logger.info("【请求开始】清除用户搜索历史,请求参数,userId:{}", userId); logger.info("【请求开始】清除用户搜索历史,请求参数,userId:{}", userId);
if (userId == null) { if (userId == null) {
......
package com.wwdz.ch.wx.web; package com.wwdz.ch.wx.web;
import java.io.IOException; import java.io.IOException;
import java.util.HashMap; import java.io.InputStream;
import java.util.Map; import java.util.*;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -33,6 +38,7 @@ import com.wwdz.ch.db.service.DtsStorageService; ...@@ -33,6 +38,7 @@ import com.wwdz.ch.db.service.DtsStorageService;
@RestController @RestController
@RequestMapping("/wx/storage") @RequestMapping("/wx/storage")
@Validated @Validated
@Api
public class WxStorageController { public class WxStorageController {
private static final Logger logger = LoggerFactory.getLogger(WxStorageController.class); private static final Logger logger = LoggerFactory.getLogger(WxStorageController.class);
...@@ -42,6 +48,8 @@ public class WxStorageController { ...@@ -42,6 +48,8 @@ public class WxStorageController {
@Autowired @Autowired
private DtsStorageService DtsStorageService; private DtsStorageService DtsStorageService;
private ExecutorService threadPool = Executors.newFixedThreadPool(20);
@SuppressWarnings("unused") @SuppressWarnings("unused")
private String generateKey(String originalFilename) { private String generateKey(String originalFilename) {
int index = originalFilename.lastIndexOf('.'); int index = originalFilename.lastIndexOf('.');
...@@ -66,6 +74,7 @@ public class WxStorageController { ...@@ -66,6 +74,7 @@ public class WxStorageController {
* @throws IOException * @throws IOException
*/ */
@PostMapping("/upload") @PostMapping("/upload")
@ApiOperation("上传文件")
public Object upload(@RequestParam("file") MultipartFile file) throws IOException { public Object upload(@RequestParam("file") MultipartFile file) throws IOException {
logger.info("【请求开始】上传文件,请求参数,file:{}", file.getOriginalFilename()); logger.info("【请求开始】上传文件,请求参数,file:{}", file.getOriginalFilename());
...@@ -80,6 +89,45 @@ public class WxStorageController { ...@@ -80,6 +89,45 @@ public class WxStorageController {
return ResponseUtil.ok(data); return ResponseUtil.ok(data);
} }
/**
* 批量上传文件
*
* @param files
* @return
* @throws IOException
*/
@PostMapping("/uploadMulti")
@ApiOperation("批量上传文件")
public Object uploadMulti(@RequestParam("files") MultipartFile[] files) throws IOException {
logger.info("【请求开始】上传文件,请求参数,files:{}", files.length);
CountDownLatch latch = new CountDownLatch(files.length);
Map<Integer, String> resultMap = Collections.synchronizedMap(new HashMap<>());
Integer count = 0;
for (MultipartFile file : files) {
this.threadPool.submit(new UploadRunnable(this.storageService, file.getInputStream(),file.getSize(), file.getContentType(), file.getOriginalFilename(), latch, resultMap, count));
count++;
}
try {
latch.wait(3000);
} catch (InterruptedException e) {
logger.error("upload images failed, {}", e);
return ResponseUtil.fail(998, "批量上传图片失败");
}
List<String> images = new ArrayList<>();
for (int i = 0; i< files.length; i++) {
String url = resultMap.get(i);
if (null == url) {
return ResponseUtil.fail(998, "批量上传图片失败");
}
images.add(url);
}
Map<String, Object> data = new HashMap<>();
data.put("urls", images);
logger.info("【请求结束】上传文件,响应结果:{}", JSONObject.toJSONString(data));
return ResponseUtil.ok(data);
}
/** /**
* 访问存储对象 * 访问存储对象
* *
...@@ -140,4 +188,36 @@ public class WxStorageController { ...@@ -140,4 +188,36 @@ public class WxStorageController {
.body(file); .body(file);
} }
private static class UploadRunnable implements Runnable {
private final String fileName;
private final InputStream inputStream;
private final long contentLength;
private final String contentType;
private CountDownLatch latch;
private StorageService storageService;
private Map<Integer, String> resultMap;
private Integer sort;
public UploadRunnable(StorageService storageService, InputStream inputStream, long contentLength, String contentType, String fileName, CountDownLatch latch, Map<Integer, String> resultMap, Integer sort) {
this.storageService = storageService;
this.fileName = fileName;
this.inputStream = inputStream;
this.contentLength = contentLength;
this.contentType = contentType;
this.latch = latch;
this.resultMap = resultMap;
this.sort = sort;
}
@Override
public void run() {
}
}
} }
package com.wwdz.ch.wx.web;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
import com.wwdz.ch.core.util.ResponseUtil;
import com.wwdz.ch.db.domain.DtsUserAccount;
import com.wwdz.ch.db.service.DtsAccountService;
import com.wwdz.ch.db.service.DtsUserService;
import com.wwdz.ch.wx.annotation.LoginUser;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSONObject;
/**
* 用户服务
*/
@RestController
@RequestMapping("/wx/user")
@Validated
public class WxUserController {
private static final Logger logger = LoggerFactory.getLogger(WxUserController.class);
@Autowired
private DtsAccountService accountService;
@Autowired
private DtsUserService userService;
/**
* 用户个人页面数据
* <p>
* @param userId
* 用户ID
* @return 用户个人页面数据
*/
@GetMapping("index")
public Object list(@LoginUser Long userId) {
logger.info("【请求开始】用户个人页面数据,请求参数,userId:{}", userId);
if (userId == null) {
logger.error("用户个人页面数据查询失败:用户未登录!!!");
return ResponseUtil.unlogin();
}
Map<Object, Object> data = new HashMap<Object, Object>();
logger.info("【请求结束】用户个人页面数据,响应结果:{}", JSONObject.toJSONString(data));
return ResponseUtil.ok(data);
}
/**
* 获取用户
* <p>
* @param userId
* 用户ID
* @return 用户个人页面数据
*/
@GetMapping("getSharedUrl")
public Object getSharedUrl(@LoginUser Integer userId) {
logger.info("【请求开始】获取用户推广二维码图片URL,请求参数,userId:{}", userId);
Map<String, Object> data = new HashMap<>();
data.put("userSharedUrl", "");//默认设置没有
if (userId == null) {
logger.error("获取用户推广二维码图片URL:用户未登录!!!");
} else {
DtsUserAccount userAccount = accountService.findShareUserAccountByUserId(userId);
//如果没申请,数据则不存在,存在数据且审批通过则会形成推广二维码
if (userAccount != null && StringUtils.isNotBlank(userAccount.getShareUrl())) {
data.put("userSharedUrl", userAccount.getShareUrl());
}
}
logger.info("【请求结束】获取用户推广二维码图片URL,响应结果:{}", JSONObject.toJSONString(data));
return ResponseUtil.ok(data);
}
}
...@@ -40,7 +40,7 @@ public class WxUserFormId { ...@@ -40,7 +40,7 @@ public class WxUserFormId {
* @return * @return
*/ */
@GetMapping("create") @GetMapping("create")
public Object create(@LoginUser Integer userId, @NotNull String formId) { public Object create(@LoginUser Long userId, @NotNull String formId) {
logger.info("【请求开始】创建微信访问fromID,请求参数,userId:{}", userId); logger.info("【请求开始】创建微信访问fromID,请求参数,userId:{}", userId);
if (userId == null) { if (userId == null) {
......
spring: spring:
profiles: profiles:
active: @profile.active@ active: prod
messages: messages:
encoding: UTF-8 encoding: UTF-8
servlet: servlet:
...@@ -10,7 +10,7 @@ spring: ...@@ -10,7 +10,7 @@ spring:
location: /tmp/tomcat_upload location: /tmp/tomcat_upload
datasource: datasource:
druid: druid:
url: jdbc:mysql://172.16.48.14:3306/dts-shop?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&allowPublicKeyRetrieval=true&verifyServerCertificate=false&useSSL=false url: jdbc:mysql://101.37.172.120:3306/dts-shop?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&allowPublicKeyRetrieval=true&verifyServerCertificate=false&useSSL=false
driver-class-name: com.mysql.jdbc.Driver driver-class-name: com.mysql.jdbc.Driver
username: root username: root
password: zhuangdian123 password: zhuangdian123
...@@ -26,6 +26,22 @@ spring: ...@@ -26,6 +26,22 @@ spring:
test-while-idle: true test-while-idle: true
time-between-eviction-runs-millis: 60000 time-between-eviction-runs-millis: 60000
filters: stat,wall filters: stat,wall
# redis 配置
redis:
# 地址
host: 101.37.172.120
# 端口,默认为6379
port: 6379
# 密码
password: zhuangdian123
# 连接超时时间
timeout: 10s
lettuce:
pool:
max-active: 8 #最大连接数据库连接数,设 0 为没有限制
max-idle: 8 #最大等待连接中的数量,设 0 为没有限制
max-wait: -1ms #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
min-idle: 0 #最小等待连接中的数量,设 0 为没有限制
server: server:
port: 8383 port: 8383
......
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