From 6ba4fa7b6df3c8ac7b2160902249329d4c33c65d Mon Sep 17 00:00:00 2001 From: Stormeye Wu Date: Mon, 5 Aug 2019 19:38:02 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=88=90=E9=95=BF=E5=80=BC=E5=8E=86=E5=8F=B2]?= =?UTF-8?q?[=E4=BF=AE=E6=94=B9]:=E6=9B=B4=E6=96=B0=E6=88=90=E9=95=BF?= =?UTF-8?q?=E5=80=BC=E4=B8=8D=E6=9B=B4=E6=96=B0=E5=88=9B=E5=BB=BA=E6=97=B6?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/db/migration/V201908051920__CHANGE_SCORE_HIS.sql | 2 ++ .../com/iformall/service/impl/WxScoreHistoryServiceImpl.java | 3 +++ 2 files changed, 5 insertions(+) create mode 100644 mallinkAdmin/src/main/resources/db/migration/V201908051920__CHANGE_SCORE_HIS.sql diff --git a/mallinkAdmin/src/main/resources/db/migration/V201908051920__CHANGE_SCORE_HIS.sql b/mallinkAdmin/src/main/resources/db/migration/V201908051920__CHANGE_SCORE_HIS.sql new file mode 100644 index 000000000..1e57e5ce2 --- /dev/null +++ b/mallinkAdmin/src/main/resources/db/migration/V201908051920__CHANGE_SCORE_HIS.sql @@ -0,0 +1,2 @@ +ALTER TABLE `wx_score_history` +CHANGE COLUMN `create_date` `create_date` DATETIME NOT NULL COMMENT '创建日期' ; \ No newline at end of file diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxScoreHistoryServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxScoreHistoryServiceImpl.java index 1a3195451..e6f67c6b6 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxScoreHistoryServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxScoreHistoryServiceImpl.java @@ -11,6 +11,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.iformall.common.IdWorker; +import java.util.Date; + @Service public class WxScoreHistoryServiceImpl implements WxScoreHistoryService { private final Logger logger = LoggerFactory.getLogger(this.getClass()); @@ -35,6 +37,7 @@ public class WxScoreHistoryServiceImpl implements WxScoreHistoryService { //record.setId(UUID.randomUUID().toString().replaceAll("-", "")); final IdWorker idWorker = IdWorker.get(); record.setId(idWorker.nextId()); + record.setCreateDate(new Date()); wxScoreHistoryMapper.insertSelective(record); } else { wxScoreHistoryMapper.updateByPrimaryKeySelective(record);