1、swagger接口文档
parent
92efa5694d
commit
567c6d93ff
@ -0,0 +1,16 @@
|
|||||||
|
package com.ibeetl.jlw.dao;
|
||||||
|
|
||||||
|
|
||||||
|
import com.ibeetl.jlw.entity.HsValues;
|
||||||
|
import org.beetl.sql.mapper.BaseMapper;
|
||||||
|
import org.beetl.sql.mapper.annotation.SqlResource;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
@SqlResource("jlw.hsValues")
|
||||||
|
public interface HsValuesDao extends BaseMapper<HsValues> {
|
||||||
|
|
||||||
|
HsValues findByCreateTime(String createTime);
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
package com.ibeetl.jlw.entity;
|
||||||
|
|
||||||
|
import cn.jlw.validate.ValidateConfig;
|
||||||
|
import com.ibeetl.admin.core.entity.BaseEntity;
|
||||||
|
import org.beetl.sql.annotation.entity.AutoID;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public class HsValues extends BaseEntity {
|
||||||
|
|
||||||
|
|
||||||
|
@NotNull(message = "ID不能为空", groups = ValidateConfig.UPDATE.class)
|
||||||
|
// @SeqID(name = ORACLE_CORE_SEQ_NAME)
|
||||||
|
@AutoID
|
||||||
|
|
||||||
|
private Integer id ;
|
||||||
|
|
||||||
|
private Double hsValue;
|
||||||
|
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getHsValue() {
|
||||||
|
return hsValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHsValue(Double hsValue) {
|
||||||
|
this.hsValue = hsValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Date createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package com.ibeetl.jlw.service;
|
||||||
|
|
||||||
|
|
||||||
|
import com.ibeetl.jlw.dao.HsValuesDao;
|
||||||
|
import com.ibeetl.jlw.entity.HsValues;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class HsValuesService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private HsValuesDao hsValuesDao;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public HsValues findByCreateTime(String createTime){
|
||||||
|
|
||||||
|
return hsValuesDao.findByCreateTime(createTime);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
findByCreateTime
|
||||||
|
===
|
||||||
|
select * from hs_values where DATE_FORMAT(create_time, '%Y-%m-%d') = #createTime#
|
Loading…
Reference in New Issue