forked from dibo-software/diboot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2f0c76a
commit a9af3c3
Showing
7 changed files
with
190 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
diboot-core-starter/src/test/java/diboot/core/test/binder/entity/CcCityInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Copyright (c) 2015-2020, www.dibo.ltd ([email protected]). | ||
* <p> | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
* use this file except in compliance with the License. You may obtain a copy of | ||
* the License at | ||
* <p> | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* <p> | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
package diboot.core.test.binder.entity; | ||
|
||
import com.alibaba.fastjson.annotation.JSONField; | ||
import com.baomidou.mybatisplus.annotation.TableField; | ||
import com.diboot.core.entity.BaseEntity; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import lombok.experimental.Accessors; | ||
|
||
import java.util.Date; | ||
|
||
/** | ||
* @author [email protected] | ||
* @version v2.0 | ||
* @date 2019/1/30 | ||
*/ | ||
@Getter | ||
@Setter | ||
@Accessors(chain = true) | ||
public class CcCityInfo extends BaseEntity { | ||
private static final long serialVersionUID = 3701095453152116088L; | ||
|
||
private Long parentId; | ||
|
||
private Long regionId; | ||
|
||
private String regionName; | ||
|
||
@TableField(exist = false) | ||
private Date createTime; | ||
|
||
@TableField(exist = false) | ||
private boolean deleted; | ||
} |
32 changes: 32 additions & 0 deletions
32
diboot-core-starter/src/test/java/diboot/core/test/binder/mapper/CcCityInfoMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright (c) 2015-2020, www.dibo.ltd ([email protected]). | ||
* <p> | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
* use this file except in compliance with the License. You may obtain a copy of | ||
* the License at | ||
* <p> | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* <p> | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
package diboot.core.test.binder.mapper; | ||
|
||
import com.diboot.core.mapper.BaseCrudMapper; | ||
import diboot.core.test.binder.entity.CcCityInfo; | ||
import diboot.core.test.binder.entity.Role; | ||
import org.apache.ibatis.annotations.Mapper; | ||
|
||
/** | ||
* 员工Mapper | ||
* @author [email protected] | ||
* @version 2018/12/22 | ||
*/ | ||
@Mapper | ||
public interface CcCityInfoMapper extends BaseCrudMapper<CcCityInfo> { | ||
|
||
} | ||
|
30 changes: 30 additions & 0 deletions
30
diboot-core-starter/src/test/java/diboot/core/test/binder/service/CcCityInfoService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright (c) 2015-2020, www.dibo.ltd ([email protected]). | ||
* <p> | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
* use this file except in compliance with the License. You may obtain a copy of | ||
* the License at | ||
* <p> | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* <p> | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
package diboot.core.test.binder.service; | ||
|
||
import com.baomidou.mybatisplus.extension.service.IService; | ||
import diboot.core.test.binder.entity.CcCityInfo; | ||
import diboot.core.test.binder.entity.Role; | ||
|
||
/** | ||
* 角色相关Service | ||
* @author [email protected] | ||
* @version v2.0 | ||
* @date 2019/1/5 | ||
*/ | ||
public interface CcCityInfoService extends IService<CcCityInfo> { | ||
|
||
} |
35 changes: 35 additions & 0 deletions
35
...ore-starter/src/test/java/diboot/core/test/binder/service/impl/CcCityInfoServiceImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright (c) 2015-2020, www.dibo.ltd ([email protected]). | ||
* <p> | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
* use this file except in compliance with the License. You may obtain a copy of | ||
* the License at | ||
* <p> | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* <p> | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
package diboot.core.test.binder.service.impl; | ||
|
||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
import diboot.core.test.binder.entity.CcCityInfo; | ||
import diboot.core.test.binder.entity.Role; | ||
import diboot.core.test.binder.mapper.CcCityInfoMapper; | ||
import diboot.core.test.binder.mapper.RoleMapper; | ||
import diboot.core.test.binder.service.CcCityInfoService; | ||
import diboot.core.test.binder.service.RoleService; | ||
import org.springframework.stereotype.Service; | ||
|
||
/** | ||
* 员工相关Service | ||
* @author [email protected] | ||
* @version 2018/12/23 | ||
*/ | ||
@Service | ||
public class CcCityInfoServiceImpl extends ServiceImpl<CcCityInfoMapper, CcCityInfo> implements CcCityInfoService { | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
diboot-core-starter/src/test/java/diboot/core/test/binder/vo/CcCityInfoVO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package diboot.core.test.binder.vo; | ||
|
||
import com.diboot.core.binding.annotation.BindField; | ||
import diboot.core.test.binder.entity.CcCityInfo; | ||
import lombok.Data; | ||
|
||
/** | ||
* <Description> | ||
* | ||
* @author mazc | ||
* @version v1.0 | ||
* @date 2020/09/29 | ||
*/ | ||
@Data | ||
public class CcCityInfoVO extends CcCityInfo { | ||
|
||
@BindField(entity = CcCityInfo.class, field = "regionName", condition = "this.parent_id=cc_city_info.region_id AND cc_city_info.parent_id=region_id") | ||
private String provenceName; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters