|
@@ -23,7 +23,7 @@ public class ShShopService {
|
|
//我的商店新增
|
|
//我的商店新增
|
|
@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
|
|
@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
|
|
public int addShShop(Long userId, Integer shopType, String shopName, String adddr,
|
|
public int addShShop(Long userId, Integer shopType, String shopName, String adddr,
|
|
- DateTime startDate, DateTime endDate, String linkman, String phone) {
|
|
|
|
|
|
+ DateTime startDate, DateTime endDate, String linkman, String phone) throws Exception {
|
|
|
|
|
|
DateTime dateTime = new DateTime();
|
|
DateTime dateTime = new DateTime();
|
|
var shShopDb = shShopMapper.selectById(userId);
|
|
var shShopDb = shShopMapper.selectById(userId);
|
|
@@ -45,7 +45,10 @@ public class ShShopService {
|
|
/* qzTak.setUserUpdate(userId);*/
|
|
/* qzTak.setUserUpdate(userId);*/
|
|
shop.setTimeUpdate(dateTime);
|
|
shop.setTimeUpdate(dateTime);
|
|
return shShopMapper.insert(shop);
|
|
return shShopMapper.insert(shop);
|
|
- }/* else {
|
|
|
|
|
|
+ } else {
|
|
|
|
+ throw new Exception("您已有一个商店,请勿重复添加");
|
|
|
|
+ }
|
|
|
|
+ /* else {
|
|
shShopDb.setUserId(userId);
|
|
shShopDb.setUserId(userId);
|
|
shShopDb.setShopType(shopType);
|
|
shShopDb.setShopType(shopType);
|
|
shShopDb.setShopName(shopName);
|
|
shShopDb.setShopName(shopName);
|
|
@@ -63,7 +66,7 @@ public class ShShopService {
|
|
return shShopMapper.updateById(shShopDb);
|
|
return shShopMapper.updateById(shShopDb);
|
|
}*/
|
|
}*/
|
|
|
|
|
|
- return 0;
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
public List<ShShop> queryMyShShop(Long userId) throws Exception {
|
|
public List<ShShop> queryMyShShop(Long userId) throws Exception {
|