更新基础框架到0.3.1

20230922-ljl-fixBug
wangchaoxu 1 year ago
parent 78c37af352
commit 248b4482d1

@ -19,6 +19,7 @@ import org.apache.commons.lang3.StringUtils;
import org.modelmapper.ModelMapper; import org.modelmapper.ModelMapper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import java.util.Date;
import java.util.Objects; import java.util.Objects;
/** /**
@ -44,6 +45,8 @@ public class SPIBaseService {
if (Objects.isNull(shop)) { if (Objects.isNull(shop)) {
shop = new Shop(); shop = new Shop();
shop.setShopId(shopId); shop.setShopId(shopId);
shop.setGmtCreate(new Date());
shop.setGmtModified(new Date());
shopService.insert(shop); shopService.insert(shop);
} }
@ -63,6 +66,8 @@ public class SPIBaseService {
shop.setAccessToken(SecurityTool.encodeByAES(data.getAccessToken())); // 加密 shop.setAccessToken(SecurityTool.encodeByAES(data.getAccessToken())); // 加密
shop.setRefreshToken(SecurityTool.encodeByAES(data.getRefreshToken())); // 加密 shop.setRefreshToken(SecurityTool.encodeByAES(data.getRefreshToken())); // 加密
shop.setExpiresIn(data.getExpiresIn().toString()); // TODO 这里使用时间格式 shop.setExpiresIn(data.getExpiresIn().toString()); // TODO 这里使用时间格式
shop.setGmtExpire(new Date(data.getExpiresIn() * 1000L));
shop.setGmtModified(new Date());
} }
shopService.updateByPrimaryKey(shop); shopService.updateByPrimaryKey(shop);
} catch (Exception e) { } catch (Exception e) {

@ -35,7 +35,7 @@ public class ShopServiceImpl implements ShopService {
@Override @Override
public int insert(Shop record) { public int insert(Shop record) {
return shopMapper.insert(record); return shopMapper.insertSelective(record);
} }
@Override @Override

@ -9,7 +9,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication(scanBasePackages = {"com.ms","com.jinritemai"}) @SpringBootApplication(scanBasePackages = {"com.ms","com.jinritemai"})
@MapperScan("com.ms.dal.mapper") @MapperScan("com.ms.dal.mapper")
@EnableAsync @EnableAsync
@EnableScheduling //@EnableScheduling
public class MsApplication { public class MsApplication {
public static void main(String[] args) { public static void main(String[] args) {

@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.jinritemai.cloud</groupId> <groupId>com.jinritemai.cloud</groupId>
<artifactId>base-parent</artifactId> <artifactId>base-parent</artifactId>
<version>0.2.11-RELEASE</version> <version>0.3.1-RELEASE</version>
<relativePath/> <!-- lookup parent from repository --> <relativePath/> <!-- lookup parent from repository -->
</parent> </parent>

Loading…
Cancel
Save