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

修改运费模板

上级 e9c2c47b
...@@ -329,7 +329,7 @@ public class TbCfOrderController extends AbstractController { ...@@ -329,7 +329,7 @@ public class TbCfOrderController extends AbstractController {
@GetMapping("/getDayOrderNum") @GetMapping("/getDayOrderNum")
@ResponseBody @ResponseBody
public R getDayOrderNum(@RequestParam(value = "status",required = false) String status) { public R getDayOrderNum(@RequestParam(value = "status", required = false) String status) {
int dayOrderNum = tbCfOrderService.getDayOrderNum(status); int dayOrderNum = tbCfOrderService.getDayOrderNum(status);
return R.ok().put("dayOrderNum", dayOrderNum); return R.ok().put("dayOrderNum", dayOrderNum);
} }
...@@ -350,11 +350,16 @@ public class TbCfOrderController extends AbstractController { ...@@ -350,11 +350,16 @@ public class TbCfOrderController extends AbstractController {
@GetMapping("/getHotCommodity") @GetMapping("/getHotCommodity")
@ResponseBody @ResponseBody
public R getHotCommodity() { public R getHotCommodity(@RequestParam Map<String, Object> params) {
List<SearchKeywords> itemList = tbCfOrderService.getHotCommodity(); Query query=new Query(params);
return R.ok().put("list", itemList); List<SearchKeywords> itemList = tbCfOrderService.getHotCommodity(query);
int total = tbCfOrderService.queryCommodityTotal();
PageUtils pageUtil = new PageUtils(itemList, total, query.getLimit(), query.getPage());
return R.ok().put("page", pageUtil);
} }
//========================================================================================================== //==========================================================================================================
/** /**
......
...@@ -8,6 +8,7 @@ import org.apache.ibatis.annotations.Param; ...@@ -8,6 +8,7 @@ import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* Dao * Dao
...@@ -107,6 +108,10 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> { ...@@ -107,6 +108,10 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> {
Double getYesterdayAmount(); Double getYesterdayAmount();
List<SearchKeywords> getHotCommodity(); List<SearchKeywords> getHotCommodity(Map<String, Object> params);
int queryTotal1();
int queryTotal2();
} }
...@@ -9,7 +9,7 @@ import java.util.Date; ...@@ -9,7 +9,7 @@ import java.util.Date;
* 表名 tb_cf_express_template * 表名 tb_cf_express_template
* *
* @author lipengjun * @author lipengjun
* @date 2020-07-07 14:24:13 * @date 2020-08-27 14:58:56
*/ */
public class TbCfExpressTemplateEntity implements Serializable { public class TbCfExpressTemplateEntity implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -46,6 +46,14 @@ public class TbCfExpressTemplateEntity implements Serializable { ...@@ -46,6 +46,14 @@ public class TbCfExpressTemplateEntity implements Serializable {
* 续件费用 * 续件费用
*/ */
private BigDecimal continuationFee; private BigDecimal continuationFee;
/**
* 手续费
*/
private BigDecimal handlingFee;
/**
* 关税
*/
private BigDecimal tariff;
/** /**
* 国家编号 * 国家编号
*/ */
...@@ -59,7 +67,7 @@ public class TbCfExpressTemplateEntity implements Serializable { ...@@ -59,7 +67,7 @@ public class TbCfExpressTemplateEntity implements Serializable {
*/ */
private Integer status; private Integer status;
/** /**
* 默认模板 0:默认 1:非默认 * 地区默认模板 0:默认 1:非默认
*/ */
private Integer isDefault; private Integer isDefault;
/** /**
...@@ -88,7 +96,6 @@ public class TbCfExpressTemplateEntity implements Serializable { ...@@ -88,7 +96,6 @@ public class TbCfExpressTemplateEntity implements Serializable {
public String getTemplateId() { public String getTemplateId() {
return templateId; return templateId;
} }
/** /**
* 设置:模板标题 * 设置:模板标题
*/ */
...@@ -102,15 +109,19 @@ public class TbCfExpressTemplateEntity implements Serializable { ...@@ -102,15 +109,19 @@ public class TbCfExpressTemplateEntity implements Serializable {
public String getTemplateTitle() { public String getTemplateTitle() {
return templateTitle; return templateTitle;
} }
/**
public Integer getType() { * 设置:计费方式 0:计件 1:计重
return type; */
}
public void setType(Integer type) { public void setType(Integer type) {
this.type = type; this.type = type;
} }
/**
* 获取:计费方式 0:计件 1:计重
*/
public Integer getType() {
return type;
}
/** /**
* 设置:商品类型 * 设置:商品类型
*/ */
...@@ -124,7 +135,6 @@ public class TbCfExpressTemplateEntity implements Serializable { ...@@ -124,7 +135,6 @@ public class TbCfExpressTemplateEntity implements Serializable {
public String getItemCategoryId() { public String getItemCategoryId() {
return itemCategoryId; return itemCategoryId;
} }
/** /**
* 设置:起始数量 * 设置:起始数量
*/ */
...@@ -138,7 +148,6 @@ public class TbCfExpressTemplateEntity implements Serializable { ...@@ -138,7 +148,6 @@ public class TbCfExpressTemplateEntity implements Serializable {
public Integer getStartNum() { public Integer getStartNum() {
return startNum; return startNum;
} }
/** /**
* 设置:快递费 * 设置:快递费
*/ */
...@@ -152,7 +161,6 @@ public class TbCfExpressTemplateEntity implements Serializable { ...@@ -152,7 +161,6 @@ public class TbCfExpressTemplateEntity implements Serializable {
public BigDecimal getExpressFee() { public BigDecimal getExpressFee() {
return expressFee; return expressFee;
} }
/** /**
* 设置:续件数量 * 设置:续件数量
*/ */
...@@ -166,7 +174,6 @@ public class TbCfExpressTemplateEntity implements Serializable { ...@@ -166,7 +174,6 @@ public class TbCfExpressTemplateEntity implements Serializable {
public Integer getContinuationNum() { public Integer getContinuationNum() {
return continuationNum; return continuationNum;
} }
/** /**
* 设置:续件费用 * 设置:续件费用
*/ */
...@@ -180,7 +187,32 @@ public class TbCfExpressTemplateEntity implements Serializable { ...@@ -180,7 +187,32 @@ public class TbCfExpressTemplateEntity implements Serializable {
public BigDecimal getContinuationFee() { public BigDecimal getContinuationFee() {
return continuationFee; return continuationFee;
} }
/**
* 设置:手续费
*/
public void setHandlingFee(BigDecimal handlingFee) {
this.handlingFee = handlingFee;
}
/**
* 获取:手续费
*/
public BigDecimal getHandlingFee() {
return handlingFee;
}
/**
* 设置:关税
*/
public void setTariff(BigDecimal tariff) {
this.tariff = tariff;
}
/**
* 获取:关税
*/
public BigDecimal getTariff() {
return tariff;
}
/** /**
* 设置:国家编号 * 设置:国家编号
*/ */
...@@ -194,7 +226,6 @@ public class TbCfExpressTemplateEntity implements Serializable { ...@@ -194,7 +226,6 @@ public class TbCfExpressTemplateEntity implements Serializable {
public String getCountryCode() { public String getCountryCode() {
return countryCode; return countryCode;
} }
/** /**
* 设置:国家 * 设置:国家
*/ */
...@@ -208,7 +239,6 @@ public class TbCfExpressTemplateEntity implements Serializable { ...@@ -208,7 +239,6 @@ public class TbCfExpressTemplateEntity implements Serializable {
public String getCountry() { public String getCountry() {
return country; return country;
} }
/** /**
* 设置:状态 0:删除 1:正常 * 设置:状态 0:删除 1:正常
*/ */
...@@ -222,21 +252,19 @@ public class TbCfExpressTemplateEntity implements Serializable { ...@@ -222,21 +252,19 @@ public class TbCfExpressTemplateEntity implements Serializable {
public Integer getStatus() { public Integer getStatus() {
return status; return status;
} }
/** /**
* 设置:默认模板 0:默认 1:非默认 * 设置:地区默认模板 0:默认 1:非默认
*/ */
public void setIsDefault(Integer isDefault) { public void setIsDefault(Integer isDefault) {
this.isDefault = isDefault; this.isDefault = isDefault;
} }
/** /**
* 获取:默认模板 0:默认 1:非默认 * 获取:地区默认模板 0:默认 1:非默认
*/ */
public Integer getIsDefault() { public Integer getIsDefault() {
return isDefault; return isDefault;
} }
/** /**
* 设置:免邮价格 * 设置:免邮价格
*/ */
...@@ -250,7 +278,6 @@ public class TbCfExpressTemplateEntity implements Serializable { ...@@ -250,7 +278,6 @@ public class TbCfExpressTemplateEntity implements Serializable {
public BigDecimal getPostageFreePrice() { public BigDecimal getPostageFreePrice() {
return postageFreePrice; return postageFreePrice;
} }
/** /**
* 设置:创建日期 * 设置:创建日期
*/ */
...@@ -264,7 +291,6 @@ public class TbCfExpressTemplateEntity implements Serializable { ...@@ -264,7 +291,6 @@ public class TbCfExpressTemplateEntity implements Serializable {
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
/** /**
* 设置:更新时间 * 设置:更新时间
*/ */
......
...@@ -127,5 +127,9 @@ public interface TbCfOrderService { ...@@ -127,5 +127,9 @@ public interface TbCfOrderService {
String getDaysFrom(); String getDaysFrom();
List<SearchKeywords> getHotCommodity(); List<SearchKeywords> getHotCommodity(Map<String, Object> params);
int queryCommodityTotal();
} }
...@@ -240,8 +240,13 @@ public class TbCfOrderServiceImpl implements TbCfOrderService { ...@@ -240,8 +240,13 @@ public class TbCfOrderServiceImpl implements TbCfOrderService {
} }
@Override @Override
public List<SearchKeywords> getHotCommodity() { public List<SearchKeywords> getHotCommodity(Map<String, Object> params) {
return tbCfOrderDao.getHotCommodity(); return tbCfOrderDao.getHotCommodity(params);
}
@Override
public int queryCommodityTotal() {
return tbCfOrderDao.queryTotal1() + tbCfOrderDao.queryTotal2();
} }
} }
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
<result property="expressFee" column="express_fee"/> <result property="expressFee" column="express_fee"/>
<result property="continuationNum" column="continuation_num"/> <result property="continuationNum" column="continuation_num"/>
<result property="continuationFee" column="continuation_fee"/> <result property="continuationFee" column="continuation_fee"/>
<result property="handlingFee" column="handling_fee"/>
<result property="tariff" column="tariff"/>
<result property="countryCode" column="country_code"/> <result property="countryCode" column="country_code"/>
<result property="country" column="country"/> <result property="country" column="country"/>
<result property="status" column="status"/> <result property="status" column="status"/>
...@@ -25,12 +27,14 @@ ...@@ -25,12 +27,14 @@
select select
`template_id`, `template_id`,
`template_title`, `template_title`,
`type`, `type`,
`item_category_id`, `item_category_id`,
`start_num`, `start_num`,
`express_fee`, `express_fee`,
`continuation_num`, `continuation_num`,
`continuation_fee`, `continuation_fee`,
`handling_fee`,
`tariff`,
`country_code`, `country_code`,
`country`, `country`,
`status`, `status`,
...@@ -54,6 +58,8 @@ ...@@ -54,6 +58,8 @@
`express_fee`, `express_fee`,
`continuation_num`, `continuation_num`,
`continuation_fee`, `continuation_fee`,
`handling_fee`,
`tariff`,
`country_code`, `country_code`,
`country`, `country`,
`status`, `status`,
...@@ -97,6 +103,8 @@ ...@@ -97,6 +103,8 @@
`express_fee`, `express_fee`,
`continuation_num`, `continuation_num`,
`continuation_fee`, `continuation_fee`,
`handling_fee`,
`tariff`,
`country_code`, `country_code`,
`country`, `country`,
`status`, `status`,
...@@ -113,6 +121,8 @@ ...@@ -113,6 +121,8 @@
#{expressFee}, #{expressFee},
#{continuationNum}, #{continuationNum},
#{continuationFee}, #{continuationFee},
#{handlingFee},
#{tariff},
#{countryCode}, #{countryCode},
#{country}, #{country},
#{status}, #{status},
...@@ -125,19 +135,21 @@ ...@@ -125,19 +135,21 @@
<update id="update" parameterType="com.platform.entity.TbCfExpressTemplateEntity"> <update id="update" parameterType="com.platform.entity.TbCfExpressTemplateEntity">
update tb_cf_express_template update tb_cf_express_template
<set> <set>
<if test="templateTitle != null">`template_title` = #{templateTitle},</if> <if test="templateTitle != null">`template_title` = #{templateTitle}, </if>
<if test="type != null">`type` = #{type},</if> <if test="type != null">`type` = #{type}, </if>
<if test="itemCategoryId != null">`item_category_id` = #{itemCategoryId},</if> <if test="itemCategoryId != null">`item_category_id` = #{itemCategoryId}, </if>
<if test="startNum != null">`start_num` = #{startNum},</if> <if test="startNum != null">`start_num` = #{startNum}, </if>
<if test="expressFee != null">`express_fee` = #{expressFee},</if> <if test="expressFee != null">`express_fee` = #{expressFee}, </if>
<if test="continuationNum != null">`continuation_num` = #{continuationNum},</if> <if test="continuationNum != null">`continuation_num` = #{continuationNum}, </if>
<if test="continuationFee != null">`continuation_fee` = #{continuationFee},</if> <if test="continuationFee != null">`continuation_fee` = #{continuationFee}, </if>
<if test="countryCode != null">`country_code` = #{countryCode},</if> <if test="handlingFee != null">`handling_fee` = #{handlingFee}, </if>
<if test="country != null">`country` = #{country},</if> <if test="tariff != null">`tariff` = #{tariff}, </if>
<if test="status != null">`status` = #{status},</if> <if test="countryCode != null">`country_code` = #{countryCode}, </if>
<if test="isDefault != null">`is_default` = #{isDefault},</if> <if test="country != null">`country` = #{country}, </if>
<if test="postageFreePrice != null">`postage_free_price` = #{postageFreePrice},</if> <if test="status != null">`status` = #{status}, </if>
<if test="createTime != null">`create_time` = #{createTime},</if> <if test="isDefault != null">`is_default` = #{isDefault}, </if>
<if test="postageFreePrice != null">`postage_free_price` = #{postageFreePrice}, </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>
</set> </set>
where template_id = #{templateId} where template_id = #{templateId}
...@@ -154,4 +166,4 @@ ...@@ -154,4 +166,4 @@
</foreach> </foreach>
</delete> </delete>
</mapper> </mapper>
\ No newline at end of file
...@@ -200,7 +200,7 @@ ...@@ -200,7 +200,7 @@
<select id="getHotCommodity" resultType="com.platform.vo.SearchKeywords"> <select id="getHotCommodity" resultType="com.platform.vo.SearchKeywords">
SELECT SELECT
i.item_name searchKeywords, i.item_name searchKeywords,
count( o.user_id ) count count( 1 ) count
FROM FROM
tb_cf_order o tb_cf_order o
LEFT JOIN tb_cf_item_order_r r ON o.order_id = r.order_id LEFT JOIN tb_cf_item_order_r r ON o.order_id = r.order_id
...@@ -208,24 +208,45 @@ ...@@ -208,24 +208,45 @@
WHERE WHERE
i.item_name IS NOT NULL i.item_name IS NOT NULL
GROUP BY GROUP BY
o.user_id UNION i.item_name UNION
SELECT SELECT
i.item_title searchKeywords, i.item_title searchKeywords,
count( o.user_id ) count count( 1 ) count
FROM FROM
tb_cf_order o tb_cf_order o
LEFT JOIN tb_cf_item_order_r r ON o.order_id = r.order_id LEFT JOIN tb_cf_item_order_r r ON o.order_id = r.order_id
LEFT JOIN tb_cf_item_detail i ON r.item_id = i. LEFT JOIN tb_cf_item_detail i ON r.item_id = i.item_id
WHEREitem_id WHERE
i.item_title IS NOT NULL i.item_title IS NOT NULL
GROUP BY GROUP BY
o.user_id i.item_title
ORDER BY ORDER BY
count DESC count DESC
<if test="offset != null and limit != null"> <if test="offset != null and limit != null">
limit #{offset}, #{limit} limit #{offset}, #{limit}
</if> </if>
</select> </select>
<select id="queryTotal1" resultType="int">
SELECT
count( 1 ) count
FROM
tb_cf_order o
LEFT JOIN tb_cf_item_order_r r ON o.order_id = r.order_id
LEFT JOIN tb_cf_station_item i ON r.item_id = i.item_id
WHERE
i.item_name IS NOT NULL
</select>
<select id="queryTotal2" resultType="int">
SELECT
count( 1 ) count
FROM
tb_cf_order o
LEFT JOIN tb_cf_item_order_r r ON o.order_id = r.order_id
LEFT JOIN tb_cf_item_detail i ON r.item_id = i.item_id
WHERE
i.item_title IS NOT NULL
</select>
<select id="queryList" resultType="com.platform.entity.TbCfOrderEntity"> <select id="queryList" resultType="com.platform.entity.TbCfOrderEntity">
select select
i.order_item_id ordersId, i.order_item_id ordersId,
...@@ -332,7 +353,7 @@ ...@@ -332,7 +353,7 @@
<if test="status!=null"> <if test="status!=null">
and pay_status=#{status} and pay_status=#{status}
</if> </if>
</select> </select>
<insert id="save" parameterType="com.platform.entity.TbCfOrderEntity"> <insert id="save" parameterType="com.platform.entity.TbCfOrderEntity">
insert into tb_cf_order( insert into tb_cf_order(
......
...@@ -2,17 +2,17 @@ ...@@ -2,17 +2,17 @@
#jdbc.username=root #jdbc.username=root
#jdbc.password=root #jdbc.password=root
jdbc.url=jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8 #jdbc.url=jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
jdbc.username=root #jdbc.username=root
jdbc.password=diaoyun666 #jdbc.password=diaoyun666
#jdbc.url: jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false jdbc.url: jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
#jdbc.username: root jdbc.username: root
#jdbc.password: Diaoyunnuli.8 jdbc.password: Diaoyunnuli.8
jdbc.initialSize=5 jdbc.initialSize=5
jdbc.maxActive=30 jdbc.maxActive=30
jdbc.minPoolSize=2 jdbc.minPoolSize=2
jdbc.maxIdleTime=30000 jdbc.maxIdleTime=30000
jdbc.idleConnectionTestPeriod=100 jdbc.idleConnectionTestPeriod=100
\ No newline at end of file
...@@ -2,17 +2,17 @@ ...@@ -2,17 +2,17 @@
#jdbc.username=root #jdbc.username=root
#jdbc.password=root #jdbc.password=root
jdbc.url=jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8 #jdbc.url=jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
jdbc.username=root #jdbc.username=root
jdbc.password=diaoyun666 #jdbc.password=diaoyun666
#jdbc.url: jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false jdbc.url: jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
#jdbc.username: root jdbc.username: root
#jdbc.password: Diaoyunnuli.8 jdbc.password: Diaoyunnuli.8
jdbc.initialSize=5 jdbc.initialSize=5
jdbc.maxActive=30 jdbc.maxActive=30
jdbc.minPoolSize=2 jdbc.minPoolSize=2
jdbc.maxIdleTime=30000 jdbc.maxIdleTime=30000
jdbc.idleConnectionTestPeriod=100 jdbc.idleConnectionTestPeriod=100
\ No newline at end of file
...@@ -55,6 +55,12 @@ ...@@ -55,6 +55,12 @@
<Form-item label="续件费用" prop="continuationFee"> <Form-item label="续件费用" prop="continuationFee">
<i-input v-model="tbCfExpressTemplate.continuationFee" placeholder="续件费用" style="width:300px"/> <i-input v-model="tbCfExpressTemplate.continuationFee" placeholder="续件费用" style="width:300px"/>
</Form-item> </Form-item>
<Form-item label="手续费" prop="handlingFee">
<i-input v-model="tbCfExpressTemplate.handlingFee" placeholder="手续费" style="width:300px"/>
</Form-item>
<Form-item label="关税" prop="tariff">
<i-input v-model="tbCfExpressTemplate.tariff" placeholder="关税" style="width:300px"/>
</Form-item>
<Form-item label="国家" prop="country"> <Form-item label="国家" prop="country">
<i-input v-model="tbCfExpressTemplate.country" placeholder="国家" style="width:300px"/> <i-input v-model="tbCfExpressTemplate.country" placeholder="国家" style="width:300px"/>
</Form-item> </Form-item>
...@@ -73,4 +79,4 @@ ...@@ -73,4 +79,4 @@
<script src="${rc.contextPath}/js/sys/tbcfexpresstemplate.js?_${date.systemTime}"></script> <script src="${rc.contextPath}/js/sys/tbcfexpresstemplate.js?_${date.systemTime}"></script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -51,8 +51,8 @@ ...@@ -51,8 +51,8 @@
<Form-item label="是否生效标志" prop="enableFlag"> <Form-item label="是否生效标志" prop="enableFlag">
<i-input v-model="tbCfFee.enableFlag" placeholder="是否生效标志"/> <i-input v-model="tbCfFee.enableFlag" placeholder="是否生效标志"/>
</Form-item>--> </Form-item>-->
<Form-item label="收取费用百分比" prop="feePercent"> <Form-item label="爬虫商品手续费" prop="feePercent">
<i-input v-model="tbCfFee.feePercent" placeholder="收取费用百分比"/> <i-input v-model="tbCfFee.feePercent" placeholder="爬虫商品手续费"/>
</Form-item> </Form-item>
<Form-item label="设置美元转换" prop="feeRate"> <Form-item label="设置美元转换" prop="feeRate">
<i-input v-model="tbCfFee.feeRate" placeholder="设置美元转换" disabled="true"/> <i-input v-model="tbCfFee.feeRate" placeholder="设置美元转换" disabled="true"/>
...@@ -68,4 +68,4 @@ ...@@ -68,4 +68,4 @@
<script src="${rc.contextPath}/js/sys/tbcffee.js?_${date.systemTime}"></script> <script src="${rc.contextPath}/js/sys/tbcffee.js?_${date.systemTime}"></script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -42,6 +42,8 @@ $(function () { ...@@ -42,6 +42,8 @@ $(function () {
} }
}, },
{label: '续件运费(美金)', name: 'continuationFee', index: 'continuation_fee', width: 80}, {label: '续件运费(美金)', name: 'continuationFee', index: 'continuation_fee', width: 80},
{label: '手续费', name: 'handlingFee', index: 'handling_fee', width: 80},
{label: '关税', name: 'tariff', index: 'tariff', width: 80},
{label: '免邮价格', name: 'postageFreePrice', index: 'postage_free_price', width: 80}, {label: '免邮价格', name: 'postageFreePrice', index: 'postage_free_price', width: 80},
{label: '创建日期', name: 'createTime', index: 'create_time', width: 80}, {label: '创建日期', name: 'createTime', index: 'create_time', width: 80},
// {label: '最后编辑时间', name: 'updateTime', index: 'update_time', width: 80}, // {label: '最后编辑时间', name: 'updateTime', index: 'update_time', width: 80},
...@@ -191,4 +193,4 @@ let vm = new Vue({ ...@@ -191,4 +193,4 @@ let vm = new Vue({
handleResetForm(this, name); handleResetForm(this, name);
} }
} }
}); });
\ No newline at end of file
...@@ -5,7 +5,7 @@ $(function () { ...@@ -5,7 +5,7 @@ $(function () {
{label: 'feeId', name: 'feeId', index: 'fee_id', key: true, hidden: true}, {label: 'feeId', name: 'feeId', index: 'fee_id', key: true, hidden: true},
//{label: '收费类型,1为百分比,目前只有一种收费方式', name: 'feeType', index: 'fee_type', width: 80}, //{label: '收费类型,1为百分比,目前只有一种收费方式', name: 'feeType', index: 'fee_type', width: 80},
//{label: '是否生效标志', name: 'enableFlag', index: 'enable_flag', width: 80}, //{label: '是否生效标志', name: 'enableFlag', index: 'enable_flag', width: 80},
{label: '收取费用百分比', name: 'feePercent', index: 'fee_percent', width: 80}, {label: '爬虫商品手续费', name: 'feePercent', index: 'fee_percent', width: 80},
{label: '设置美元转换', name: 'feeRate', index: 'fee_rate', width: 80}], {label: '设置美元转换', name: 'feeRate', index: 'fee_rate', width: 80}],
shrinkToFit: true, shrinkToFit: true,
datatype : "json", datatype : "json",
...@@ -122,4 +122,4 @@ let vm = new Vue({ ...@@ -122,4 +122,4 @@ let vm = new Vue({
handleResetForm(this, name); handleResetForm(this, name);
} }
} }
}); });
\ No newline at end of file
...@@ -9,8 +9,8 @@ import com.platform.utils.ScheduleUtils; ...@@ -9,8 +9,8 @@ import com.platform.utils.ScheduleUtils;
import com.platform.utils.SpringContextUtils; import com.platform.utils.SpringContextUtils;
import org.quartz.CronTrigger; import org.quartz.CronTrigger;
import org.quartz.Scheduler; import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -25,7 +25,7 @@ import java.util.Map; ...@@ -25,7 +25,7 @@ import java.util.Map;
/** /**
* 定时任务 * 定时任务
* *
* *
* @date 2017年11月20日 下午2:16:40 * @date 2017年11月20日 下午2:16:40
*/ */
@Service("scheduleJobService") @Service("scheduleJobService")
...@@ -38,20 +38,19 @@ public class ScheduleJobServiceImpl implements ScheduleJobService { ...@@ -38,20 +38,19 @@ public class ScheduleJobServiceImpl implements ScheduleJobService {
/** /**
* 项目启动时,初始化定时器 * 项目启动时,初始化定时器
*/ */
@PostConstruct // @PostConstruct
public void init() throws SchedulerException { // public void init() {
List<ScheduleJobEntity> scheduleJobList = schedulerJobDao.queryList(new HashMap<String, Object>()); // List<ScheduleJobEntity> scheduleJobList = schedulerJobDao.queryList(new HashMap<String, Object>());
scheduler.clear(); // for (ScheduleJobEntity scheduleJob : scheduleJobList) {
for (ScheduleJobEntity scheduleJob : scheduleJobList) { // CronTrigger cronTrigger = ScheduleUtils.getCronTrigger(scheduler, scheduleJob.getJobId());
CronTrigger cronTrigger = ScheduleUtils.getCronTrigger(scheduler, scheduleJob.getJobId()); // //如果不存在,则创建
//如果不存在,则创建 // if (cronTrigger == null) {
if (cronTrigger == null) { // ScheduleUtils.createScheduleJob(scheduler, scheduleJob);
ScheduleUtils.createScheduleJob(scheduler, scheduleJob); // } else {
} else { // ScheduleUtils.updateScheduleJob(scheduler, scheduleJob);
ScheduleUtils.updateScheduleJob(scheduler, scheduleJob); // }
} // }
} // }
}
@Override @Override
public ScheduleJobEntity queryObject(Long jobId) { public ScheduleJobEntity queryObject(Long jobId) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论