修改
This commit is contained in:
parent
ad00a75e67
commit
754ee569be
@ -1,5 +1,7 @@
|
|||||||
package com.fuint.business.petrolStationManagement.entity;
|
package com.fuint.business.petrolStationManagement.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
import com.fuint.repository.model.base.BaseEntity;
|
import com.fuint.repository.model.base.BaseEntity;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
@ -16,6 +18,7 @@ import lombok.Data;
|
|||||||
@Data
|
@Data
|
||||||
public class OilName extends BaseEntity {
|
public class OilName extends BaseEntity {
|
||||||
@ApiModelProperty("商户名")
|
@ApiModelProperty("商户名")
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
public Long id; //id(主键)
|
public Long id; //id(主键)
|
||||||
private String oilType; // 油品类型
|
private String oilType; // 油品类型
|
||||||
private String oilName; //油品名称
|
private String oilName; //油品名称
|
||||||
@ -26,5 +29,7 @@ public class OilName extends BaseEntity {
|
|||||||
private String ifDelete; //
|
private String ifDelete; //
|
||||||
private String receivingUnits; //
|
private String receivingUnits; //
|
||||||
private String unit; //
|
private String unit; //
|
||||||
|
private Integer storeId; //
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package com.fuint.business.petrolStationManagement.entity;
|
package com.fuint.business.petrolStationManagement.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
import com.fuint.repository.model.base.BaseEntity;
|
import com.fuint.repository.model.base.BaseEntity;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
@ -17,6 +19,7 @@ import lombok.Data;
|
|||||||
@Data
|
@Data
|
||||||
public class OilNumber extends BaseEntity {
|
public class OilNumber extends BaseEntity {
|
||||||
@ApiModelProperty("商户名")
|
@ApiModelProperty("商户名")
|
||||||
|
@TableId(value = "number_id", type = IdType.AUTO)
|
||||||
public Integer numberId; //id(主键)
|
public Integer numberId; //id(主键)
|
||||||
private String oilType; // 油品类型
|
private String oilType; // 油品类型
|
||||||
private String oilName; //油品名称
|
private String oilName; //油品名称
|
||||||
@ -30,6 +33,6 @@ public class OilNumber extends BaseEntity {
|
|||||||
private String remark; //
|
private String remark; //
|
||||||
private String ifDelete; //
|
private String ifDelete; //
|
||||||
private String unit; //
|
private String unit; //
|
||||||
private String storeId; //
|
private Integer storeId; //
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package com.fuint.business.petrolStationManagement.entity;
|
package com.fuint.business.petrolStationManagement.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
import com.fuint.repository.model.base.BaseEntity;
|
import com.fuint.repository.model.base.BaseEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -16,18 +18,19 @@ import java.util.Date;
|
|||||||
@Data
|
@Data
|
||||||
public class OilPresetPrices extends BaseEntity {
|
public class OilPresetPrices extends BaseEntity {
|
||||||
|
|
||||||
|
@TableId(value = "number_id", type = IdType.AUTO)
|
||||||
private Long presetId; // id(主键)
|
private Long presetId; // id(主键)
|
||||||
private Long oilType; // 预设油号 id
|
private Long oilType; // 预设油号 id
|
||||||
private Double currentPetrolPrices; // 当前油站价
|
private Double currentPetrolPrices; // 当前油站价
|
||||||
private Double presetOilPrices; // 预设油站价
|
private Double presetOilPrices; // 预设油站价
|
||||||
private Double currentGbPrice; // 当前国标价
|
private Double currentGbPrice; // 当前国标价
|
||||||
private Double presetGbPrice; // 预设国标价
|
private Double presetGbPrice; // 预设国标价
|
||||||
// private String createTime; // 创建时间
|
|
||||||
// private String updateTime; // 更新时间
|
|
||||||
private String effectiveTime; // 生效时间(时间戳)
|
private String effectiveTime; // 生效时间(时间戳)
|
||||||
private Integer ifDelete; // 是否删除(0未删除|1删除)
|
private Integer ifDelete; // 是否删除(0未删除|1删除)
|
||||||
private Integer state; // 状态
|
private Integer state; // 状态
|
||||||
private Integer numberId; // 状态
|
private Integer numberId; // 状态
|
||||||
|
private Integer storeId; // 关联的店铺id
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
|
@ -75,18 +75,17 @@
|
|||||||
<update id="updateOilNumber">
|
<update id="updateOilNumber">
|
||||||
update oil_number
|
update oil_number
|
||||||
<set>
|
<set>
|
||||||
<if test=" oilType != null">oil_type= #{oilType},</if>
|
<if test=" oilType != null and oilType != ''">oil_type= #{oilType},</if>
|
||||||
<if test=" oilName != null">oil_name= #{oilName},</if>
|
<if test=" oilName != null and oilName != ''">oil_name= #{oilName},</if>
|
||||||
<if test=" oilPrice != null">oil_price= #{oilPrice},</if>
|
<if test=" oilPrice != null and oilPrice != ''" >oil_price= #{oilPrice},</if>
|
||||||
<if test=" gbPrice != null">gb_price= #{gbPrice},</if>
|
<if test=" gbPrice != null and gbPrice != ''">gb_price= #{gbPrice},</if>
|
||||||
<if test=" receivingUnits != null">receiving_units= #{receivingUni},</if>
|
<if test=" receivingUnits != null and receivingUnits != ''">receiving_units= #{receivingUnits},</if>
|
||||||
<if test=" createTime != null">create_time= #{createTime},</if>
|
<if test=" createTime != null">create_time= #{createTime},</if>
|
||||||
<if test=" updateTime != null">update_time= #{updateTime},</if>
|
<if test=" updateTime != null">update_time= #{updateTime},</if>
|
||||||
<if test=" state != null"> state = #{state},</if>
|
<if test=" state != null and state != ''"> state = #{state},</if>
|
||||||
<if test=" sort != null">sort= #{sort},</if>
|
<if test=" sort != null and sort != ''">sort= #{sort},</if>
|
||||||
<if test=" remark != null">remark= #{remark},</if>
|
<if test=" remark != null and remark != ''">remark= #{remark},</if>
|
||||||
<if test=" ifDelete != null">if_delete= #{ifDelete},</if>
|
<if test=" unit != null and unit != ''">unit= #{unit},</if>
|
||||||
<if test=" unit != null">unit= #{unit},</if>
|
|
||||||
</set>
|
</set>
|
||||||
where number_id = #{numberId}
|
where number_id = #{numberId}
|
||||||
</update>
|
</update>
|
||||||
|
@ -14,6 +14,7 @@ import com.fuint.quartz.domain.SysJob;
|
|||||||
import com.fuint.quartz.service.ISysJobService;
|
import com.fuint.quartz.service.ISysJobService;
|
||||||
import org.quartz.SchedulerException;
|
import org.quartz.SchedulerException;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@ -52,6 +53,7 @@ public class OilPresetPricesServiceImpl extends ServiceImpl<OilPresetPricesMappe
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public int insertOilPresetPrices(OilPresetPrices presetPrices) {
|
public int insertOilPresetPrices(OilPresetPrices presetPrices) {
|
||||||
// Date date = new Date();
|
// Date date = new Date();
|
||||||
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
|
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
|
||||||
@ -61,9 +63,12 @@ public class OilPresetPricesServiceImpl extends ServiceImpl<OilPresetPricesMappe
|
|||||||
|
|
||||||
//
|
//
|
||||||
// SysJob sysJob = new SysJob();
|
// SysJob sysJob = new SysJob();
|
||||||
// sysJob.setJobGroup("sdsd");
|
// sysJob.setJobGroup("1111");
|
||||||
// sysJob.setJobGroup("dssd");
|
// sysJob.setJobGroup("1111");
|
||||||
// sysJob.setInvokeTarget("ssdsd");
|
// sysJob.setInvokeTarget("1111");
|
||||||
|
// sysJob.setConcurrent("1");
|
||||||
|
// sysJob.setCronExpression("1111");
|
||||||
|
//
|
||||||
// try {
|
// try {
|
||||||
// iSysJobService.insertJob(sysJob);
|
// iSysJobService.insertJob(sysJob);
|
||||||
// } catch (SchedulerException e) {
|
// } catch (SchedulerException e) {
|
||||||
@ -73,9 +78,9 @@ public class OilPresetPricesServiceImpl extends ServiceImpl<OilPresetPricesMappe
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
Instant instant = Instant.parse(presetPrices.getEffectiveTime());
|
// Instant instant = Instant.parse(presetPrices.getEffectiveTime());
|
||||||
Long timestamp = instant.toEpochMilli();
|
// Long timestamp = instant.toEpochMilli();
|
||||||
presetPrices.setEffectiveTime(timestamp.toString());
|
// presetPrices.setEffectiveTime(timestamp.toString());
|
||||||
return baseMapper.insertOilPresetPrices(presetPrices);
|
return baseMapper.insertOilPresetPrices(presetPrices);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user