提交 c75546dc authored 作者: 吴德鹏's avatar 吴德鹏

优化分类导航栏

上级 1e1fe643
...@@ -36,7 +36,7 @@ public class TbCfClassificationEntity implements Serializable { ...@@ -36,7 +36,7 @@ public class TbCfClassificationEntity implements Serializable {
/** /**
* 是否展示 * 是否展示
*/ */
private String isShow; private Integer isShow;
/** /**
* 创建时间 * 创建时间
*/ */
...@@ -46,6 +46,10 @@ public class TbCfClassificationEntity implements Serializable { ...@@ -46,6 +46,10 @@ public class TbCfClassificationEntity implements Serializable {
*/ */
private Date updateTime; private Date updateTime;
private Integer type;
private String categoryId;
/** /**
* 设置:首页分类导航ID * 设置:首页分类导航ID
*/ */
...@@ -111,19 +115,15 @@ public class TbCfClassificationEntity implements Serializable { ...@@ -111,19 +115,15 @@ public class TbCfClassificationEntity implements Serializable {
public Integer getSort() { public Integer getSort() {
return sort; return sort;
} }
/**
* 设置:是否展示
*/
public void setIsShow(String isShow) {
this.isShow = isShow;
}
/** public Integer getIsShow() {
* 获取:是否展示
*/
public String getIsShow() {
return isShow; return isShow;
} }
public void setIsShow(Integer isShow) {
this.isShow = isShow;
}
/** /**
* 设置:创建时间 * 设置:创建时间
*/ */
...@@ -150,4 +150,20 @@ public class TbCfClassificationEntity implements Serializable { ...@@ -150,4 +150,20 @@ public class TbCfClassificationEntity implements Serializable {
public Date getUpdateTime() { public Date getUpdateTime() {
return updateTime; return updateTime;
} }
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public String getCategoryId() {
return categoryId;
}
public void setCategoryId(String categoryId) {
this.categoryId = categoryId;
}
} }
...@@ -24,19 +24,24 @@ public class FeeTask { ...@@ -24,19 +24,24 @@ public class FeeTask {
@Scheduled(cron = "0 0 0/1 * * ? ") @Scheduled(cron = "0 0 0/1 * * ? ")
public void FeeTask() { public void FeeTask() {
String url="http://op.juhe.cn/onebox/exchange/currency"; String url = "http://op.juhe.cn/onebox/exchange/currency";
Map<String,String> parameters=new HashMap<>(); Map<String, String> parameters = new HashMap<>();
parameters.put("from","CNY"); parameters.put("from", "CNY");
parameters.put("to","USD"); parameters.put("to", "USD");
parameters.put("key","01a825bc0e074568e7bcec48fdb5f482"); parameters.put("key", "01a825bc0e074568e7bcec48fdb5f482");
String s = HttpUtils.sendGet(url,parameters); String s = HttpUtils.sendGet(url, parameters);
JSONArray result = JSONObject.fromObject(s).getJSONArray("result"); JSONArray result = JSONObject.fromObject(s).getJSONArray("result");
Map<String,String> map = (Map<String, String>) result.get(1); Map<String, String> map = (Map<String, String>) result.get(1);
String result1 = map.get("result").substring(0,4); String result1 = map.get("result").substring(0, 4);
BigDecimal fee=new BigDecimal(result1); BigDecimal fee = new BigDecimal(result1);
TbCfFeeEntity tbFee =new TbCfFeeEntity(); TbCfFeeEntity tbFee = new TbCfFeeEntity();
tbFee.setFeeId("54sda4fa5dsa4f"); tbFee.setFeeId("54sda4fa5dsa4f");
tbFee.setFeeRate(fee); tbFee.setFeeRate(fee);
tbCfFeeService.update(tbFee); tbCfFeeService.update(tbFee);
} }
public static void main(String[] args) {
String str = "122,253,3555";
System.out.println(str.substring(str.lastIndexOf(",") + 1));
}
} }
...@@ -12,12 +12,16 @@ ...@@ -12,12 +12,16 @@
<result property="isShow" column="is_show"/> <result property="isShow" column="is_show"/>
<result property="createTime" column="create_time"/> <result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/> <result property="updateTime" column="update_time"/>
<result property="type" column="type"/>
<result property="categoryId" column="category_id"/>
</resultMap> </resultMap>
<select id="queryObject" resultType="com.platform.entity.TbCfClassificationEntity"> <select id="queryObject" resultType="com.platform.entity.TbCfClassificationEntity">
select select
`id`, `id`,
`goodtype_id`, `goodtype_id`,
`type`,
`category_id`,
`class_title`, `class_title`,
`picture`, `picture`,
`sort`, `sort`,
...@@ -30,14 +34,16 @@ ...@@ -30,14 +34,16 @@
<select id="queryList" resultType="com.platform.entity.TbCfClassificationEntity"> <select id="queryList" resultType="com.platform.entity.TbCfClassificationEntity">
select select
`id`, `id`,
`goodtype_id`, `goodtype_id`,
`class_title`, `type`,
`picture`, `category_id`,
`sort`, `class_title`,
`is_show`, `picture`,
`create_time`, `sort`,
`update_time` `is_show`,
`create_time`,
`update_time`
from tb_cf_classification from tb_cf_classification
WHERE 1=1 WHERE 1=1
<if test="name != null and name.trim() != ''"> <if test="name != null and name.trim() != ''">
...@@ -55,7 +61,7 @@ ...@@ -55,7 +61,7 @@
limit #{offset}, #{limit} limit #{offset}, #{limit}
</if> </if>
</select> </select>
<select id="queryTotal" resultType="int"> <select id="queryTotal" resultType="int">
select count(*) from tb_cf_classification select count(*) from tb_cf_classification
WHERE 1=1 WHERE 1=1
...@@ -63,11 +69,13 @@ ...@@ -63,11 +69,13 @@
AND name LIKE concat('%',#{name},'%') AND name LIKE concat('%',#{name},'%')
</if> </if>
</select> </select>
<insert id="save" parameterType="com.platform.entity.TbCfClassificationEntity"> <insert id="save" parameterType="com.platform.entity.TbCfClassificationEntity">
insert into tb_cf_classification( insert into tb_cf_classification(
`id`, `id`,
`goodtype_id`, `goodtype_id`,
`type`,
`category_id`,
`class_title`, `class_title`,
`picture`, `picture`,
`sort`, `sort`,
...@@ -77,6 +85,8 @@ ...@@ -77,6 +85,8 @@
values( values(
#{id}, #{id},
#{goodtypeId}, #{goodtypeId},
#{type},
#{categoryId},
#{classTitle}, #{classTitle},
#{picture}, #{picture},
#{sort}, #{sort},
...@@ -84,11 +94,13 @@ ...@@ -84,11 +94,13 @@
#{createTime}, #{createTime},
#{updateTime}) #{updateTime})
</insert> </insert>
<update id="update" parameterType="com.platform.entity.TbCfClassificationEntity"> <update id="update" parameterType="com.platform.entity.TbCfClassificationEntity">
update tb_cf_classification update tb_cf_classification
<set> <set>
<if test="goodtypeId != null">`goodtype_id` = #{goodtypeId}, </if> <if test="goodtypeId != null">`goodtype_id` = #{goodtypeId}, </if>
<if test="type != null">`type` = #{type}, </if>
<if test="categoryId != null">`category_id` = #{categoryId}, </if>
<if test="classTitle != null">`class_title` = #{classTitle}, </if> <if test="classTitle != null">`class_title` = #{classTitle}, </if>
<if test="picture != null">`picture` = #{picture}, </if> <if test="picture != null">`picture` = #{picture}, </if>
<if test="sort != null">`sort` = #{sort}, </if> <if test="sort != null">`sort` = #{sort}, </if>
...@@ -98,16 +110,17 @@ ...@@ -98,16 +110,17 @@
</set> </set>
where id = #{id} where id = #{id}
</update> </update>
<delete id="delete"> <delete id="delete">
delete from tb_cf_classification where id = #{value} delete from tb_cf_classification where id = #{value}
</delete> </delete>
<delete id="deleteBatch"> <delete id="deleteBatch">
delete from tb_cf_classification where id in delete from tb_cf_classification where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>
</delete> </delete>
</mapper> </mapper>
\ No newline at end of file
...@@ -175,6 +175,7 @@ ...@@ -175,6 +175,7 @@
LEFT JOIN tb_cf_coupon c ON c.coupon_id = o.coupon_id LEFT JOIN tb_cf_coupon c ON c.coupon_id = o.coupon_id
WHERE WHERE
r.order_id = #{orderId} r.order_id = #{orderId}
order by i.item_id
</select> </select>
<select id="queryOrderDeliveryWebList" resultType="com.platform.vo.DeliveryOrderVo"> <select id="queryOrderDeliveryWebList" resultType="com.platform.vo.DeliveryOrderVo">
...@@ -203,6 +204,7 @@ ...@@ -203,6 +204,7 @@
o.order_id, o.order_id,
o.order_no, o.order_no,
o.user_name, o.user_name,
o.activity_id,
f.pay_id, f.pay_id,
f.pay_way_code, f.pay_way_code,
c.coupon_title, c.coupon_title,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论