Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/mobile_community
| | |
| | | return R.fail("保险已关闭"); |
| | | } |
| | | insuranceOrder.setInsuranceId(insurance.getId()); |
| | | insuranceOrder.setPayMoney(BigDecimal.valueOf(insurance.getInsuranceMoney()).setScale(2, RoundingMode.HALF_UP)); |
| | | insuranceOrder.setPayMoney(insurance.getInsuranceMoney().setScale(2, RoundingMode.HALF_UP)); |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
| | | Date date = simpleDateFormat.parse(insurance.getValidityTime()); |
| | | insuranceOrder.setEndTime(date); |
| | |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | |
| | | |
| | | @ApiModelProperty(value = "费用") |
| | | @TableField("insurance_money") |
| | | private Double insuranceMoney; |
| | | private BigDecimal insuranceMoney; |
| | | |
| | | @ApiModelProperty(value = "类型 1=社会大学 2=青少年培训班") |
| | | @TableField("insurance_type") |
| | | private Integer insuranceType; |
| | | |
| | | @ApiModelProperty(value = "有效期") |
| | | @TableField("validity_time") |
| | |
| | | public boolean isOpen(TInsurance dto) { |
| | | if(StringUtils.isNotEmpty(dto.getId())){ |
| | | // 修改 |
| | | return this.count(Wrappers.lambdaQuery(TInsurance.class).ne(TInsurance::getId, dto.getId()).eq(TInsurance::getStatus, 1)) > 0; |
| | | return this.count(Wrappers.lambdaQuery(TInsurance.class) |
| | | .ne(TInsurance::getId, dto.getId()) |
| | | .eq(TInsurance::getStatus, 1) |
| | | .eq(TInsurance::getInsuranceType, dto.getInsuranceType())) > 0; |
| | | }else { |
| | | // 新增 |
| | | return this.count(Wrappers.lambdaQuery(TInsurance.class).eq(TInsurance::getStatus, 1)) > 0; |
| | | return this.count(Wrappers.lambdaQuery(TInsurance.class) |
| | | .eq(TInsurance::getStatus, 1) |
| | | .eq(TInsurance::getInsuranceType, dto.getInsuranceType())) > 0; |
| | | } |
| | | } |
| | | } |
| | |
| | | <id column="id" property="id" /> |
| | | <result column="insurance_title" property="insuranceTitle" /> |
| | | <result column="insurance_money" property="insuranceMoney" /> |
| | | <result column="insurance_type" property="insuranceType" /> |
| | | <result column="validity_time" property="validityTime" /> |
| | | <result column="status" property="status" /> |
| | | <result column="create_time" property="createTime" /> |
| | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, insurance_title, insurance_money, validity_time, status, create_time, update_time, create_by, update_by, disabled |
| | | id, insurance_title, insurance_money,insurance_type, validity_time, status, create_time, update_time, create_by, update_by, disabled |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.TInsuranceVO"> |
| | | select id, insurance_title, insurance_money, validity_time, status, create_time, update_time, create_by, update_by, disabled |
| | | select id, insurance_title, insurance_money,insurance_type, validity_time, status, create_time, update_time, create_by, update_by, disabled |
| | | from t_insurance |
| | | <where> |
| | | <if test="query.insuranceTitle != null and query.insuranceTitle != ''"> |