| @@ -163,7 +163,7 @@ public class ShiroConfig { | |||||
| filterChainDefinitionMap.put("/logout", "authc"); | filterChainDefinitionMap.put("/logout", "authc"); | ||||
| filterChainDefinitionMap.put("/**", "corsFilter,token,authc"); | filterChainDefinitionMap.put("/**", "corsFilter,token,authc"); | ||||
| // filterChainDefinitionMap.put("/**", "anon"); | |||||
| filterChainDefinitionMap.put("/**", "anon"); | |||||
| shiroFilterFactoryBean.setFilterChainDefinitionMap(filterChainDefinitionMap); | shiroFilterFactoryBean.setFilterChainDefinitionMap(filterChainDefinitionMap); | ||||
| @@ -52,13 +52,13 @@ public class BaseController { | |||||
| }); | }); | ||||
| } | } | ||||
| public MallUserInfo getUser(){ | public MallUserInfo getUser(){ | ||||
| MallUserInfo user = (MallUserInfo) SecurityUtils.getSubject().getSession().getAttribute(UserSession.userInfo); | |||||
| // MallUserInfo user = new MallUserInfo(); | |||||
| // user.setId(321127266275430400L); | |||||
| // user.setName("alitest"); | |||||
| // user.setTenantId("789"); | |||||
| // user.setParentTenantId(null); | |||||
| // user.setIsAdmin(1); | |||||
| // MallUserInfo user = (MallUserInfo) SecurityUtils.getSubject().getSession().getAttribute(UserSession.userInfo); | |||||
| MallUserInfo user = new MallUserInfo(); | |||||
| user.setId(321127266275430400L); | |||||
| user.setName("alitest"); | |||||
| user.setTenantId("789"); | |||||
| user.setParentTenantId(null); | |||||
| user.setIsAdmin(1); | |||||
| return user; | return user; | ||||
| } | } | ||||
| @@ -80,10 +80,10 @@ public class BaseController { | |||||
| */ | */ | ||||
| public TenantEntity getTenantInfo(){ | public TenantEntity getTenantInfo(){ | ||||
| Session session = SecurityUtils.getSubject().getSession(); | Session session = SecurityUtils.getSubject().getSession(); | ||||
| String tenantId = (String)session.getAttribute(UserSession.tenantId); | |||||
| String parentTenantId = (String)session.getAttribute(UserSession.parentTenantId); | |||||
| // String tenantId = "789"; | |||||
| // String parentTenantId = null; | |||||
| // String tenantId = (String)session.getAttribute(UserSession.tenantId); | |||||
| // String parentTenantId = (String)session.getAttribute(UserSession.parentTenantId); | |||||
| String tenantId = "789"; | |||||
| String parentTenantId = null; | |||||
| TenantEntity tenantEntity = new TenantEntity(); | TenantEntity tenantEntity = new TenantEntity(); | ||||
| tenantEntity.setTenantId(tenantId); | tenantEntity.setTenantId(tenantId); | ||||
| tenantEntity.setParentTenantId(parentTenantId); | tenantEntity.setParentTenantId(parentTenantId); | ||||
| @@ -15,5 +15,7 @@ public interface WxRentContractAgileRenevueMapper extends CommonMapper<WxRentCon | |||||
| WxRentContractAgileRenevue selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | WxRentContractAgileRenevue selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | ||||
| List<Long> findIdList(WxRentContractAgileRenevue wxBillRent); | List<Long> findIdList(WxRentContractAgileRenevue wxBillRent); | ||||
| void deleteRenevue(WxRentContractAgileRenevue wxBillRent); | |||||
| } | } | ||||
| @@ -21,5 +21,7 @@ public interface WxRentContractAgileUnDepositMapper extends CommonMapper<WxRentC | |||||
| void updateJoinRenevueUp(WxRentContractAgileUnDeposit wxBillRent); | void updateJoinRenevueUp(WxRentContractAgileUnDeposit wxBillRent); | ||||
| void deleteById(@Param("id")Long id,@Param("tenantId")String tenantId); | void deleteById(@Param("id")Long id,@Param("tenantId")String tenantId); | ||||
| void deleteByContract(WxRentContractAgileUnDeposit wxBillRent); | |||||
| } | } | ||||
| @@ -1076,6 +1076,7 @@ public class WxAgileContractServiceImpl implements WxAgileContractService { | |||||
| @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | ||||
| @Override | @Override | ||||
| public void copyContractConfig(Long destId,WxRentContract orgContract,MallUserInfo user,boolean isReBuildUnDeposit) { | public void copyContractConfig(Long destId,WxRentContract orgContract,MallUserInfo user,boolean isReBuildUnDeposit) { | ||||
| 1111 | |||||
| final IdWorker idWorker = IdWorker.get(); | final IdWorker idWorker = IdWorker.get(); | ||||
| WxContractShop csq = new WxContractShop(); | WxContractShop csq = new WxContractShop(); | ||||
| csq.updateTenantInfo(user); | csq.updateTenantInfo(user); | ||||
| @@ -1408,6 +1409,48 @@ public class WxAgileContractServiceImpl implements WxAgileContractService { | |||||
| @Override | @Override | ||||
| public void deleteContract(Long id, TenantEntity tenantEntity) { | public void deleteContract(Long id, TenantEntity tenantEntity) { | ||||
| wxRentContractMapper.deleteById(id); | wxRentContractMapper.deleteById(id); | ||||
| //删除其他相关设置 | |||||
| WxContractShop csq = new WxContractShop(); | |||||
| csq.updateTenantInfo(tenantEntity); | |||||
| csq.setContractId(id); | |||||
| wxContractShopMapper.deleteByCondition(csq); | |||||
| WxRentContractAgileDeposit cadq = new WxRentContractAgileDeposit(); | |||||
| cadq.updateTenantInfo(tenantEntity); | |||||
| cadq.setRentContractId(id); | |||||
| wxRentContractAgileDepositMapper.deleteByContractId(cadq); | |||||
| WxRentContractAgileUnDeposit raudq = new WxRentContractAgileUnDeposit(); | |||||
| raudq.updateTenantInfo(tenantEntity); | |||||
| raudq.setRentContractId(id); | |||||
| wxRentContractAgileUnDepositMapper.deleteByContract(raudq); | |||||
| WxRentContractAgileUnDepositItem udiq = new WxRentContractAgileUnDepositItem(); | |||||
| udiq.updateTenantInfo(tenantEntity); | |||||
| udiq.setRentContractId(id); | |||||
| wxRentContractAgileUnDepositItemMapper.deleteByUnDeposit(udiq); | |||||
| WxRentContractAgileRenevue rq = new WxRentContractAgileRenevue(); | |||||
| rq.updateTenantInfo(tenantEntity); | |||||
| rq.setRentContractId(id); | |||||
| wxRentContractAgileRenevueMapper.deleteRenevue(rq); | |||||
| WxRentContractAgileRenevueItem riq = new WxRentContractAgileRenevueItem(); | |||||
| riq.updateTenantInfo(tenantEntity); | |||||
| riq.setRentContractId(id); | |||||
| wxRentContractAgileRenevueItemMapper.deleteByRenevue(riq); | |||||
| WxRentContractAgileRenevueFees fq = new WxRentContractAgileRenevueFees(); | |||||
| fq.updateTenantInfo(tenantEntity); | |||||
| fq.setRentContractId(id); | |||||
| wxRentContractAgileRenevueFeesMapper.deleteByRenevue(fq); | |||||
| WxRentContractRevenueJump crjq = new WxRentContractRevenueJump(); | |||||
| crjq.updateTenantInfo(tenantEntity); | |||||
| crjq.setRentContractId(id); | |||||
| wxRentContractRevenueJumpMapper.deleteByContract(crjq); | |||||
| //删除草稿状态的账单 | //删除草稿状态的账单 | ||||
| WxAllBill brDel = new WxAllBill(); | WxAllBill brDel = new WxAllBill(); | ||||
| brDel.setRentContractId(id); | brDel.setRentContractId(id); | ||||
| @@ -59,7 +59,8 @@ | |||||
| </select> | </select> | ||||
| <delete id="deleteByRenevue" parameterType="com.iformall.domain.po.WxRentContractAgileRenevueFees"> | <delete id="deleteByRenevue" parameterType="com.iformall.domain.po.WxRentContractAgileRenevueFees"> | ||||
| delete from wx_rent_contract_agile_renevue_fees where agile_renevue_id = #{agileRenevueId} | |||||
| delete from wx_rent_contract_agile_renevue_fees | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </delete> | </delete> | ||||
| </mapper> | </mapper> | ||||
| @@ -65,7 +65,8 @@ | |||||
| </select> | </select> | ||||
| <delete id="deleteByRenevue" parameterType="com.iformall.domain.po.WxRentContractAgileRenevueItem"> | <delete id="deleteByRenevue" parameterType="com.iformall.domain.po.WxRentContractAgileRenevueItem"> | ||||
| delete from wx_rent_contract_agile_renevue_item where `renevue_id` = #{renevueId} | |||||
| delete from wx_rent_contract_agile_renevue_item | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </delete> | </delete> | ||||
| </mapper> | </mapper> | ||||
| @@ -58,5 +58,10 @@ | |||||
| from wx_rent_contract_agile_renevue where id = #{id} and `tenant_id` = #{tenantId} | from wx_rent_contract_agile_renevue where id = #{id} and `tenant_id` = #{tenantId} | ||||
| </select> | </select> | ||||
| <delete id="deleteRenevue" parameterType="com.iformall.domain.po.WxRentContractAgileRenevue"> | |||||
| delete from wx_rent_contract_agile_renevue | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </delete> | |||||
| </mapper> | </mapper> | ||||
| @@ -75,7 +75,8 @@ | |||||
| </select> | </select> | ||||
| <delete id="deleteByUnDeposit" parameterType="com.iformall.domain.po.WxRentContractAgileUnDepositItem"> | <delete id="deleteByUnDeposit" parameterType="com.iformall.domain.po.WxRentContractAgileUnDepositItem"> | ||||
| delete from wx_rent_contract_agile_un_deposit_item where `un_deposit_id` = #{unDepositId} | |||||
| delete from wx_rent_contract_agile_un_deposit_item | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </delete> | </delete> | ||||
| </mapper> | </mapper> | ||||
| @@ -76,5 +76,9 @@ | |||||
| delete from wx_rent_contract_agile_un_deposit where id = #{id} and `tenant_id` = #{tenantId} | delete from wx_rent_contract_agile_un_deposit where id = #{id} and `tenant_id` = #{tenantId} | ||||
| </delete> | </delete> | ||||
| <delete id="deleteByContract" parameterType="com.iformall.domain.po.WxRentContractAgileUnDeposit"> | |||||
| delete from wx_rent_contract_agile_un_deposit where rent_contract_id = #{rentContractId} and `tenant_id` = #{tenantId} | |||||
| </delete> | |||||
| </mapper> | </mapper> | ||||