|
|
|
@@ -11,6 +11,8 @@ import com.iformall.mapper.WxAuthorizerInfoMapper; |
|
|
|
import com.iformall.mapper.WxWeappCodeStatusMapper; |
|
|
|
import com.iformall.service.WxWeappCodeStatusService; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
@@ -20,6 +22,7 @@ import java.util.Map; |
|
|
|
|
|
|
|
@Service |
|
|
|
public class WxWeappCodeStatusServiceImpl implements WxWeappCodeStatusService { |
|
|
|
private final Logger logger = LoggerFactory.getLogger(this.getClass()); |
|
|
|
|
|
|
|
@Autowired |
|
|
|
WxWeappCodeStatusMapper wxWeappCodeStatusMapper; |
|
|
|
@@ -57,15 +60,17 @@ public class WxWeappCodeStatusServiceImpl implements WxWeappCodeStatusService { |
|
|
|
|
|
|
|
@Override |
|
|
|
public void saveOrUpdate(WxWeappCodeStatus record) { |
|
|
|
Date curDate = new Date(); |
|
|
|
if (record.getId() == null) { |
|
|
|
//record.setId(UUID.randomUUID().toString().replaceAll("-", "")); |
|
|
|
final IdWorker idWorker = IdWorker.get(); |
|
|
|
record.setId(idWorker.nextId()); |
|
|
|
record.setCreateTime(new Date()); |
|
|
|
record.setUpdateTime(new Date()); |
|
|
|
record.setCreateTime(curDate); |
|
|
|
record.setUpdateTime(curDate); |
|
|
|
wxWeappCodeStatusMapper.insertSelective(record); |
|
|
|
} else { |
|
|
|
record.setUpdateTime(new Date()); |
|
|
|
record.setUpdateTime(curDate); |
|
|
|
logger.info("CODE-COMMIT: " + record.toString()); |
|
|
|
wxWeappCodeStatusMapper.updateByPrimaryKey(record); |
|
|
|
} |
|
|
|
} |
|
|
|
@@ -74,6 +79,7 @@ public class WxWeappCodeStatusServiceImpl implements WxWeappCodeStatusService { |
|
|
|
public void updateCodeCommitStatus(WxWeappCodeStatus record) { |
|
|
|
Date curDate = new Date(); |
|
|
|
record.setUpdateTime(curDate); |
|
|
|
logger.info("CODE-COMMIT: " + record.toString()); |
|
|
|
wxWeappCodeStatusMapper.updateByPrimaryKey(record); |
|
|
|
} |
|
|
|
|
|
|
|
|