调整了打票机 订单商品间距
This commit is contained in:
parent
c64c404495
commit
621f557e34
@ -10,6 +10,7 @@ import com.suisung.mall.common.exception.ApiUserException;
|
||||
import com.suisung.mall.common.modules.activity.ShopActivityGroupbookingHistory;
|
||||
import com.suisung.mall.common.modules.activity.ShopActivityGroupbuyStoreHistory;
|
||||
import com.suisung.mall.common.service.impl.BaseControllerImpl;
|
||||
import com.suisung.mall.common.utils.CheckUtil;
|
||||
import com.suisung.mall.common.utils.I18nUtil;
|
||||
import com.suisung.mall.shop.activity.service.ShopActivityCutpriceHistoryService;
|
||||
import com.suisung.mall.shop.activity.service.ShopActivityCutpriceService;
|
||||
@ -64,6 +65,7 @@ public class UserActivityController extends BaseControllerImpl {
|
||||
@Autowired
|
||||
private ShopStoreActivityBaseService shopStoreActivityBaseService;
|
||||
|
||||
@ApiOperation(value = "列出我的团购", notes = "列出我的团购")
|
||||
@RequestMapping(value = "/listsUserGroupbooking", method = RequestMethod.GET)
|
||||
public CommonResult listsUserGroupbooking(@RequestParam(name = "page", defaultValue = "1") Integer page,
|
||||
@RequestParam(name = "rows", defaultValue = "10") Integer rows,
|
||||
@ -96,6 +98,7 @@ public class UserActivityController extends BaseControllerImpl {
|
||||
return CommonResult.success(shopActivityGroupbookingService.listsUserGroupbooking(queryWrapper, page, rows));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "我的团购详情", notes = "我的团购详情")
|
||||
@RequestMapping(value = "/getUserGroupbooking", method = RequestMethod.GET)
|
||||
public CommonResult getUserGroupbooking(@RequestParam(name = "gb_id") Integer gb_id) {
|
||||
return CommonResult.success(shopActivityGroupbookingService.getUserGroupbooking(gb_id));
|
||||
@ -111,10 +114,28 @@ public class UserActivityController extends BaseControllerImpl {
|
||||
|
||||
@ApiOperation(value = "砍价活动详情", notes = "砍价活动详情")
|
||||
@RequestMapping(value = "/getCutPriceActivity", method = RequestMethod.GET)
|
||||
public CommonResult getCutPriceActivity() {
|
||||
public CommonResult getCutPriceActivityDetail() {
|
||||
return CommonResult.success(shopActivityCutpriceService.getCutPriceActivity());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "立即砍价", notes = "自己砍价、要求朋友过来也能砍价")
|
||||
@RequestMapping(value = "/doCutPrice", method = RequestMethod.GET)
|
||||
public CommonResult doCutPrice(@RequestParam(name = "ac_id", defaultValue = "0") Integer ac_id) {
|
||||
UserDto user = getCurrentUser();
|
||||
if (user == null || CheckUtil.isEmpty(user.getId())) {
|
||||
throw new ApiException(ResultCode.NEED_LOGIN);
|
||||
}
|
||||
Integer user_id = user.getId();
|
||||
return shopActivityCutpriceService.doCutPrice(ac_id, user_id);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "砍价历史记录", notes = "砍价历史记录(砍价排行榜)")
|
||||
@RequestMapping(value = "/listsCutPriceHistory", method = RequestMethod.GET)
|
||||
public CommonResult listsCutPriceHistory() {
|
||||
return CommonResult.success(shopStoreActivityBaseService.listsCutPriceHistory());
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "列出我的团购记录", notes = "列出我的团购记录")
|
||||
@RequestMapping(value = "/listsUserGroupbuyStore", method = RequestMethod.GET)
|
||||
public CommonResult listsUserGroupbuyStore(@RequestParam(name = "page", defaultValue = "1") Integer page,
|
||||
@ -216,22 +237,6 @@ public class UserActivityController extends BaseControllerImpl {
|
||||
return CommonResult.success(shopStoreActivityBaseService.listsLotteryHistory());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "参加活动,并报名", notes = "参加活动,并报名")
|
||||
@RequestMapping(value = "/doCutPrice", method = RequestMethod.GET)
|
||||
public CommonResult doCutPrice(@RequestParam(name = "ac_id", defaultValue = "0") Integer ac_id) {
|
||||
UserDto user = getCurrentUser();
|
||||
if (user == null) {
|
||||
throw new ApiException(ResultCode.NEED_LOGIN);
|
||||
}
|
||||
Integer user_id = user.getId();
|
||||
return shopActivityCutpriceService.doCutPrice(ac_id, user_id);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "砍价历史记录", notes = "砍价历史记录")
|
||||
@RequestMapping(value = "/listsCutPriceHistory", method = RequestMethod.GET)
|
||||
public CommonResult listsCutPriceHistory() {
|
||||
return CommonResult.success(shopStoreActivityBaseService.listsCutPriceHistory());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "根据条件列出形成的团", notes = "根据条件列出形成的团")
|
||||
@RequestMapping(value = "/listsGroupbooking", method = RequestMethod.GET)
|
||||
@ -246,6 +251,5 @@ public class UserActivityController extends BaseControllerImpl {
|
||||
public CommonResult getGiftbag(@RequestParam(name = "activity_id") Integer activity_id) {
|
||||
return CommonResult.success(shopStoreActivityBaseService.getGiftbag(activity_id));
|
||||
}
|
||||
//
|
||||
}
|
||||
|
||||
|
||||
@ -322,6 +322,13 @@ public class ShopActivityCutpriceServiceImpl extends BaseServiceImpl<ShopActivit
|
||||
return activity_row;
|
||||
}
|
||||
|
||||
/**
|
||||
* 砍价
|
||||
*
|
||||
* @param ac_id 活动 Id
|
||||
* @param user_id 砍价用户
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public CommonResult doCutPrice(Integer ac_id, Integer user_id) {
|
||||
@ -344,7 +351,7 @@ public class ShopActivityCutpriceServiceImpl extends BaseServiceImpl<ShopActivit
|
||||
Integer activity_id = cutprice_row.getActivity_id();
|
||||
ShopStoreActivityBase storeActivityBase = shopStoreActivityBaseService.get(activity_id);
|
||||
Map activity_row = Convert.toMap(String.class, Object.class, storeActivityBase);
|
||||
if (!shopStoreActivityBaseService.verifyActivity(activity_row)) {
|
||||
if (!shopStoreActivityBaseService.isActivityTimeValid(activity_row)) {
|
||||
throw new ApiException(I18nUtil._("该活动不存在!"));
|
||||
}
|
||||
|
||||
|
||||
@ -475,7 +475,7 @@ public class ShopActivityGroupbookingServiceImpl extends BaseServiceImpl<ShopAct
|
||||
ShopStoreActivityBase activityBase = shopStoreActivityBaseService.get(gbh_row.getActivity_id());
|
||||
Map activity_row = Convert.toMap(String.class, Object.class, activityBase);
|
||||
|
||||
if (shopStoreActivityBaseService.verifyActivity(activity_row)) if (gbh_row != null && gb_row != null) {
|
||||
if (shopStoreActivityBaseService.isActivityTimeValid(activity_row)) if (gbh_row != null && gb_row != null) {
|
||||
// 判断拼团是否满员在加入该成员后是否满员
|
||||
if (ifFull(gb_row, true)) {
|
||||
// 修改拼团记录
|
||||
|
||||
@ -152,7 +152,7 @@ public class ShopActivityGroupbuyStoreServiceImpl extends BaseServiceImpl<ShopAc
|
||||
ShopStoreActivityBase storeActivityBase = shopStoreActivityBaseService.findOne(baseQueryWrapper);
|
||||
Map activity_base_row = Convert.toMap(String.class, Object.class, storeActivityBase);
|
||||
|
||||
if (gbsh_row != null && activity_base_row != null && shopStoreActivityBaseService.verifyActivity(activity_base_row)) {
|
||||
if (gbsh_row != null && activity_base_row != null && shopStoreActivityBaseService.isActivityTimeValid(activity_base_row)) {
|
||||
|
||||
// 修改团员支付状态
|
||||
ShopActivityGroupbuyStoreHistory storeHistory = new ShopActivityGroupbuyStoreHistory();
|
||||
|
||||
@ -168,7 +168,7 @@ public class ShopActivityPfGroupbuyStoreHistoryServiceImpl extends BaseServiceIm
|
||||
Map activity_base_row = Convert.toMap(String.class, Object.class, storeActivityBase);
|
||||
|
||||
if (pfgbsh_row != null && activity_base_row != null
|
||||
&& shopStoreActivityBaseService.verifyActivity(activity_base_row)) {
|
||||
&& shopStoreActivityBaseService.isActivityTimeValid(activity_base_row)) {
|
||||
|
||||
// 修改团员支付状态
|
||||
ShopActivityPfGroupbuyStoreHistory storeHistory = new ShopActivityPfGroupbuyStoreHistory();
|
||||
|
||||
@ -57,7 +57,7 @@ public interface ShopStoreActivityBaseService extends IBaseService<ShopStoreActi
|
||||
|
||||
List<Long> getActivityAllItemIds(Map activity_row);
|
||||
|
||||
boolean verifyActivity(Map activity_row);
|
||||
boolean isActivityTimeValid(Map activity_row);
|
||||
|
||||
Map listsMarketing();
|
||||
|
||||
|
||||
@ -36,7 +36,10 @@ import com.suisung.mall.common.modules.product.ShopProductItem;
|
||||
import com.suisung.mall.common.modules.store.ShopStoreActivityBase;
|
||||
import com.suisung.mall.common.modules.store.ShopStoreActivityItem;
|
||||
import com.suisung.mall.common.modules.store.ShopStoreBase;
|
||||
import com.suisung.mall.common.utils.*;
|
||||
import com.suisung.mall.common.utils.CheckUtil;
|
||||
import com.suisung.mall.common.utils.I18nUtil;
|
||||
import com.suisung.mall.common.utils.StringUtils;
|
||||
import com.suisung.mall.common.utils.UserInfoService;
|
||||
import com.suisung.mall.core.web.service.RedisService;
|
||||
import com.suisung.mall.core.web.service.impl.BaseServiceImpl;
|
||||
import com.suisung.mall.shop.activity.service.*;
|
||||
@ -2046,13 +2049,33 @@ public class ShopStoreActivityBaseServiceImpl extends BaseServiceImpl<ShopStoreA
|
||||
return item_id_row;
|
||||
}
|
||||
|
||||
public boolean verifyActivity(Map activity_row) {
|
||||
if (CollUtil.isNotEmpty(activity_row)) {
|
||||
Date beginMillisecond = Convert.toDate(activity_row.get("activity_starttime"));
|
||||
Date endMillisecond = Convert.toDate(activity_row.get("activity_endtime"));
|
||||
return RegexUtil.isWithinTimeRange(beginMillisecond, endMillisecond);
|
||||
/**
|
||||
* 验证活动时间是否有效
|
||||
*
|
||||
* @param activityRow 活动数据
|
||||
* @return 时间是否有效
|
||||
*/
|
||||
public boolean isActivityTimeValid(Map activityRow) {
|
||||
if (CollUtil.isEmpty(activityRow)) {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
|
||||
Object startTimeObj = activityRow.get("activity_starttime");
|
||||
Object endTimeObj = activityRow.get("activity_endtime");
|
||||
|
||||
if (startTimeObj == null || endTimeObj == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Date startTime = Convert.toDate(startTimeObj);
|
||||
Date endTime = Convert.toDate(endTimeObj);
|
||||
|
||||
if (startTime == null || endTime == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Date now = new Date();
|
||||
return !now.before(startTime) && !now.after(endTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -2534,9 +2557,9 @@ public class ShopStoreActivityBaseServiceImpl extends BaseServiceImpl<ShopStoreA
|
||||
|
||||
|
||||
ShopStoreActivityBase one = shopStoreActivityBaseService.get(activity_id);
|
||||
Map activity_row = Convert.toMap(Object.class, Object.class, one);
|
||||
/* Map activity_row = Convert.toMap(Object.class, Object.class, one);
|
||||
|
||||
/*if (!verifyActivity(activity_row)) {
|
||||
if (!verifyActivity(activity_row)) {
|
||||
Map data = new HashMap();
|
||||
data.put("msg", I18nUtil._("该砍价活动不存在"));
|
||||
return data;
|
||||
|
||||
@ -20,16 +20,16 @@
|
||||
<L>可口可乐CocaC</L> <L><BOLD> x110 </BOLD></L><L> 8100.45</L><BR>
|
||||
<L>ola经典美味汽水1.2</L><BR>
|
||||
<L>5L/瓶</L><BR>
|
||||
<BOLD>6970448170051</BOLD><BR>
|
||||
<BOLD>6970448170051</BOLD><BR><BR>
|
||||
<L>排骨约350g(默 </L><L><BOLD> 1 </BOLD></L><L> 150.13 </L><BR>
|
||||
<L>认砍小块)</L><BR>
|
||||
<BOLD>6970448170053</BOLD><BR>
|
||||
<BOLD>6970448170053</BOLD><BR><BR>
|
||||
<L>新鲜虫草花1包约2 </L><L><BOLD> x11 </BOLD></L><L> 4.01 </L><BR>
|
||||
<L>00g 韭菜1000g 鸡蛋</L><BR>
|
||||
<L>2003克</L><BR>
|
||||
<BOLD>6970448170054</BOLD><BR>
|
||||
<BOLD>6970448170054</BOLD><BR><BR>
|
||||
<L>冰红茶风味饮料 <L><BOLD> 1 </BOLD></L><L> 13.24 </L></L><BR>
|
||||
<BOLD>6970448170055</BOLD><BR>
|
||||
<BOLD>6970448170055</BOLD><BR><BR>
|
||||
--------------------------------<BR>
|
||||
商品总件数:<BOLD>3</BOLD><BR>
|
||||
商品总额:<BOLD>¥18.7</BOLD><BR>
|
||||
@ -61,4 +61,4 @@
|
||||
<CB>${store_name}</CB><BR>--------------------------------<BR><CB>#${order_pickup_num_str}</CB><BR><L>买家备注:${order_message!'-'}</L><BR><BOLD>配送时间:${payment_time?string('MM-dd HH:mm')}~${delivery_time?string('HH:mm')}</BOLD><BR>--------------------------------<BR>订单编号:${order_id}<BR>订单来源:微信小程序<BR>支付方式:微信支付<BR>配送来源:顺丰同城<BR>付款时间:${payment_time?string('yyyy-MM-dd HH:mm:ss')}<BR>--------------------------------<BR><L>商品名称 数量 金额</L><BR>--------------------------------<BR><#list order_items as item><L>${item.s_name}</L><L><BOLD>${item.s_quantity}</BOLD></L><L>${item.s_amount}</L><BR><#if item.s_name_segs??><#list item.s_name_segs as seg><L>${seg}</L><BR></#list></#if><BOLD><#if item.product_sn?default("")?trim?length gt 1>${item.product_sn}</BOLD><BR></#if></#list>--------------------------------<BR>商品总件数:<BOLD>${order_items_count!0}</BOLD><BR>商品总额:<BOLD>¥${order_product_amount?string('0.00')}</BOLD><BR>运费:<BOLD>¥${order_shipping_fee?string('0.00')}</BOLD><BR><#if packing_fee?? && (packing_fee > 0)>打包费:<BOLD>¥${packing_fee?string('0.00')}</BOLD><BR></#if>优惠金额:<BOLD>-¥${(quanyi!0)?string('0.00')}</BOLD><BR>实付金额:<BOLD>¥${order_payment_amount?string('0.00')}</BOLD><BR><#if seller_message?default("")?trim?length gt 1>--------------------------------<BR><BOLD>商家备注:${seller_message!'-'}</BOLD><BR></#if>--------------------------------<BR><BOLD>收货人:${buyer_user_name!''}</BOLD><BR><BOLD>收货人手机:${da_mobile!'-'}</BOLD><BR><BOLD>收货地址:${da_province!'-'}${da_city!'-'}${da_address!'-'}</BOLD><BR>--------------------------------<BR>门店:${store_name}<BR>门店电话:<BOLD>${store_tel!'-'}</BOLD><BR>收银员:${cashier!'店长'}<BR>
|
||||
|
||||
第三版带变量的模版(有预约订单)
|
||||
<CB>${store_name}</CB><BR><#if is_booking_order><CB><B>预约订单</B></CB><BR></#if>--------------------------------<BR><CB>#${order_pickup_num_str}</CB><BR><L>买家备注:${order_message!'-'}</L><BR><BOLD>配送时间:${payment_time?string('MM-dd HH:mm')}~${delivery_time?string('HH:mm')}</BOLD><BR>--------------------------------<BR>订单编号:${order_id}<BR>订单来源:微信小程序<BR>支付方式:微信支付<BR>配送来源:顺丰同城<BR>付款时间:${payment_time?string('yyyy-MM-dd HH:mm:ss')}<BR>--------------------------------<BR><L>商品名称 数量 金额</L><BR>--------------------------------<BR><#list order_items as item><L>${item.s_name}</L><L><BOLD>${item.s_quantity}</BOLD></L><L>${item.s_amount}</L><BR><#if item.s_name_segs??><#list item.s_name_segs as seg><L>${seg}</L><BR></#list></#if><BOLD><#if item.product_sn?default("")?trim?length gt 1>${item.product_sn}</BOLD><BR></#if></#list>--------------------------------<BR>商品总件数:<BOLD>${order_items_count!0}</BOLD><BR>商品总额:<BOLD>¥${order_product_amount?string('0.00')}</BOLD><BR>运费:<BOLD>¥${order_shipping_fee?string('0.00')}</BOLD><BR><#if packing_fee?? && (packing_fee > 0)>打包费:<BOLD>¥${packing_fee?string('0.00')}</BOLD><BR></#if>优惠金额:<BOLD>-¥${(quanyi!0)?string('0.00')}</BOLD><BR>实付金额:<BOLD>¥${order_payment_amount?string('0.00')}</BOLD><BR><#if seller_message?default("")?trim?length gt 1>--------------------------------<BR><BOLD>商家备注:${seller_message!'-'}</BOLD><BR></#if>--------------------------------<BR><BOLD>收货人:${buyer_user_name!''}</BOLD><BR><BOLD>收货人手机:${da_mobile!'-'}</BOLD><BR><BOLD>收货地址:${da_province!'-'}${da_city!'-'}${da_address!'-'}</BOLD><BR>--------------------------------<BR>门店:${store_name}<BR>门店电话:<BOLD>${store_tel!'-'}</BOLD><BR>收银员:${cashier!'店长'}<BR>
|
||||
<#if is_booking_order><CB><B>【预约订单】<BR></B></CB></#if><CB>${store_name}</CB><BR>--------------------------------<BR><CB>#${order_pickup_num_str}</CB><BR><L>买家备注:${order_message!'-'}</L><BR><BOLD>配送时间:${payment_time?string('MM-dd HH:mm')}~${delivery_time?string('HH:mm')}</BOLD><BR>--------------------------------<BR>订单编号:${order_id}<BR>订单来源:微信小程序<BR>支付方式:微信支付<BR>配送来源:顺丰同城<BR>付款时间:${payment_time?string('yyyy-MM-dd HH:mm:ss')}<BR>--------------------------------<BR><L>商品名称 数量 金额</L><BR>--------------------------------<BR><#list order_items as item><L>${item.s_name}</L><L><BOLD>${item.s_quantity}</BOLD></L><L>${item.s_amount}</L><BR><#if item.s_name_segs??><#list item.s_name_segs as seg><L>${seg}</L><BR></#list></#if><BOLD><#if item.product_sn?default("")?trim?length gt 1>${item.product_sn}</BOLD><BR></#if><BR></#list>--------------------------------<BR>商品总件数:<BOLD>${order_items_count!0}</BOLD><BR>商品总额:<BOLD>¥${order_product_amount?string('0.00')}</BOLD><BR>运费:<BOLD>¥${order_shipping_fee?string('0.00')}</BOLD><BR><#if packing_fee?? && (packing_fee > 0)>打包费:<BOLD>¥${packing_fee?string('0.00')}</BOLD><BR></#if>优惠金额:<BOLD>-¥${(quanyi!0)?string('0.00')}</BOLD><BR>实付金额:<BOLD>¥${order_payment_amount?string('0.00')}</BOLD><BR><#if seller_message?default("")?trim?length gt 1>--------------------------------<BR><BOLD>商家备注:${seller_message!'-'}</BOLD><BR></#if>--------------------------------<BR><BOLD>收货人:${buyer_user_name!''}</BOLD><BR><BOLD>收货人手机:${da_mobile!'-'}</BOLD><BR><BOLD>收货地址:${da_province!'-'}${da_city!'-'}${da_address!'-'}</BOLD><BR>--------------------------------<BR>门店:${store_name}<BR>门店电话:<BOLD>${store_tel!'-'}</BOLD><BR>收银员:${cashier!'店长'}<BR>
|
||||
Loading…
Reference in New Issue
Block a user