|
|
|
@@ -5,6 +5,7 @@ import java.util.stream.Collectors; |
|
|
|
|
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.iformall.common.Result; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.domain.po.WxShop; |
|
|
|
import com.iformall.enums.EnumShopStatus; |
|
|
|
@@ -44,8 +45,7 @@ public class WxShopServiceImpl implements WxShopService { |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void saveOrUpdate(WxShop record) { |
|
|
|
|
|
|
|
public ResultData saveOrUpdate(WxShop record) { |
|
|
|
if (record.getId() == null) { |
|
|
|
final IdWorker idWorker = IdWorker.get(); |
|
|
|
record.setId(idWorker.nextId()); |
|
|
|
@@ -54,9 +54,11 @@ public class WxShopServiceImpl implements WxShopService { |
|
|
|
record.setUpdateDate(date); |
|
|
|
record.setCreateDate(date); |
|
|
|
wxShopMapper.insertSelective(record); |
|
|
|
return new ResultData(Result.SUCCESS,"添加成功"); |
|
|
|
} else { |
|
|
|
record.setUpdateDate(new Date()); |
|
|
|
wxShopMapper.updateByPrimaryKeySelective(record); |
|
|
|
return new ResultData(Result.SUCCESS,"更新成功"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|