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

修改运费模板

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