新增店铺营业时间修改

This commit is contained in:
liyj 2025-09-30 10:47:55 +08:00
parent ce85d72cee
commit 62d76b3a67

View File

@ -3875,6 +3875,7 @@ public class ShopStoreBaseServiceImpl extends BaseServiceImpl<ShopStoreBaseMappe
* @return * @return
*/ */
@Override @Override
@Transactional
public Boolean updateStoreBizState(Integer storeId, Integer bizState) { public Boolean updateStoreBizState(Integer storeId, Integer bizState) {
// 检查参数是否为空 // 检查参数是否为空
if (storeId == null || storeId == 0 || bizState == null) { if (storeId == null || storeId == 0 || bizState == null) {
@ -3886,7 +3887,16 @@ public class ShopStoreBaseServiceImpl extends BaseServiceImpl<ShopStoreBaseMappe
bizState = CommonConstant.Disable2; bizState = CommonConstant.Disable2;
} }
String store_opening_hours=getParameter("store_opening_hours");
String store_close_hours=getParameter("store_close_hours");
try { try {
if(StringUtils.isNotEmpty(store_close_hours)){
UpdateWrapper<ShopStoreInfo> shopStoreInfoUpdateWrapper=new UpdateWrapper<>();
shopStoreInfoUpdateWrapper.eq("store_id",storeId);
shopStoreInfoUpdateWrapper.set("store_opening_hours",store_opening_hours);
shopStoreInfoUpdateWrapper.set("store_close_hours",store_close_hours);
shopStoreInfoService.update(shopStoreInfoUpdateWrapper);
}
// 使用 UpdateWrapper 更新店铺营业状态 // 使用 UpdateWrapper 更新店铺营业状态
boolean updated = update(new UpdateWrapper<ShopStoreBase>() boolean updated = update(new UpdateWrapper<ShopStoreBase>()
.eq("store_id", storeId) .eq("store_id", storeId)